/* ==========================================================================
   CSS GLOBAL - LA BELLEZA DE MAGALLANES
   Estética Clara, Elegante, Oro Rosa, Lavanda y Beige Cálido.
   ========================================================================== */

/* Fuentes desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de Colores Claros y Bonitos */
    --bg-primary: #ffffff;
    --bg-secondary: #fcfbf9;     /* Blanco crema cálido */
    --bg-accent: #f8f6f0;        /* Beige lino muy suave */
    
    --primary: #d4a373;          /* Oro Rosa / Arena Calma */
    --primary-hover: #c39262;
    --primary-light: #faedcd;    /* Beige pastel */
    
    --secondary: #9f86c0;        /* Lavanda Elegante */
    --secondary-hover: #8c72ad;
    --secondary-light: #f3effa;  /* Lavanda pastel suave */
    
    --tint-rose: #fbf3f1;        /* Tono rosado muy claro para fondos de secciones */
    
    /* Textos */
    --text-main: #2d3142;        /* Carbón suave elegante */
    --text-muted: #5c5f6e;       /* Gris suave para descripciones */
    --text-light: #ffffff;
    
    /* Estados y Bordes */
    --border-color: #edebe4;
    --success: #6ba292;
    --success-light: #eef7f4;
    --warning: #f7b05b;
    --danger: #d95d39;
    
    /* Tipografía y Medidas */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(212, 163, 115, 0.08);
    --shadow-md: 0 8px 24px rgba(212, 163, 115, 0.12);
    --shadow-lg: 0 16px 40px rgba(159, 134, 192, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset de Estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   BOTONES E INTERACCIONES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
    box-shadow: 0 4px 14px rgba(212, 163, 115, 0.35);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 163, 115, 0.45);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--secondary);
    color: var(--text-light);
    box-shadow: 0 4px 14px rgba(159, 134, 192, 0.3);
}

.btn-accent:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 134, 192, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

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

/* ==========================================================================
   CABECERA / NAVBAR
   ========================================================================== */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.topbar {
    background-color: var(--primary-light);
    color: var(--text-main);
    padding: 6px 24px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid rgba(212, 163, 115, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.topbar-promo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-hover);
}

.topbar-promo i {
    font-size: 14px;
}

.topbar-info {
    display: flex;
    gap: 24px;
    align-items: center;
}

.topbar-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.topbar-info-item i {
    color: var(--primary-hover);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 24px;
}

.brand {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.brand span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-muted);
    position: relative;
    padding: 5px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon-wrapper {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    transition: var(--transition);
}

.cart-icon-wrapper:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--danger);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Menú móvil hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

/* ==========================================================================
   LANDING PAGE (INDEX.PHP) - SLIDER E IMÁGENES
   ========================================================================== */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 75px);
    min-height: 550px;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.slider-wrapper {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.slide-img-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transform: scale(1.1);
    transition: transform 6s ease;
}

.slide.active .slide-img-bg {
    transform: scale(1);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 100%);
    z-index: 2;
}

.slide-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slide-tag {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.slide-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.15;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.slide-title span {
    color: var(--primary-light);
    position: relative;
    display: inline-block;
}

.slide-title span::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 100%;
    height: 8px;
    background-color: rgba(212, 163, 115, 0.4);
    z-index: -1;
    border-radius: 4px;
}

.slide-desc {
    font-size: 18px;
    color: #f3f4f6;
    margin-bottom: 35px;
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.slide-actions {
    display: flex;
    gap: 16px;
    opacity: 0;
    transform: translateY(20px);
}

/* Animaciones del slider activado */
.slide.active .slide-tag {
    animation: slideInUp 0.6s forwards 0.2s;
}
.slide.active .slide-title {
    animation: slideInUp 0.6s forwards 0.4s;
}
.slide.active .slide-desc {
    animation: slideInUp 0.6s forwards 0.6s;
}
.slide.active .slide-actions {
    animation: slideInUp 0.6s forwards 0.8s;
}

/* Controles del Slider */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-main);
}

.slider-arrow:hover {
    background-color: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.slider-arrow-prev { left: 24px; }
.slider-arrow-next { right: 24px; }

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(212, 163, 115, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background-color: var(--primary);
    width: 28px;
    border-radius: 10px;
}

/* ==========================================================================
   SECCIÓN DE CATEGORÍAS (INDEX / INICIO)
   ========================================================================== */
.section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 10px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
}

