/* ======== VARIABLES GLOBALES Y RESET ======== */
:root {
    --color-principal: #D9AAB7;
    --color-blanco: #FFFFFF;
    --color-negro: #000000;
    --font-titulos: 'Playfair Display', serif;
    --font-texto: 'Cinzel', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-texto);
    color: var(--color-negro);
    background-color: var(--color-blanco);
     
}

/* ======== ESTILOS GENERALES (Botones, etc.) ======== */
.btn {
    background-color: var(--color-principal);
    color: var(--color-blanco);
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    font-family: var(--font-texto);
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #BE96A4;
}

.btn-add-to-cart {
    background-color: var(--color-principal);
    color: var(--color-blanco);
    width: 100%;
    padding: 12px;
    border: none;
    cursor: pointer;
    font-family: var(--font-texto);
    text-transform: uppercase;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.btn-add-to-cart:hover {
    background-color: #BE96A4;
}

/* ======== HEADER ======== */
.header {
    background-color: var(--color-blanco);
    border-bottom: 1px solid #eee;
    padding: 0 5%; /* Ajustamos padding */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    height: 80px; /* Altura fija para el header */
}

.logo {
    flex-shrink: 0;
}

/* --- ESTILOS PARA EL NUEVO MENÚ --- */
.nav-main {
    height: 100%;
}
.nav-list {
    display: flex;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    text-decoration: none;
    color: var(--color-negro);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s, background-color 0.3s;
}
.nav-link:hover {
    color: var(--color-principal);
}
.nav-link .arrow-down { /* Flecha para indicar submenú */
    border: solid var(--color-negro);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-left: 8px;
    transition: transform 0.3s;
}

/* --- ESTILOS PARA EL SUBMENÚ DESPLEGABLE (ESCRITORIO) --- */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-blanco);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}
.submenu-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--color-negro);
    font-size: 0.9rem;
}
.submenu-link:hover {
    background-color: #f7f7f7;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.nav-icons .icon-button {
    background: none;
    border: none;
    cursor: pointer;
}

/* ======== BOTÓN HAMBURGUESA (CON ESTILO MEJORADO) ======== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1011;
    order: 3;
}

.hamburger-btn .bar {
    height: 3px;
    width: 100%;
    background-color: var(--color-negro);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* ========================================================== */
/* ======== CARRITO LATERAL (ESTILOS CORREGIDOS) ======== */
/* ========================================================== */
.carrito-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 380px;
    max-width: 90vw; /* Asegura que no sea demasiado ancho en móviles */
    height: 100%;
    background-color: var(--color-blanco);
    box-shadow: -4px 0 15px rgba(0,0,0,0.15);
    z-index: 1002;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}

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

.carrito-sidebar h2 {
    font-family: var(--font-titulos);
    text-align: center;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #eee;
    flex-shrink: 0; /* No permite que el título se encoja */
}

/* NUEVO: Contenedor para el contenido desplazable */
.carrito-scroll-content {
    flex-grow: 1; /* Ocupa todo el espacio disponible */
    overflow-y: auto; /* AÑADE EL SCROLL */
    padding: 20px;
}

/* MODIFICADO: ya no necesita overflow ni flex-grow */
.carrito-items {
    padding-bottom: 20px; /* Espacio antes del formulario */
}

.carrito-item {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

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

.carrito-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}
.carrito-item-info { flex-grow: 1; }
.carrito-item-info h4 { font-size: 1rem; margin: 0 0 5px; }
.carrito-item-info p { font-size: 0.9rem; color: #555; margin: 0;}
.btn-remove-from-cart { 
    background: none; 
    border: none; 
    color: #E35F5F; 
    cursor: pointer; 
    font-size: 1.5rem;
    padding: 5px;
}

/* NUEVO: Estilos para el formulario de checkout (movidos desde layout.html) */
.checkout-form {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.checkout-form .checkout-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}
.checkout-form .form-group {
    margin-bottom: 12px;
}
.checkout-form .form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #555;
}
.checkout-form .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* MODIFICADO: pie del carrito */
.carrito-total {
    border-top: 2px solid #ddd;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    flex-shrink: 0; /* No permite que el pie se encoja */
}
.carrito-total p { 
    font-size: 1.2rem; 
    font-weight: bold;
    margin: 0; 
}
.btn-checkout {
    width: 100%;
    margin-top: 15px;
    background-color: var(--color-principal);
    color: var(--color-blanco);
    padding: 15px;
    border: none;
    cursor: pointer;
    font-family: var(--font-texto);
    text-transform: uppercase;
}
.btn-checkout:hover{
    background-color:#BE96A4;
}

