:root {
    --primary-color: #d81b60; /* Rosa/Magenta fuerte de los logos */
    --secondary-color: #1976d2; /* Azul fuerte de los logos */
    --accent-color: #ff9800; /* Naranja para ofertas */
    --dark-color: #1a1a1a; /* Texto oscuro, alineado a la tipografía del logo */
    --light-bg: #f4f6f8;
    --white: #ffffff;
    --gray: #757575;
    --gray-light: #eeeeee;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Accesibilidad: foco visible */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-area h2 {
    color: var(--dark-color);
    font-size: 1.3rem;
    font-weight: 700;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 450px;
    background: var(--light-bg);
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(216, 27, 96, 0.15);
}

.search-bar input {
    flex: 1;
    padding: 10px 18px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
}

.search-bar button {
    background: transparent;
    border: none;
    padding: 0 18px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar button:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* Search Autocomplete Wrapper & Dropdown */
.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 450px;
    display: flex;
    flex-direction: column;
}

.search-wrapper .search-bar {
    max-width: 100%;
    width: 100%;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
    border: 1px solid rgba(216,27,96,0.12);
    z-index: 2000;
    overflow: hidden;
    display: none;
    animation: suggestionsFadeIn 0.18s ease;
}

.search-suggestions.open {
    display: block;
}

@keyframes suggestionsFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: var(--dark-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #fce4ec;
}

.suggestion-item img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f9f9;
    flex-shrink: 0;
}

.suggestion-item-info {
    flex: 1;
    overflow: hidden;
}

.suggestion-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item-cat {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 1px;
}

.suggestion-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.suggestion-see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    background: #f8f9fa;
    transition: background 0.15s ease;
}

.suggestion-see-all:hover {
    background: #e3f2fd;
}

/* ── Hero Carousel Classes ───────────────────────────────── */
.carousel-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 25px;
    text-align: center;
}

.carousel-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.carousel-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.carousel-text {
    font-size: 1.2rem;
    max-width: 650px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
    margin-bottom: 20px;
    line-height: 1.5;
}

.carousel-btn {
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.carousel-btn:hover {
    transform: translateY(-2px);
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-contact a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.cart-icon-btn {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), #c2185b);
    color: var(--white);
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(216, 27, 96, 0.3);
    transition: var(--transition);
}

.cart-icon-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 12px rgba(216, 27, 96, 0.4);
}

#cartCount {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sub-nav {
    background: var(--white);
    border-top: 1px solid #f1f2f6;
}

.sub-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    list-style: none;
    gap: 30px;
}

.sub-nav a {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.sub-nav a:hover, .sub-nav a.active {
    color: var(--primary-color);
}

.sub-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
    transition: var(--transition);
}

.sub-nav a:hover::after, .sub-nav a.active::after {
    width: 100%;
}

/* Main Container */
.main-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 25px 20px;
}

/* Product Cards Grid & Design */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
    margin-top: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(216, 27, 96, 0.2);
}

.product-card .img-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: #fdfdfd;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-card .img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .img-wrapper img {
    transform: scale(1.06);
}

.badges-container {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
    pointer-events: none;
}

.category-badge {
    background: rgba(25, 118, 210, 0.9);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.offer-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(216, 27, 96, 0.3);
}

.product-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7em;
    cursor: pointer;
}

.product-card h3:hover {
    color: var(--primary-color);
}

.product-card .price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.product-card .price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.product-card .btn-group {
    display: flex;
    gap: 8px;
}

.btn-add {
    flex: 1;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-add:hover {
    background: #1565c0;
    box-shadow: 0 3px 8px rgba(25, 118, 210, 0.3);
}

.btn-detail {
    background: #e3f2fd;
    color: var(--secondary-color);
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-detail:hover {
    background: #bbdefb;
}

/* Chips de Categorías */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.chip {
    background: var(--white);
    border: 1px solid #e0e0e0;
    color: var(--dark-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(216, 27, 96, 0.3);
}

/* Modal de Producto */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 680px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding: 24px;
    animation: slideUp 0.3s ease-out;
}

.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--gray-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close-btn:hover {
    background: var(--primary-color);
    color: white;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: center;
}

@media (max-width: 600px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.modal-img-container {
    background: #fdfdfd;
    border-radius: var(--radius-md);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    border: 1px solid var(--gray-light);
}

.modal-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.modal-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 14px;
    line-height: 1.45;
}

.modal-price-box {
    margin-bottom: 16px;
}

.modal-total-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.modal-unit-price {
    font-size: 0.82rem;
    color: var(--gray);
    margin-top: 2px;
}

.modal-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.modal-qty-row label {
    font-weight: bold;
    font-size: 0.9rem;
}

.modal-qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-qty-controls input {
    width: 50px;
    text-align: center;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
}

.modal-buttons-group {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.modal-add-btn,
.modal-whatsapp-btn {
    flex: 1;
    min-width: 150px;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.25);
}

.modal-add-btn:hover {
    background: #1565c0;
    transform: translateY(-1px);
}

.modal-whatsapp-btn {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.modal-whatsapp-btn:hover {
    background: #1eb857;
    transform: translateY(-1px);
}

/* Carrito Items con Thumbnail */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-light);
    padding: 12px 0;
    gap: 15px;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 4px;
}

.cart-qty-btn {
    background: var(--gray-light);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-qty-btn:hover {
    background: var(--secondary-color);
    color: white;
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 25px 20px;
    font-size: 0.9rem;
    margin-top: 40px;
}

.footer-content p {
    margin: 5px 0;
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

#topUpBtn {
    background-color: var(--dark-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

#topUpBtn.show {
    opacity: 1;
    visibility: visible;
}

#topUpBtn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.whatsapp-btn {
    background-color: #25D366;
    color: var(--white);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsivo */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar {
        max-width: 100%;
    }
    .header-contact {
        justify-content: space-between;
    }
}

/* Cart & Checkout Layout System */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.cart-items-card, .cart-summary-card {
    background: var(--white);
    padding: 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-light);
    padding: 14px 0;
    gap: 15px;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 4px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    color: var(--dark-color);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-info p {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-price {
    text-align: right;
    min-width: 75px;
}

.cart-item-price strong {
    color: var(--primary-color);
    font-size: 1.05rem;
}

/* Checkout Form Component */
.checkout-wrapper {
    max-width: 620px;
    margin: 0 auto;
}

.checkout-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.checkout-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 25px;
}

.checkout-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-color);
    display: block;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    background: white;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(216, 27, 96, 0.15);
}

.checkout-notice {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1b5e20;
    line-height: 1.4;
}

.checkout-notice strong {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.checkout-submit-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.checkout-submit-btn:hover {
    background: #128C7E;
}