.section-title span {
    color: var(--primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.category-card {
    position: relative;
    height: 380px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: flex-end;
}

.category-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    z-index: 1;
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(45, 49, 66, 0.8) 0%, rgba(45, 49, 66, 0.1) 60%);
    z-index: 2;
    transition: var(--transition);
}

.category-card-content {
    position: relative;
    z-index: 3;
    padding: 30px;
    width: 100%;
    color: var(--text-light);
}

.category-card-title {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-light);
}

.category-card-link {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-card:hover .category-card-img {
    transform: scale(1.08);
}

.category-card:hover .category-card-overlay {
    background: linear-gradient(to top, rgba(212, 163, 115, 0.85) 0%, rgba(45, 49, 66, 0.2) 80%);
}

/* ==========================================================================
   PRODUCTOS: GRILLA Y CARDS
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    color: inherit;
    text-decoration: none;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-light);
    color: var(--primary-hover);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    border: 1px solid rgba(212, 163, 115, 0.2);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* Cuadrado perfecto */
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.product-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    transition: var(--transition);
    background: linear-gradient(to top, rgba(255,255,255,0.95) 60%, rgba(255,255,255,0));
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

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

.product-card:hover .product-card-actions {
    bottom: 0;
}

.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 8px;
}

.product-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--bg-secondary);
}

.product-card-price {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-hover);
}

/* ==========================================================================
   PRODUCTOS.PHP: VISTA CATALOGO CON FILTROS
   ========================================================================== */
.catalog-container {
    display: flex;
    gap: 40px;
    padding: 40px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 95px;
}

.filter-widget {
    margin-bottom: 30px;
}

.filter-widget:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
}

/* Buscador */
.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.15);
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

/* Checkbox de Categorías */
.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.filter-item input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-item:hover {
    color: var(--primary);
}

/* Slider de Precios */
.price-range-inputs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

.price-range-inputs input {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 13px;
    text-align: center;
    outline: none;
}

/* Catálogo Contenido Principal */
.catalog-content {
    flex-grow: 1;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    font-size: 14px;
    color: var(--text-muted);
}

.sort-select {
    padding: 10px 15px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    background-color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:focus {
    border-color: var(--primary);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.no-results-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

/* ==========================================================================
   PRODUCTO.PHP: DETALLE DE PRODUCTO
   ========================================================================== */
.product-detail-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.product-media-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-media-viewer {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 100%;
    padding-top: 100%; /* Cuadrado */
}

.main-media-viewer img, .main-media-viewer video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-video-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(159, 134, 192, 0.9);
    color: var(--text-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.media-thumbnails {
    display: flex;
    gap: 10px;
}

.media-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    background-color: var(--bg-secondary);
    transition: var(--transition);
}

.media-thumbnail.active {
    border-color: var(--primary);
}

.product-info-panel {
    display: flex;
    flex-direction: column;
}

.product-detail-category {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 15px;
}

.product-detail-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 15px;
}

.product-detail-price {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-hover);
    margin-bottom: 25px;
}

.product-detail-desc {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.7;
}

.product-features-list {
    margin-bottom: 30px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main);
}

.product-features-list li i {
    color: var(--primary);
}

.purchase-options-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 30px;
}

.options-row {
    margin-bottom: 20px;
}

.options-row:last-child {
    margin-bottom: 0;
}

.options-label {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-primary);
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-main);
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--primary-light);
}

.qty-value {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
}

.buy-actions {
    display: flex;
    gap: 15px;
}

.buy-actions .btn {
    flex-grow: 1;
}

