@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
    /* Tema Oscuro (Por defecto) */
    --bg-main: #0a0a0a;
    --bg-secondary: #141414;
    --text-main: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #d4af37; /* Dorado clásico */
    --accent-hover: #f1c94b;
    --border-color: #333333;
    --shadow: rgba(0, 0, 0, 0.5);
    --hero-bg: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
}

html[data-theme="light"] {
    /* Tema Claro - Elegante y consistente en todos los navegadores */
    --bg-main: #f4efe6;        /* Fondo marfil/champán suave */
    --bg-secondary: #ffffff;   /* Blanco puro para tarjetas (resalta en Chrome, Firefox y Móviles) */
    --text-main: #2b251f;      /* Texto oscuro legible */
    --text-secondary: #6e6354;  /* Texto secundario cálido */
    --accent: #c8a850;         /* Dorado */
    --accent-hover: #b3923b;
    --border-color: #e2d9cc;
    --shadow: rgba(0, 0, 0, 0.08);
    --hero-bg: linear-gradient(180deg, #ffffff 0%, #f4efe6 100%);
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: top 0.3s ease; /* Para la animación de ocultar/mostrar */
}

.logo-container img {
    height: 80px; /* Aumentado para mejor visibilidad */
    display: none; /* Ocultamos ambos por defecto */
}

/* Controlar qué logo se ve según el tema */
html[data-theme="light"] .logo-container .logo-light {
    display: block;
}

html:not([data-theme="light"]) .logo-container .logo-dark {
    display: block;
}

/* Si el usuario aún no tiene la imagen configurada, mostramos un fallback */
.logo-text-fallback {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-main);
    text-decoration: none;
}
.logo-container img + .logo-text-fallback {
    display: none; /* Si falla, ocultamos el texto. En JS controlamos si hay imagen. */
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1 1 0; /* Asegura el ancho exacto en todos los navegadores */
}

.nav-right {
    justify-content: flex-end;
    gap: 20px;
}

.nav-center {
    display: flex;
    justify-content: center;
    flex: 1;
}

.nav-left a {
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

.nav-left a:hover {
    color: var(--accent);
}

/* Dropdown de Navegación */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    padding: 10px 0;
}

.nav-dropdown-toggle .dropdown-arrow {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle {
    color: var(--accent);
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 10px 30px var(--shadow);
    min-width: 210px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 12px;
    letter-spacing: 1.5px;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-main);
    color: var(--accent);
}


.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.icon-btn:hover {
    color: var(--accent);
}

/* HERO SECTION */
.hero {
    position: relative;
    text-align: center;
    min-height: calc(100vh - 80px); /* 80px es aproximadamente la altura del navbar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #111;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-bg-carousel {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.hero-bg-carousel .slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeCarousel 16s infinite;
}

.hero-bg-carousel .slide::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.65); /* Overlay oscuro para legibilidad */
}

.hero-bg-carousel .slide:nth-child(1) { animation-delay: 0s; }
.hero-bg-carousel .slide:nth-child(2) { animation-delay: 4s; }
.hero-bg-carousel .slide:nth-child(3) { animation-delay: 8s; }
.hero-bg-carousel .slide:nth-child(4) { animation-delay: 12s; }

@keyframes fadeCarousel {
    0%   { opacity: 0; transform: scale(1.05); }
    10%  { opacity: 1; transform: scale(1.03); }
    25%  { opacity: 1; transform: scale(1.0); }
    35%  { opacity: 0; transform: scale(0.98); }
    100% { opacity: 0; transform: scale(0.98); }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero h2 {
    font-size: 50px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.hero p {
    color: #e0e0e0;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 18px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

/* GRID & CARDS */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 60px;
    max-width: 1200px;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.card {
    background-color: var(--bg-secondary);
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow);
    border-color: var(--border-color);
}

.card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.05); /* Micro-animación de zoom interno */
}

.img-container {
    overflow: hidden;
    border-radius: 4px;
}

.card h3 {
    font-weight: 400;
    margin: 25px 0 10px;
    font-size: 20px;
    letter-spacing: 1px;
}
.price-container {
    position: relative;
    height: 30px;
    overflow: hidden;
    margin-top: 5px;
}

.price, .buy-now {
    transition: transform 0.4s ease, opacity 0.4s ease;
    position: absolute;
    width: 100%;
    left: 0;
    text-align: center;
}

.price {
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 18px;
    transform: translateY(0);
    opacity: 1;
}

.buy-now {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1.5px;
    transform: translateY(100%);
    opacity: 0;
    padding-top: 4px;
}

