/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #1a1a1a;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: #0d0d0d;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    padding: 1rem 0;
    border-bottom: 1px solid #333;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================
   ESTILOS PARA EL LOGO
   ========================================== */

/* Contenedor del logo */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Imagen del logo (icono triangular) */
.logo-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    display: block;
}

/* Contenedor del texto del logo */
.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Título SUPLEMENTOS DZ */
.logo-text h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Subtítulo del logo */
.logo-tagline {
    margin: 0;
    font-size: 13px;
    color: #7ed321;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Responsive para tablets */
@media (max-width: 768px) {
    .logo {
        gap: 10px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .logo-tagline {
        font-size: 11px;
    }
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .logo {
        gap: 8px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-text h1 {
        font-size: 16px;
    }
    
    .logo-tagline {
        font-size: 9px;
    }
}

.search-bar {
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
    margin: 0 2rem;
}

.search-bar input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.search-bar button {
    padding: 0.8rem 1.2rem;
    background: #000;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.header-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.icon-link {
    color: #ffffff;
    font-size: 1.2rem;
    text-decoration: none;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Cart Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #1a1a1a;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0.5rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: calc(100vh - 280px); /* Limita la altura para que el footer sea visible */
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 3rem 1rem;
    font-size: 1.1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.quantity-controls button {
    background: #2c3e50;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.quantity-controls button:hover {
    background: #34495e;
    transform: scale(1.1);
}

.quantity-controls span {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.remove-item:hover {
    color: #c82333;
    transform: scale(1.2);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #333;
    position: relative;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain; /* Cambiado de cover a contain para no recortar */
    border-radius: 4px;
    margin-right: 1rem;
    background: #2a2a2a; /* Fondo para imágenes con transparencia */
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: #7ed321;
    font-size: 0.9rem;
}

.cart-footer {
    padding: 1rem 1.5rem;
    border-top: 2px solid #333;
    background: #0d0d0d;
    flex-shrink: 0; /* No se encoge */
    position: sticky;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.whatsapp-order {
    width: 100%;
    padding: 0.9rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.whatsapp-order:hover {
    background: #128C7E;
}

.clear-cart {
    width: 100%;
    padding: 0.8rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.clear-cart:hover {
    background: #c82333;
}

/* Navegación Principal */
.main-nav {
    background: #0d0d0d;
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
}

/* Botón hamburguesa - OCULTO en desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #7ed321;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    border-radius: 4px;
    padding: 0.5rem 0;
    border: 1px solid #333;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #2a2a2a;
    color: #7ed321;
}

/* Sección de Productos */
.products-section {
    padding: 2rem 0;
    margin-top: 2rem;
}

.products-section h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.products-count {
    color: #999;
    margin-bottom: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.product-card {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: none;
}

.product-card:hover {
    background: #2a2a2a;
    box-shadow: 0 4px 15px rgba(126, 211, 33, 0.3);
    border: 1px solid #7ed321;
}

/* ==========================================
   ESTILOS ACTUALIZADOS PARA IMÁGENES DE PRODUCTOS
   ========================================== */
.product-card img {
    width: 100%;
    height: 350px; /* Altura fija para todas las imágenes - MÁS GRANDE */
    object-fit: contain; /* Mantiene la proporción sin recortar */
    object-position: center;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    background: transparent; /* Sin fondo blanco */
}

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

.product-card h3 {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-card .price {
    font-size: 1.5rem;
    color: #7ed321;
    font-weight: 700;
    margin: 1rem 0;
}

.product-card .price-range {
    color: #999;
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.add-to-cart {
    background: #7ed321;
    color: #000;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.add-to-cart:hover {
    background: #6bb01a;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #000;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    margin: 0 auto;
}

.footer-section h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 8px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    border: 1px solid #333;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #1a1a1a;
    z-index: 1;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: #ffffff;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 2rem;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.product-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.product-image:hover img {
    transform: scale(1.05);
}

.product-info > div {
    margin-bottom: 2rem;
}

.product-info h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

.price-section .price {
    font-size: 2rem;
    color: #7ed321;
    font-weight: 700;
    display: block;
    margin-bottom: 1.5rem;
}

.description-section p {
    color: #ccc;
    line-height: 1.6;
}

.flavors-section {
    margin-top: 1rem;
}

.flavors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Estilo para las opciones de sabor seleccionables */
.flavor-option {
    cursor: pointer;
    display: inline-block;
}

.flavor-option input[type="radio"] {
    display: none; /* Ocultar el radio button nativo */
}

.flavor-tag {
    background-color: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Cuando el sabor está seleccionado */
.flavor-option input[type="radio"]:checked + .flavor-tag {
    background-color: #7ed321;
    color: #000;
    border-color: #7ed321;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(126, 211, 33, 0.5);
}

/* Hover effect */
.flavor-option:hover .flavor-tag {
    background-color: #3a3a3a;
    transform: translateY(-2px);
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #2a2a2a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
}

.benefits-list li i {
    color: #7ed321;
}

.nutrition-info {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 8px;
    color: #ffffff;
}

.nutrition-info div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #3a3a3a;
}

.nutrition-info div:last-child {
    border-bottom: none;
}

.dosage-section p {
    color: #ccc;
    line-height: 1.6;
    padding: 1rem;
    background: #2a2a2a;
    border-radius: 4px;
}

.modal-actions {
    margin-top: 2rem;
}

.add-to-cart-modal {
    width: 100%;
    padding: 1rem;
    background: #7ed321;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-to-cart-modal:hover {
    background: #6bb01a;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .search-bar {
        display: none;
    }

    .header-icons .icon-link:not(.cart) {
        display: none;
    }

    /* MOSTRAR ícono de cuenta en móvil */
    .account-menu-wrap {
        display: flex !important;
    }

    .account-btn {
        font-size: 22px !important;
        color: #ccc;
        padding: 4px 6px !important;
    }

    .account-dropdown {
        right: -8px !important;
        min-width: 250px !important;
    }

    /* MOSTRAR botón hamburguesa en móviles */
    .mobile-menu-btn {
        display: block;
    }

    /* Menú móvil */
    .main-nav .container {
        position: relative;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a1a1a;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.5);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
        border: 1px solid #333;
    }

    .nav-links.show {
        max-height: 500px;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #333;
    }

    .nav-links > li > a {
        display: block;
        padding: 1rem 1.5rem;
    }

    /* Dropdown en móviles */
    .dropdown-content {
        position: static;
        box-shadow: none;
        background: #0d0d0d;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border: none;
    }

    .dropdown.open .dropdown-content {
        max-height: 400px;
    }

    .dropdown-content a {
        padding: 0.8rem 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-card {
        padding: 0.5rem !important;
    }

    .product-card img {
        height: 130px !important;
        width: 100% !important;
        object-fit: contain !important;
    }

    .product-card h3 {
        font-size: 0.75rem !important;
        min-height: auto;
        margin: 0.3rem 0 !important;
        line-height: 1.3 !important;
    }

    .product-card .price {
        font-size: 1rem !important;
        margin: 0.2rem 0 !important;
    }

    .add-to-cart {
        padding: 0.5rem 0.3rem !important;
        font-size: 0.7rem !important;
        width: 100% !important;
    }

    .product-details {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .product-image {
        max-height: 300px;
    }

    .product-image img {
        object-fit: contain;
        height: 100%;
    }

    /* MEJORAS PARA EL CARRITO EN MÓVIL */
    .cart-sidebar {
        max-width: 100%;
        right: -100%;
    }

    .cart-header {
        padding: 1rem;
    }

    .cart-header h3 {
        font-size: 1.1rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        position: relative;
    }

    .cart-item img {
        width: 80px;
        height: 80px;
        margin-bottom: 0.5rem;
        align-self: center;
        object-fit: contain; /* Cambiado para no recortar */
        background: #2a2a2a;
    }

    .cart-item-details {
        width: 100%;
    }

    .cart-item-details h4 {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        padding-right: 30px; /* Espacio para el botón de eliminar */
    }

    .cart-item-price {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .quantity-controls {
        gap: 0.8rem;
        margin-top: 0.5rem;
        justify-content: flex-start;
    }

    .quantity-controls button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .quantity-controls span {
        font-size: 1rem;
        min-width: 30px;
    }

    .remove-item {
        position: absolute;
        top: 1rem;
        right: 1rem;
        padding: 0.5rem;
        font-size: 1.2rem;
    }

    .cart-footer {
        padding: 1rem;
    }

    .cart-total {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #eee;
    }

    .whatsapp-order,
    .clear-cart {
        padding: 1rem;
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.8rem;
    }

    .whatsapp-order i,
    .clear-cart i {
        font-size: 1.3rem;
    }

    /* Asegurar que los textos de los botones se vean completos */
    .whatsapp-order {
        white-space: normal;
        line-height: 1.4;
        min-height: 50px;
    }

    .clear-cart {
        white-space: nowrap;
        min-height: 50px;
    }

    .empty-cart {
        padding: 2rem 1rem;
        font-size: 1rem;
    }
}

/* Image Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