/* ======== MODAL LOGIN ======== */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 40px;
    border: 1px solid #888;
    width: 90%;
    max-width: 450px;
    position: relative;
    text-align: center;
}

.modal-content h2 { font-family: var(--font-titulos); margin-bottom: 20px; }
.modal-content form { display: flex; flex-direction: column; }
.modal-content label { text-align: left; margin: 10px 0 5px; }
.modal-content input { padding: 10px; margin-bottom: 20px; border: 1px solid #ccc; }
.close-btn {
    color: #000000;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}


/* ======== PÁGINA PRINCIPAL: HERO Y PRODUCTOS ======== */

.hero {
    position: relative; /* Esencial para que las capas se posicionen correctamente */
    min-height: 50vh;  /* Puedes ajustar esta altura para escritorio */
    overflow: hidden;  /* Oculta los bordes del fondo desenfocado */
    /* IMPORTANTE: Quitamos la imagen de aquí para evitar conflictos */
}

/* 2. La capa de fondo (DETRÁS) que estará desenfocada */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* Capa de fondo, la ponemos detrás */

    background-image: url('../img/hero-imagen.jpeg');
    background-size: cover;
    background-position: center;
    filter: blur(15px); /* El efecto de desenfoque */
    transform: scale(1.1); /* Evita bordes nítidos en el desenfoque */
}

/* 3. La capa de la imagen principal (DELANTE) que estará nítida */
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2; /* Capa principal, la ponemos delante de todo */

    background-image: url('../img/hero-imagen.jpeg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


/* ======== ESTILOS PARA ÍCONOS SVG EN HEADER ======== */
.nav-icons .icon-button svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-negro);
    vertical-align: middle;
}

#cart-btn {
    position: relative;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--color-principal);
    color: var(--color-blanco);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ======== ESTILOS PARA FILTROS DE PRODUCTOS ======== */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap; 
    gap: 20px;
}

.product-header h2 {
    margin-bottom: 0;
}

.product-filters {
    display: flex;
    gap: 15px;
}

.product-filters input,
.product-filters select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-texto);
    font-size: 0.9rem;
}

.product-category {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}
.product-category h2 {
    font-family: var(--font-titulos);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

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

.product-card {
    text-align: center;
}
.product-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    margin-bottom: 15px;
    display: block;
}
.product-card h3 {
    font-family: var(--font-titulos);
    font-size: 1.4rem;
    margin-bottom: 5px;
}
.product-card .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-principal);
}


/* ======== SECCIÓN DE CATEGORÍAS DESTACADAS ======== */
.featured-categories {
    padding: 60px 5%;
}

.section-title {
    font-family: var(--font-titulos);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-negro);
}