.card:hover .price {
    transform: translateY(-100%);
    opacity: 0;
}

.card:hover .buy-now {
    transform: translateY(0);
    opacity: 1;
}

/* PAGES CONTENEDOR COMÚN */
.page-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    line-height: 1.8;
}

.page-container h1 {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--accent);
}

.page-container p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 40px;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.footer-admin-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.footer-admin-link:hover {
    color: var(--accent);
}

/* FILTERS & SORTING */
.filters-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 60px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 100px;
}

.filter-btn {
    color: var(--text-main);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background-color: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
}

.filter-btn.sub-btn {
    font-size: 12px;
    padding: 6px 12px;
}

.sort-row {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    justify-content: flex-end;
}

.sort-select {
    background-color: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.sort-select:hover {
    border-color: var(--accent);
}

/* MODAL PRODUCTO */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 95%;
    max-width: 1250px; /* Escalado masivo para mayor tamaño */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px var(--shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.close-modal:hover { color: var(--accent); }

.modal-body {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.modal-gallery {
    flex: 0 0 45%;
    max-width: 45%;
    padding: 30px;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#modal-img-main {
    width: 100%;
    max-width: 450px; /* Reducido para que entre en pantallas chicas */
    aspect-ratio: 1 / 1; /* Cuadrado perfecto, soluciona imágenes horizontales */
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px var(--shadow);
    object-fit: cover;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.thumbnail-gallery .thumb {
    width: 70px; /* Aumentado */
    height: 70px; /* Aumentado */
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s;
}

.thumbnail-gallery .thumb:hover, .thumbnail-gallery .thumb.active {
    opacity: 1;
    border-color: var(--accent);
}

.modal-details {
    flex: 1 1 55%;
    max-width: 55%;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

#modal-title {
    font-size: 34px; /* Aumentado */
    font-weight: 300;
    margin-bottom: 15px;
    color: var(--text-main);
}

.modal-price {
    font-size: 30px; /* Aumentado */
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 30px;
}

.modal-characteristics {
    margin-bottom: 30px;
}
.modal-characteristics h4 {
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 18px; /* Aumentado */
    text-transform: uppercase;
    letter-spacing: 1px;
}
.modal-characteristics ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.modal-characteristics li {
    margin-bottom: 12px;
    font-size: 16px; /* Aumentado */
    color: var(--text-secondary);
}

.modal-actions {
    margin-top: auto;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    border: none;
    padding: 12px 20px; /* Aumentado */
    font-size: 22px; /* Aumentado */
    cursor: pointer;
    transition: background 0.2s;
}
.qty-btn:hover { background-color: var(--border-color); }

#modal-qty {
    width: 60px; /* Aumentado */
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 18px; /* Aumentado */
    -moz-appearance: textfield;
}
#modal-qty::-webkit-outer-spin-button,
#modal-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-main);
    border: 1px solid var(--accent);
    padding: 15px 30px; /* Aumentado */
    font-size: 16px; /* Aumentado */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-radius: 4px;
    flex-grow: 1;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* EXTENDED FOOTER */
.site-footer {
    background-color: var(--bg-secondary);
    padding: 60px 40px 30px;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-col h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: var(--text-main);
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li {
    margin-bottom: 12px;
}
.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}
.footer-col a:hover {
    color: var(--accent);
}
.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}
.payment-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.whatsapp-float {
    position: fixed;
    bottom: 60px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s;
}
.whatsapp-float:hover {
    transform: scale(1.1);
}

/* CART DRAWER */
.cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1050;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.cart-overlay.show { opacity: 1; visibility: visible; }

.cart-drawer {
    position: fixed; top: 0; right: -400px;
    width: 100%; max-width: 400px; height: 100vh;
    background-color: var(--bg-main);
    z-index: 1100;
    box-shadow: -5px 0 30px var(--shadow);
    display: flex; flex-direction: column;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-drawer.open { right: 0; }

.cart-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid var(--border-color);
}
.cart-header h3 { font-size: 20px; font-weight: 500; margin: 0; color: var(--text-main); }
.close-cart { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text-main); }

.cart-items {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 15px;
}
.cart-item {
    display: flex; gap: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px;
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; }
.cart-item-details { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cart-item-title { font-size: 14px; margin: 0 0 5px 0; color: var(--text-main); }
.cart-item-price { color: var(--accent); font-weight: 500; font-size: 14px; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.cart-qty-btn { background: var(--bg-secondary); border: none; color: var(--text-main); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: flex; justify-content: center; align-items: center; }
.cart-remove { background: none; border: none; color: #ff4444; font-size: 12px; cursor: pointer; margin-top: 5px; text-align: left; padding: 0; }

.cart-footer {
    padding: 20px; border-top: 1px solid var(--border-color); background-color: var(--bg-secondary);
}
.cart-total {
    display: flex; justify-content: space-between; font-size: 18px; font-weight: 500; margin-bottom: 20px; color: var(--text-main);
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 3;
    animation: bounce 2s infinite;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 500;
    transition: color 0.3s;
}
.scroll-indicator:hover {
    color: #fff;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}


/* ========================================= */
/*      MOBILE SIDE DRAWER (OFF-CANVAS)      */
/* ========================================= */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 310px;
    max-width: 86vw;
    height: 100%;
    background: var(--bg-main);
    color: var(--text-main);
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 6px 0 35px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.mobile-side-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.mobile-menu-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-main);
}

.mobile-menu-title img {
    height: 32px;
    width: auto;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-menu-close:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.mobile-menu-body {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover, .mobile-nav-link:active {
    background: var(--bg-secondary);
    color: var(--accent);
    padding-left: 26px;
}

.mobile-nav-link.user-greet {
    background: var(--bg-secondary);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.mobile-nav-link.secondary {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 11px 22px;
}

.mobile-nav-link.secondary:hover {
    color: var(--accent);
}

/* Acordeón Información en el menú lateral */
.mobile-menu-accordion {
    border-bottom: 1px solid var(--border-color);
}

.mobile-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-accordion-toggle:hover,
.mobile-menu-accordion.active .mobile-accordion-toggle {
    color: var(--accent);
    background: var(--bg-secondary);
}

.mobile-accordion-toggle .accordion-arrow {
    transition: transform 0.3s ease;
}

.mobile-menu-accordion.active .mobile-accordion-toggle .accordion-arrow {
    transform: rotate(180deg);
}

.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: max-height 0.35s ease;
}

.mobile-menu-accordion.active .mobile-accordion-content {
    max-height: 260px;
}

.mobile-accordion-content a {
    display: block;
    padding: 12px 22px 12px 34px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-accordion-content a:hover {
    color: var(--accent);
    padding-left: 38px;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.mobile-menu-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 11px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.mobile-whatsapp-btn:hover {
    background: #20bd5a;
}

.mobile-menu-copyright {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

/* ========================================= */
/*       MOBILE RESPONSIVE STYLES (100%)     */
/* ========================================= */

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    color: var(--text-main);
    z-index: 101;
}

@media (max-width: 992px) {
    /* Navbar móvil elegante y espacioso */
    nav {
        padding: 12px 18px;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        background: transparent;
        border: none;
        cursor: pointer;
        color: var(--text-main);
        padding: 6px;
        flex: 1 1 0;
    }
    
    .mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* El menú antiguo se oculta: ahora se usa el Drawer Lateral */
    .nav-left {
        display: none !important;
    }
    
    .nav-center {
        flex: 2;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo-container img {
        height: 48px; /* Proporción refinada para no apretar los iconos */
    }

    .nav-right {
        flex: 1 1 0;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px; /* Espaciado balanceado sin apretar */
    }

    .nav-right .icon-btn {
        padding: 5px;
    }

    .nav-right .icon-btn svg {
        width: 18px;
        height: 18px;
    }

    
    /* Hero Section */
    .hero {
        padding: 60px 15px;
        min-height: calc(100vh - 60px);
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 15px;
        padding: 0 10px;
    }
    
    /* Grid de Productos */
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
        padding: 20px 15px;
    }
    
    /* Filtros */
    .filters-container {
        padding: 15px;
    }
    
    .filter-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Footer */
    footer .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    footer .footer-social, footer .footer-payments {
        justify-content: center;
    }
    
    /* Modales (Carrito, Login, Producto) */
    .modal-content, #cart-modal .cart-content, .login-card {
        width: 95%;
        margin: 20px auto;
        padding: 20px 15px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-item-remove {
        align-self: flex-end;
    }
}

/* Reglas específicas para pantallas medianas/pequeñas y celulares (<= 768px) */
@media (max-width: 768px) {
    /* Grid de Productos en Celulares (2 por fila) */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px 10px;
    }

    .card {
        padding: 12px;
    }

    .card img {
        height: 180px;
    }

    .card h3 {
        font-size: 14px;
        margin: 12px 0 6px;
    }

    .price {
        font-size: 14px;
    }

    .buy-now {
        font-size: 11px;
    }

    /* Modal de Producto compacto y LADO A LADO en Celulares/Ventanas Divididas */
    .modal-content {
        width: 96%;
        max-width: 900px;
        max-height: 90vh;
        margin: 10px auto;
        padding: 15px 10px;
    }

    .modal-body {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 12px;
    }

    .modal-gallery {
        flex: 0 0 42%;
        max-width: 42%;
        padding: 5px;
        background-color: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #modal-img-main {
        width: 100%;
        max-height: 200px;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 4px;
        margin-bottom: 8px;
    }

    .thumbnail-gallery {
        gap: 4px;
    }

    .thumbnail-gallery .thumb {
        width: 38px;
        height: 38px;
    }

    .modal-details {
        flex: 1 1 58%;
        max-width: 58%;
        padding: 0 5px 5px 5px;
        display: flex;
        flex-direction: column;
    }

    #modal-title {
        font-size: 18px;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .modal-price {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .modal-characteristics {
        margin-bottom: 12px;
    }

    .modal-characteristics h4 {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .modal-characteristics li {
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .modal-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: auto;
    }

    .quantity-selector {
        align-self: flex-start;
    }

    .qty-btn {
        padding: 6px 12px;
        font-size: 16px;
    }

    #modal-qty {
        width: 35px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 10px 12px;
        font-size: 12px;
        letter-spacing: 0.5px;
        width: 100%;
        text-align: center;
    }
}

/* Pantallas extra pequeñas / Celulares reducidos (<= 480px) */
@media (max-width: 480px) {
    nav {
        padding: 10px 12px;
    }
    .logo-container img {
        height: 40px; /* Logo más estilizado y proporcional */
    }
    .mobile-menu-btn {
        padding: 4px;
    }
    .mobile-menu-btn svg {
        width: 20px;
        height: 20px;
    }
    .nav-right {
        gap: 4px; /* Separación perfecta sin apretar */
    }
    .nav-right .icon-btn {
        padding: 4px;
    }
    .nav-right .icon-btn svg {
        width: 16px;
        height: 16px; /* Iconos más compactos para que respiren */
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px 5px;
    }

    .card {
        padding: 8px;
    }

    .card img {
        height: 150px;
    }

    .card h3 {
        font-size: 13px;
        margin: 10px 0 4px;
        line-height: 1.2;
    }

    .price {
        font-size: 13px;
    }

    .modal-gallery {
        flex: 0 0 40%;
        max-width: 40%;
    }

    #modal-img-main {
        max-height: 150px;
    }

    .thumbnail-gallery .thumb {
        width: 30px;
        height: 30px;
    }

    .modal-details {
        flex: 1 1 60%;
        max-width: 60%;
    }

    #modal-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .modal-price {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .modal-characteristics h4 {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .modal-characteristics li {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .qty-btn {
        padding: 4px 8px;
        font-size: 14px;
    }

    #modal-qty {
        width: 30px;
        font-size: 13px;
    }

    .btn-primary {
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* ========================================= */
/*       ADMIN SIDEBAR LAYOUT STYLES         */
/* ========================================= */

.admin-layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-main);
    position: relative;
    overflow-x: hidden;
}

.admin-sidebar {
    width: 250px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.25);
}

.admin-sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-sidebar-brand {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.admin-sidebar-brand span {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-sidebar-hide-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.admin-sidebar-hide-btn:hover {
    color: var(--accent);
    background: var(--bg-main);
}

.admin-sidebar-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.admin-sidebar-item {
    margin-bottom: 4px;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar-link:hover, .admin-sidebar-link.active {
    color: var(--accent);
    background-color: rgba(212, 175, 55, 0.08);
    border-left-color: var(--accent);
}

.admin-sidebar-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.15);
}

.admin-caja-status-box {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    font-size: 11px;
}

.admin-caja-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.admin-main-container {
    flex: 1;
    margin-left: 250px;
    padding: 20px 25px;
    min-height: 100vh;
    width: calc(100% - 250px);
    max-width: calc(100% - 250px);
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

/* ESTADO CUANDO LA BARRA ESTÁ OCULTA/COLAPSADA */
.admin-layout-wrapper.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
}

.admin-layout-wrapper.sidebar-collapsed .admin-main-container {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
}

/* BARRA SUPERIOR DEL ADMIN */
.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-sidebar-toggle-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.admin-sidebar-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px);
    z-index: 1045;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}

.admin-sidebar-overlay.show {
    opacity: 1; visibility: visible;
}

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main-container {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 15px 12px;
    }
}

/* Banner de Consentimiento de Cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.4);
    padding: 16px 24px;
    transition: opacity 0.3s ease;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
    flex: 1;
    min-width: 280px;
}

.btn-cookie-accept {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 10px 22px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.btn-cookie-accept:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