/* ==========================================================================
   CARRITO LATERAL (SIDE-DRAWER)
   ========================================================================== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 49, 66, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    z-index: 1200;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

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

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-title {
    font-size: 20px;
    font-weight: 700;
}

.cart-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-drawer-close:hover {
    background-color: var(--bg-secondary);
    color: var(--danger);
}

.cart-drawer-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    object-fit: cover;
    background-color: var(--bg-secondary);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
}

.cart-item-price {
    font-size: 14px;
    color: var(--primary-hover);
    font-weight: 700;
}

.cart-item-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.cart-item-qty-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.cart-item-qty-btn:hover {
    background-color: var(--primary-light);
}

.cart-item-qty-value {
    width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--danger);
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 15px;
}

.cart-summary-total {
    font-weight: 700;
    font-size: 18px;
}

.cart-empty {
    text-align: center;
    margin: auto 0;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary-light);
}

/* ==========================================================================
   FORMULARIO DE CONTACTO Y NOSOTROS
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-top: 40px;
}

.contact-info-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.info-item-text h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.info-item-text p {
    color: var(--text-muted);
    font-size: 14px;
}

.contact-form-panel {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 60px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   CHATBOT INTERACTIVO
   ========================================================================== */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 100px; /* Al lado del de WhatsApp */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(159, 134, 192, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.chatbot-trigger:hover {
    background-color: var(--secondary-hover);
    transform: scale(1.1);
}

.chatbot-panel {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 380px;
    height: 550px;
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chatbot-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.chatbot-agent {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid var(--bg-primary);
}

.chatbot-status h4 {
    font-size: 14px;
    font-weight: 700;
}

.chatbot-status span {
    font-size: 11px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chatbot-status span::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
}

.chatbot-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
}

.chatbot-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: var(--bg-secondary);
}

.chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.5;
}

.chat-msg-bot {
    background-color: var(--bg-primary);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
}

.chat-msg-user {
    background-color: var(--secondary);
    color: var(--text-light);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Opciones de Selección Rápida en Chatbot */
.chat-options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    align-self: flex-start;
    width: 100%;
}

.chat-option-btn {
    background-color: var(--bg-primary);
    border: 1px solid var(--primary-light);
    color: var(--primary-hover);
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    width: fit-content;
}

.chat-option-btn:hover {
    background-color: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

/* Tarjeta de producto dentro del chat */
.chat-product-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 8px;
    max-width: 240px;
    box-shadow: var(--shadow-sm);
}

.chat-product-img {
    height: 130px;
    width: 100%;
    object-fit: cover;
}

.chat-product-body {
    padding: 12px;
}

.chat-product-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.chat-product-price {
    font-size: 13px;
    color: var(--primary-hover);
    font-weight: 800;
    margin-bottom: 8px;
}

/* Indicador de escribiendo */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 18px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex-grow: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    outline: none;
    font-family: var(--font-body);
    font-size: 13px;
}

.chatbot-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.chatbot-send:hover {
    background-color: var(--secondary-hover);
}

/* ==========================================================================
   WHATSAPP FLOTANTE Y PIE DE PAGINA
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
}

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

.footer-wrapper {
    background-color: var(--bg-accent);
    border-top: 1px solid var(--border-color);
    padding: 60px 24px 30px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--primary-hover);
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact-info {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-contact-info li {
    display: flex;
    gap: 12px;
}

.footer-contact-info i {
    color: var(--primary);
    font-size: 16px;
    margin-top: 3px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-muted);
    font-size: 13px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

/* ==========================================================================
   CHECKOUT.PHP Y PAGO (PASARELA DE PAGO MOCK)
   ========================================================================== */
.checkout-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

.checkout-section-title {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-section-title i {
    color: var(--primary);
}

.payment-methods-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.payment-method-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.payment-method-card.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.payment-method-card i {
    font-size: 24px;
    color: var(--text-muted);
}

.payment-method-card.active i {
    color: var(--primary-hover);
}

.card-details-form {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-top: 20px;
}

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

/* Modal de Carga de Pago */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 49, 66, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.payment-modal.active {
    display: flex;
}

.payment-modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 50px 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.spinner {
    width: 64px;
    height: 64px;
    border: 6px solid var(--primary-light);
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--success-light);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 25px;
    animation: scaleUp 0.5s ease-out forwards;
}

/* ==========================================================================
   ANIMACIONES KEYFRAMES
   ========================================================================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes scaleUp {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

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

/* ==========================================================================
   MEDIA QUERIES (DISEÑO RESPONSIVO)
   ========================================================================== */
@media (max-width: 992px) {
    .navbar {
        padding: 15px 20px;
    }
    
    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transition: left 0.4s ease;
        box-shadow: var(--shadow-md);
        z-index: 900;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .catalog-container {
        flex-direction: column;
    }
    
    .filters-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .slide-title {
        font-size: 32px;
    }
    
    .slide-desc {
        font-size: 15px;
    }
    
    .slide-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 40px;
    }
    
    .slide-actions .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .chatbot-panel {
        width: calc(100% - 30px);
        right: 15px;
        left: 15px;
        bottom: 90px;
        height: 480px;
    }
    
    .chatbot-trigger {
        right: 85px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-methods-box {
        grid-template-columns: 1fr;
    }
}