.category-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: var(--color-blanco);
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 15px rgba(217, 170, 183, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.category-card-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card h3 {
    padding: 20px 15px;
    margin: 0;
    font-family: var(--font-titulos);
    font-size: 1.4rem;
    color: var(--color-negro);
}


/* ======== PÁGINA DE PRODUCTO INDIVIDUAL ======== */
.product-page-main {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}
.main-product-image {
    width: 100%;
}
.product-info h1 { font-family: var(--font-titulos); font-size: 2.8rem; margin-bottom: 15px; }
.product-info .product-price { font-size: 1.8rem; color: var(--color-principal); margin-bottom: 20px; font-weight: bold; }
.product-info .product-description { line-height: 1.7; margin-bottom: 30px; }
.product-actions { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.product-actions input[type="number"] { width: 60px; padding: 10px; text-align: center; }
.product-specs { border-top: 1px solid #eee; padding-top: 20px; }
.product-specs h4 { font-family: var(--font-titulos); font-size: 1.2rem; margin-bottom: 10px; }
.product-specs ul { list-style: none; padding-left: 0; }
.product-specs li { margin-bottom: 8px; }
.option-select option:hover{
    background-color: var(--color-principal);
}

/* ======== FOOTER ======== */
.footer {
    background-color: var(--color-negro);
    color: var(--color-blanco);
    padding: 60px 5%;
    text-align: center;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.subscribe-section { margin-bottom: 40px; }
.subscribe-section h3 { font-family: var(--font-titulos); font-size: 2rem; margin-bottom: 10px; }
.subscribe-form { display: flex; justify-content: center; margin-top: 20px; }
.subscribe-form input {
    width: 300px;
    padding: 12px;
    border: 1px solid var(--color-blanco);
    background: transparent;
    color: var(--color-blanco);
}
.subscribe-form input::placeholder { color: #ccc; }

.footer-links {
    margin-bottom: 30px;
}

.footer-links a {
    color: var(--color-blanco);
    text-decoration: none;
    display: block; 
    padding: 8px 0; 
}

.footer-copy { font-size: 0.9rem; color: #aaa; }

/* ======== DISEÑO RESPONSIVE ======== */
@media (max-width: 992px) {
    .nav-main { display: none; }
    .hamburger-btn { display: flex; }

    .nav-main.active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--color-blanco);
        z-index: 1010;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 80px 30px 40px 30px;
        overflow-y: auto;
    }
    
    .nav-main.active .nav-list {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        height: auto;
    }

    .nav-main.active .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-main.active .nav-link {
        width: 100%;
        height: auto;
        padding: 20px 0;
        font-size: 1.2rem;
        justify-content: space-between;
    }
    
    .nav-main.active .submenu {
        position: static;
        box-shadow: none;
        background-color: transparent;
        padding-left: 20px;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    
    .nav-main.active .has-submenu.active > .submenu {
        max-height: 300px;
        opacity: 1;
        visibility: visible;
    }

    .nav-main.active .has-submenu.active > .nav-link .arrow-down {
        transform: rotate(225deg);
    }

    .nav-main.active .submenu.active {
        display: block;
        max-height: 500px;
    }

    .nav-main.active .submenu-link {
        width: 100%;
        padding: 12px 0;
        font-size: 1rem;
        color: #555;
    }
     .nav-main.active .submenu li:not(:last-child) {
         border-bottom: 1px solid #f5f5f5;
     }

    .product-detail-container {
        grid-template-columns: 1fr;
    }
    .product-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        aspect-ratio: 16 / 9;
    }

    .hero::before {
        display: none;
    }



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

@media (max-width: 480px) {
    .subscribe-form {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .subscribe-form input {
        width: 100%;
        margin-bottom: 10px;
    }
     .subscribe-form .btn {
        width: 100%;
    }
    
    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ======== ESTILOS EXCLUSIVOS PARA ESCRITORIO ======== */
@media (min-width: 768px) {
    .footer-links a {
        display: inline; 
        padding: 0; 
        margin: 0 15px;
    }
}


@media (min-width: 993px) {
    .nav-item.has-submenu:hover > .submenu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-item.has-submenu:hover .arrow-down {
        transform: rotate(225deg);
    }
}

/* ==================================================================== */
/* ======== NUEVOS ESTILOS PARA CONTROLES DE CANTIDAD (ATRACTIVOS) ======== */
/* ==================================================================== */
.carrito-item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

.carrito-item-info h4 {
    margin: 0 0 4px;
}

.carrito-item-info .price {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: #666;
}

/* Contenedor para los botones de +/- y el input */
.cart-item-quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 30px;
    width: fit-content;
}

.cart-item-quantity-controls .btn-quantity {
    background-color: transparent;
    border: none;
    color: var(--color-principal);
    cursor: pointer;
    font-weight: bold;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    line-height: 32px;
    text-align: center;
    padding: 0;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 50%;
}

.cart-item-quantity-controls .btn-quantity:hover {
    background-color: var(--color-principal);
    color: var(--color-blanco);
}

/* Input de cantidad en el carrito */
.cart-item-quantity-controls .quantity-input {
    width: 35px;
    height: 30px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-negro);
    -moz-appearance: textfield;
}

.cart-item-quantity-controls .quantity-input::-webkit-outer-spin-button,
.cart-item-quantity-controls .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-remove-from-cart {
    align-self: center;
    margin-left: 10px;
}
@media (max-width: 992px) {
  /* Gira la flecha hacia arriba cuando el submenú está abierto */
  .nav-main.active .nav-item.has-submenu.open > .nav-link .arrow-down {
    transform: rotate(225deg);
  }
}

.flash-popup {
            position: fixed;
            bottom: 25px;
            right: 25px;
            z-index: 1050;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.4s ease, transform 0.4s ease;
            pointer-events: none;
        }
        .flash-popup.active {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        .flash-popup-content {
            background-color: #ffffff;
            color: #333;
            padding: 20px 40px 20px 25px;
            border-radius: 8px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.15);
            position: relative;
            min-width: 300px;
            max-width: 380px;
            border-left: 6px solid #6c757d; /* Borde gris por defecto */
        }
        /* Colores del borde según la categoría del mensaje */
        .flash-popup-content.flash-popup-success { border-left-color: #28a745; }
        .flash-popup-content.flash-popup-info { border-left-color: #17a2b8; }
        .flash-popup-content.flash-popup-warning { border-left-color: #ffc107; }
        .flash-popup-content.flash-popup-danger { border-left-color: #dc3545; }

        .flash-popup-message {
            margin: 0;
            font-weight: 500;
        }
        .flash-popup-close {
            position: absolute;
            top: 50%;
            right: 15px;
            transform: translateY(-50%);
            font-size: 26px;
            line-height: 1;
            font-weight: bold;
            color: #aaa;
            cursor: pointer;
            transition: color 0.2s;
        }
        .flash-popup-close:hover {
            color: #333;
        }
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-message {
    font-family: var(--font-titulos);
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.welcome-submessage {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.dashboard-card {
    background-color: var(--color-blanco);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--color-negro);
    display: flex;
    align-items: center;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid transparent;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-icon {
    margin-right: 20px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
}

.card-content h3 {
    font-family: var(--font-titulos);
    font-size: 1.4rem;
    margin: 0 0 8px 0;
}

.card-content p {
    margin: 0;
    line-height: 1.6;
    color: #555;
    font-size: 0.95rem;
}

/* Colores de borde y de íconos para cada tarjeta */
.card-products { border-left-color: #5bc0de; }
.card-products .card-icon { color: #5bc0de; }

.card-categories { border-left-color: #5cb85c; }
.card-categories .card-icon { color: #5cb85c; }

.card-transactions { border-left-color: #337ab7; }
.card-transactions .card-icon { color: #337ab7; }

.card-subscribers { border-left-color: #f0ad4e; }
.card-subscribers .card-icon { color: #f0ad4e; }

.card-logout { border-left-color: #d9534f; }
.card-logout .card-icon { color: #d9534f; }

/* ======== ESTILOS PARA ZOOM DE IMAGEN EN PRODUCTO (ACTUALIZADO) ======== */
.image-zoom-container {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    background-color: #f9f9f9;
    /* cursor: auto; */
}

.image-zoom-container.is-grabbing {
    cursor: grabbing;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: 50% 50%;
}

.main-product-image.zoom-level-1 { transform: scale(1.5); }
.main-product-image.zoom-level-2 { transform: scale(2.0); }

/* Controles de Zoom (+/-) */
.zoom-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    gap: 4px;
    padding: 5px;
    z-index: 10;
}

.zoom-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: var(--color-principal);
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s;
}

.zoom-btn:hover:not(:disabled) {
    background-color: #BE96A4;
}

.zoom-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .zoom-controls {
        display: none;
    }
}
/* ======== ESTILOS PARA FILTROS DE PRODUCTOS (ACTUALIZADO) ======== */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap; 
    gap: 20px;
}

.product-header h2 {
    margin-bottom: 0;
}

.product-filters {
    display: flex;
    flex-wrap: wrap; 
    gap: 15px;
    align-items: center;
}

#dynamic-filters-container {
    display: contents; 
}

.product-filters select,
.product-filters input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-texto);
    font-size: 0.9rem;
    height: 42px; 
    background-color: white;
}
/* ======== NUEVO ESTILO PARA EL INDICADOR DE STOCK ======== */
.product-stock {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
    background-color: #f0f8ff; 
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #bde0fe; 
}
.product-stock:empty {
    display: none;
}
p.product-stock:has(span) { 
    background-color: #fff0f1; 
    border-color: #fecdd3;
    color: #8c1c13; 
    font-weight: bold;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px; 
    margin-bottom: 20px;
}
.social-icons a {
    color: #D9AAB7;
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-icons a:hover {
    color: #b38e5d;
    transform: scale(1.1);
}

/* ======================================================== */
/* ======== INICIO: ESTILOS PARA EL PANEL DE ADMIN ======== */
/* ======================================================== */

body.admin-page {
    background-color: #f8f9fa; /* Fondo gris claro solo en páginas de admin */
}

/* Encabezado del panel de admin */
.admin-header {
    background-color: #fff;
    padding: 15px 5%;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Navegación del panel de admin */
.admin-nav {
    display: flex;
    align-items: center;
}

.admin-nav a {
    color: #333;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    padding: 5px 0;
}

.admin-nav a.btn-logout {
    background-color: #d9534f;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    margin-left: 20px;
}

/* Botón de Hamburguesa para Admin */
.admin-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1011;
}

.admin-hamburger .bar {
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}


/* Contenido principal del dashboard */
.admin-container .admin-header {
    text-align: center;
    margin-bottom: 40px;
    background: none;
    border: none;
    padding: 0;
}

.welcome-message {
    font-family: var(--font-titulos);
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.welcome-submessage {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.dashboard-card {
    background-color: var(--color-blanco);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--color-negro);
    display: flex;
    align-items: center;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid transparent;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-icon {
    margin-right: 20px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
}

.card-content h3 {
    font-family: var(--font-titulos);
    font-size: 1.4rem;
    margin: 0 0 8px 0;
}

.card-content p {
    margin: 0;
    line-height: 1.6;
    color: #555;
    font-size: 0.95rem;
}

/* Colores de borde y de íconos para cada tarjeta */
.card-products { border-left-color: #5bc0de; }
.card-products .card-icon { color: #5bc0de; }

.card-categories { border-left-color: #5cb85c; }
.card-categories .card-icon { color: #5cb85c; }

.card-transactions { border-left-color: #337ab7; }
.card-transactions .card-icon { color: #337ab7; }

.card-subscribers { border-left-color: #f0ad4e; }
.card-subscribers .card-icon { color: #f0ad4e; }

.card-logout { border-left-color: #d9534f; }
.card-logout .card-icon { color: #d9534f; }

/* --- ESTILOS RESPONSIVE PARA EL PANEL DE ADMIN --- */
@media (max-width: 992px) {
    /* Navegación */
    .admin-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid #dee2e6;
        z-index: 1010;
    }
    .admin-nav.active {
        display: flex;
    }
    .admin-nav a {
        margin: 0;
        padding: 15px 5%;
        width: 100%;
        border-bottom: 1px solid #f1f1f1;
    }
    .admin-nav a.btn-logout {
        border-radius: 0;
        text-align: center;
    }
    .admin-hamburger {
        display: flex;
    }

    /* Dashboard */
    .welcome-message {
        font-size: 2rem;
    }
    .welcome-submessage {
        font-size: 1rem;
    }
    .dashboard-card {
        flex-direction: column;
        text-align: center;
    }
    .card-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* Una columna en pantallas pequeñas */
    }
}
/* ====================================================== */
/* ======== FIN: ESTILOS PARA EL PANEL DE ADMIN ======== */
/* ====================================================== */
