/* ======================================= */
/* Estilos Globales, Reset & Base */
/* ======================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================
   1. DEFINICIÓN DE VARIABLES (MODO CLARO)
   ========================================================== */
:root {
    /* Paleta de colores base */
    --color-timberwolf: #D0C5BF; /* Gris/Beige claro para stats */
    --color-khaki: #C5AC98;     /* Acento/Khaki */
    --color-isabelline: #FAF5F2; /* Fondo de tarjeta (Casi blanco) */
    --color-cinereous: #8B7C71; /* Texto principal (Marrón/Gris oscuro) */
    --color-snow: #FBF4F2;      /* Fondo principal (Casi blanco) */

    /* Variables funcionales (Modo Claro por defecto) */
    --bg: var(--color-snow);            /* Fondo de página */
    --card: var(--color-isabelline);    /* Fondo de tarjeta */
    --text: var(--color-cinereous);     /* Texto principal */
    --text-secondary: #a0a0a0;          /* Texto sutil */
    --accent: var(--color-khaki);       /* Color de acento */
    
    /* Botones/Header */
    --color-header-bg: var(--color-snow); 
    --color-btn-bg: #e0e0e0;              
    --color-btn-text: var(--color-cinereous); 
    --btn-text-light: var(--color-snow); /* Texto blanco para botones rellenos */
    
    /* Variables de Estructura */
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.04), 0 2px 5px rgba(0, 0, 0, 0.02);
    --radius: 18px; 
    --btn-border: var(--accent);
    
    /* Variables de Tipografía unificadas */
 	--font-heading: 'DM Serif Display', serif;
 	--font-body: 'Montserrat', 'Poppins', 'Inter', "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================
   2. MODO OSCURO (DARK-MODE UNIFICADO) - SOBRESCRITURA DE VARIABLES
   ========================================================== */
/* Se unifica 'dark-mode' y 'dark-theme' en la clase 'dark-mode' */
body.dark-mode { 
    /* Fondos */
    --bg: #1e1e1e; 
    --card: #282828; 
    --color-header-bg: #121212; 
    
    /* Texto */
    --text: #e0e0e0; 
    --text-primary: #333333; /* Título (NEGRO) */
    --text-secondary: #555555; /* Categoría/Fecha (GRIS OSCURO) */
    --color-cinereous: #cccccc; /* Sobreescrito para alto contraste */
    
    /* Acento */
    --accent: #b09985; /* Versión más suave del Khaki */
    --btn-border: var(--accent);
    
    /* Botones */
    --color-btn-bg: #333333;
    --color-btn-text: var(--text); 
    
    /* Sombra */
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3); 
    --border: #404040; /* Añadido para posibles bordes */
}

/* ========================================================== */
/* FIX: LEGIBILIDAD EN MODO OSCURO (FORMULARIO UPLOAD) */
/* ========================================================== */

body.dark-mode .form-container p.form-sub {
    /* Color de alto contraste para el texto descriptivo */
    color: var(--text-secondary) !important; 
    opacity: 1 !important; /* Asegurar máxima opacidad */
}

body.dark-mode .form-container input[type="text"],
body.dark-mode .form-container input[type="file"],
body.dark-mode .form-container select {
    /* 1. Cambiar el color del texto del campo */
    color: var(--text) !important;
    /* 2. Cambiar el fondo del campo para que contraste mejor */
    background: #333 !important; 
    /* 3. Asegurar un borde visible */
    border: 1px solid #555 !important;
}

body.dark-mode .form-container select option {
    /* Asegurar que las opciones del dropdown se vean bien */
    color: var(--text) !important;
    background: #333 !important;
}

/* ==========================================================
   3. ESTILOS BASE Y TRANSICIONES
   ========================================================== */
html, body { height: 100%; }
body {
    /*font-family: var(--font-body);*/
    font-family: "Inter","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial;
    color: var(--text);
     background-color: var(--bg);
    background-repeat: repeat;
    background-size: 600px;
    overflow-x: hidden;
    transition: opacity .36s ease, background .4s ease;
    opacity: 0;
}
body.fade-in { opacity: 1; }

/* Transición suave para todos los elementos afectados por el modo oscuro */
body, 
.card, 
.header, 
.dark-mode-toggle,
.btn {
    transition: 
        background-color 0.4s ease-in-out,
        color 0.4s ease-in-out,
        box-shadow 0.4s ease-in-out,
        border-color 0.4s ease-in-out;
}

/* Base Links & Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
header, footer { text-align: center; padding: 1.2rem 1rem; color: var(--text-secondary); }
a { color: inherit; text-decoration: none; transition: color .22s ease; }
a:hover { color: var(--accent); } /* Usamos --accent como color de hover */
.hidden { display: none !important; }

/* ==========================================================
   4. HEADER Y NAVEGACIÓN
   ========================================================== */

.header {
    background: var(--color-header-bg); 
    color: var(--text); 
    display: flex; 
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
}
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-menu {
    display: flex; 
    flex-direction: row;
    gap: 1rem; 
    position: static;
}

/* Asegura que el botón use Flexbox para alinear el icono y el texto */
.btn-with-icon {
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: center; /* Centrado horizontal si es necesario */
}

/* Estilos específicos para el ícono SVG dentro del botón */
.btn-icon {
    width: 2rem; /* Ajuste para que se vea bien en el botón */
    height: 2rem;
    margin-right: 0.5rem; /* Espacio entre el icono y el texto */
    /* stroke: currentColor; heredará el color de la propiedad 'color' del botón */
}

.soft-shadow { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03); }

        /* FIX DE CENTRADO Y ANCHO LIMITADO PARA CONTENEDORES PRINCIPALES */
        /* Esto soluciona que los bloques de estadísticas y outfit ocupen todo el ancho */
        .status-summary, 
        .sustainability-summary, 
        .gallery {
            max-width: 1100px; /* Ancho máximo para el contenido principal */
            margin-left: auto;
            margin-right: auto;
            padding-left: 1rem; /* Pequeño padding lateral para móviles */
            padding-right: 1rem;
        }

        /* Estilo para que el contenedor de resultados no se desborde */
        .results-dropdown {
            left: 0;
            right: 0;
        }

        /* Estilos de compatibilidad con modo oscuro para el buscador */
        .dark-mode .search-font input {
            background-color: transparent !important; 
            color: white; 
        }
        .dark-mode .search-font svg {
             stroke: #C5AFA8; 
        }
        
        /* Aseguramos que la lista desplegable del buscador respete el diseño */
        #results-container {
            z-index: 100; 
            max-width: 100%; 
            left: 50%;
            transform: translateX(-50%);
        }
        

.hamburger { /* Oculto en escritorio */
    display: none; 
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001; 
    color: var(--text);
}

/* ========================================================= */
/* MEJORA CONSISTENTE: Alineación de Íconos con Flexbox */
/* ========================================================= */

/* 🟢 CLASE PADRE: Aplica Flexbox para alinear verticalmente el ícono y el texto. */
.heading-with-icon {
    display: flex;
    align-items: center; /* ¡Esta es la clave de la alineación perfecta! */
}

#prendas-recomendadas .heading-with-icon {
    justify-content: flex-start; /* Alinea el título a "Outfit sugerido" la izquierda. */
}

/* 🟢 CLASE HIJA: Define el tamaño y el espaciado del ícono SVG. */
.heading-icon {
    width: 1.8rem; /* Usamos rems para mejor escalabilidad */
    height: 1.8rem;
    margin-right: 0.5rem; /* Espacio entre el ícono y el texto */
    /* El color se hereda automáticamente gracias a 'stroke="currentColor"' en el SVG. */
}

/* ========================================================= */
/* MEJORA CONSISTENTE: Estilo de H2 igual a H3 superior */
/* ========================================================= */

.minimal-heading {
    /* 🟢 CONSISTENCIA DE FUENTE: Usa la misma tipografía que los H3 */
    font-family: var(--font-heading);
    /* 🟢 TAMAÑO AJUSTADO: Se estima un tamaño similar o igual al de los H3 */
    font-size: 1.5rem; /* Ajusta este valor si tus H3 son más grandes o pequeños */
    /* 🟢 PESO: Se estima un peso bold o 700, ya que los H3 se ven muy destacados */
    font-weight: 700; /* Asegura que se vea igual de fuerte que los H3 superiores */
    
    color: var(--text);
    
    /* Espaciado del Bloque */
    margin-top: 3rem; 
    margin-bottom: 2.5rem; 
}

/* CLASE PADRE: Centra el BLOQUE completo y el CONTENIDO dentro del bloque (Flexbox) */
.heading-with-icon {
    display: flex;
    align-items: center; 
    justify-content: center; 
    
    width: 100%; 
}

/* ESTILO ESTÉTICO Y CONSISTENTE PARA EL SVG */
.heading-icon {
    /* TOQUE ESTÉTICO: Le damos el color de acento */
    stroke: var(--accent); 
    
    /* TAMAÑO COHERENTE */
    width: 1.5rem; /* Ajustamos el ícono para que coincida con el tamaño del texto */
    height: 1.5rem;
    margin-right: 0.5rem; 
}

/* --- ESTILO EN HOVER --- */
.hamburger:hover {
    opacity: 0.8; /* Efecto suave de hover */
    /* Asegura que no aparezca un borde en hover si no lo quieres */
    border: none;
    background-color: transparent; 
}

/* Cuando el body tiene la clase dark-mode, invertimos el color */
body.dark-mode .hamburger {
    /* Color del texto del icono (☰) en modo oscuro: CLARO */
    color: var(--bg); /* var(--bg) es OSCURO en dark-mode (ver Secc. 7) */
    border-color: var(--bg); 
    /* El fondo puede seguir siendo transparente o cambiar */
}

/* ========================================================= */
/* 6. BOTÓN DE MODO OSCURO (UNIFICADO) */
/* ========================================================= */

/* CLAVE: POSICIONAMIENTO ABSOLUTO DEL CONTENEDOR DE CONTROL */
.discrete-top-control {
    position: absolute;
    top: 25px;       /* Distancia desde arriba */
    right: 30px;     /* Distancia desde la derecha */
    
    width: auto;     
    text-align: right; 
    margin-bottom: 0; 
    z-index: 10;     
}

/* --- ESTILOS VISUALES UNIFICADOS DEL BOTÓN (CÍRCULO) --- */
.dark-mode-toggle {
    position: relative; 
    width: 42px;  
    height: 42px;
    padding: 0; 
    border-radius: 50%;
    
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    outline: none;
    
    /* Estilo en MODO CLARO (Sol) */
    border: 2px solid var(--accent); 
    background-color: var(--accent); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); 
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    opacity: 0.95; 
    box-shadow: 0 4px 8px rgba(139, 124, 113, 0.2); 
}

/* ESTADO ACTIVO (Click) - Se "hunde" al presionar */
.dark-mode-toggle:active {
    transform: scale(0.95);
}

/* Estilo en MODO OSCURO (Luna) */
body.dark-mode .dark-mode-toggle {
    background-color: var(--card); 
    border-color: var(--accent); 
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
}

body.dark-mode .dark-mode-toggle:hover {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

/* --- LÓGICA DE VISIBILIDAD E INTERACCIÓN DE ÍCONOS (SOL/LUNA) --- */

.dark-mode-toggle svg {
    /* Estilo base del SVG */
    width: 1.35rem; 
    height: 1.35rem;
    transition: all 0.3s;
}

/* EFECTO HOVER: ESCALA GENERAL */
.dark-mode-toggle:hover svg {
    transform: scale(1.1); 
    opacity: 0.9;
}

/* 1. MODO CLARO (Sol visible, Luna OCULTA) - ESTADO POR DEFECTO */

.icon-sun {
    display: block !important; 
    /* Color base: CLARO (var(--card)) */
    color: var(--card); 
}

/* CORRECCIÓN FINAL DE COLOR DEL SOL EN HOVER: CLARO -> OSCURO */
.dark-mode-toggle:hover .icon-sun {
    color: var(--text) !important; 
}

.icon-moon {
    display: none !important; 
    /* Color base: OSCURO (var(--accent)) */
    color: var(--accent);
}


/* 2. MODO OSCURO (Luna visible, Sol OCULTO) */
body.dark-mode .icon-sun {
    display: none !important;
}

body.dark-mode .icon-moon {
    display: block !important; 
    /* Color base: OSCURO (var(--accent)) */
    color: var(--accent);
}

/* CAMBIO DE COLOR EN HOVER EN MODO OSCURO: OSCURO -> CLARO */
body.dark-mode .dark-mode-toggle:hover .icon-moon {
    color: var(--card) !important; 
}


/* ==========================================================
   6. BOTONES — UNIFICADOS (Outline base + Fill hover)
   ========================================================== */

/* Estado base: outline */
button,
.btn,
.inicio-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    
    /* Estilos del outline */
    background-color: transparent; 
    color: var(--btn-border); 
    border: 2px solid var(--btn-border); 
    
    border-radius: 10px; 
    padding: .68rem 1.25rem; 
    font-weight: 600; 
    font-family: inherit;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background-color .20s ease, color .20s ease, transform .18s ease, box-shadow .20s ease;
    text-decoration: none; 
    -webkit-tap-highlight-color: transparent;
}

/* Hover: relleno khaki */
button:hover,
.btn:hover,
.inicio-boton:hover {
    background-color: var(--accent); 
    color: #fff; /* Blanco forzado para el texto en hover (buen contraste) */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

button:focus,
.btn:focus,
.inicio-boton:focus {
    outline: 3px solid rgba(198,160,135,0.16);
    outline-offset: 2px;
}

/* Botones secundarios (Mantenemos el mismo look que el base, simplificado) */
/*.btn.secundario,
.btn-outline,
.inicio-boton.secundario {
    /* No se necesita redefinir, ya heredan el estilo outline base */

.btn.secundario:hover,
.btn-outline:hover,
.inicio-boton.secundario:hover {
    background-color: var(--accent); 
    color: #fff; 
}

/* Botón Danger */
.btn-danger {
    background-color: #B85151 !important; 
    color: #fff !important;
    border: 2px solid #B85151 !important;
}
.btn-danger:hover {
    background-color: #D96A6A !important;
    border-color: #D96A6A !important;
    box-shadow: 0 8px 20px rgba(184,81,81,0.18);
}

/* Botones pequeños dentro de tarjetas */
.card .btn,
.card button,
.card a.btn {
    width: 85%;
    font-size: .92rem;
    padding: .6rem 1rem;
    margin-top: .4rem;
    border-radius: 10px;
    background-color: transparent;
    color: var(--btn-border);
    border: 1.6px solid var(--btn-border);
}
.card .btn:hover,
.card button:hover,
.card a.btn:hover {
    background-color: var(--accent) !important; 
    color: #fff !important; 
    transform: translateY(-2px);
}

/* Botones con relleno (CTA o Parallax) */
.parallax-content .btn {
    background: var(--accent);
    color: var(--btn-text-light); /* Texto claro (snow) */
    border: 2px solid var(--accent);
}
.parallax-content .btn:hover {
    background-color: var(--accent); 
    color: #fff; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* ========================================================= */
/* 7. ESTILOS PARA BOTONES CON ICONO (FLECHA <- TEXTO) */
/* ========================================================= */

.btn-icon-back {
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 8px; 
    text-decoration: none;
    color: inherit; /* Hereda color del botón padre */
}

.btn-icon-back svg {
    width: 1.25rem; 
    height: 1.25rem;
    fill: none;
    stroke: currentColor; /* Usa el color del texto del botón */
    stroke-width: 2; 
}

/* ==========================================================
   INDEX / HOME
   ========================================================== */
.inicio-body { position: relative; min-height: 100vh; display:flex; align-items:center; justify-content:center; }
.video-fondo { position: fixed; inset: 0; width:100%; height:100%; object-fit:cover; z-index:-3; filter:brightness(.55) saturate(.95); background: center/cover no-repeat url('../Img/fashion-bg.jpg'); }

.inicio-overlay {
  min-height: 100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 1.6rem;
  padding: 1rem;
}

.inicio-titulo {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--text);
  text-shadow: 0 2px 6px rgba(255,255,255,0.9);
  margin: 0;
  padding-top: .6rem;
  text-align: center;
}

.inicio-contenedor {
    background-color: var(--card); /* Color de fondo blanco/tarjeta */
    padding: 2rem; 
    border-radius: 14px;
    box-shadow: var(--shadow);
    width: 100%; /* Ocupa el 100% del espacio disponible */
    max-width: 880px; /* Limita el ancho para centrar con la sección superior */
    margin: 30px auto; /* Añade espacio vertical y **centra horizontalmente** */
    text-align: center; /* Centra el texto y los elementos inline del interior */
}

.inicio-subtitulo { font-size: 1.25rem; color: #555; margin-bottom: .4rem; }
.inicio-descripcion { color: #6b6b6b; margin: .6rem auto 1rem; max-width: 640px; line-height: 1.6; }
.inicio-botones { display:flex; justify-content:center; align-items:center; gap:1rem; flex-wrap:wrap; margin-top:1rem; }

/* ==========================================================
   PARALLAX
   ========================================================== */
.parallax-section {
  position: relative; width:100%; max-width:900px; height:60vh; border-radius:12px; overflow:hidden; margin: 2rem auto;
  background: center/cover no-repeat fixed url('../Img/fashion-bg.jpg');
  box-shadow: var(--shadow);
}
.parallax-section::before { content:""; position:absolute; inset:0; background: rgba(0,0,0,0.25); z-index:1; }
.parallax-overlay { position:relative; z-index:2; display:flex; align-items:center; justify-content:center; height:100%; }
.parallax-content { color:#fff; padding:2rem; text-align:center; z-index:3; }
.parallax-content h2 { font-size: clamp(1.6rem, 3.2vw, 2rem); margin-bottom:.6rem; }
.parallax-content p { color:#f1f1f1; max-width:680px; margin:0 auto 1.2rem; opacity:.95; }

/* ==========================================================
   HEADER / NAV
   ========================================================== */
.header {
  position: sticky; top:0;
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  padding:1rem 1.5rem;
  background: linear-gradient(to bottom, rgba(255,255,255,.95), rgba(255,255,255,.85));
  backdrop-filter: blur(6px); z-index: 50;
}
.header h1 { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text); font-weight: 600; }
.header-actions { display:flex; gap:.6rem; align-items:center; }

/* ==========================================================
   MENÚ SANDWICH / NAVEGACIÓN PRINCIPAL (CORREGIDO)
   ========================================================== */

.hamburger-menu { 
    /* Botón que se muestra solo en móvil */
    display: none; 
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 60; /* Siempre encima del menú */
}

.nav-menu-drawer {
    /* Estilos por defecto para Escritorio (Horizontal) */
    display: flex;
    gap: 1.5rem;
    align-items: center;
    /* IMPORTANTE: Aseguramos que NO se apile en Desktop */
    flex-direction: row; 
}

.nav-menu-drawer a {
    /* ... (Estilos de enlaces ya definidos) ... */
    font-weight: 500;
    font-size: 1rem;
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent;
}

/* ==========================================================
   GALERÍA
   ========================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.card {
  background: var(--glass);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,0,0,0.08); }
.card img { width:100%; height:180px; object-fit:cover; border-radius:8px; margin-bottom:.6rem; }
.card p { font-weight:600; color:#333; }
.card .row { display:flex; flex-direction:column; align-items:center; gap: .6rem; margin-top: .8rem; }

/* ==========================================================
   COMBINADOR 
   ========================================================== */
.combinator-container {
    /* 🛠️ ALINEACIÓN 1/4: Cambiamos a Flexbox para asegurar la igualdad de altura */
    display: flex; 
    
    gap: 1.25rem;
    padding: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    /* CLAVE: Fuerza a los paneles a tener la misma altura */
    align-items: stretch; 
}

/* Estilos de panel compartidos */
.wardrobe-panel, .look-panel {
    background: var(--glass);
    padding: 1rem;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    min-height: 320px;
}

/* 🛠️ ALINEACIÓN 2/4: Estilos específicos para el panel de prendas */
.wardrobe-panel {
    /* Le da el ancho fijo */
    width: 360px;
    /* Habilita Flexbox para estirar el contenido interno (el grid) */
    display: flex;
    flex-direction: column;
}

/* 🛠️ ALINEACIÓN 3/4: Estilo específico para el panel de looks */
.look-panel {
    /* Hace que ocupe el resto del espacio */
    flex-grow: 1; 
}


/* Tipografía de los Títulos h2 (Unificada y Fuerte) */
.wardrobe-panel h2, .look-panel h2 {
    font-family:'Montserrat';
    font-size: 1.1rem; 
    font-weight: 900; 
    margin-bottom: 0.5rem;
}

.wardrobe-grid { 
    /* ALINEACIÓN 4/4: Hace que la cuadrícula ocupe el espacio vertical restante */
    flex-grow: 1; 
    
    /* Estilos de cuadrícula existentes */
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); 
    gap: .6rem; 
}

/* Fichas arrastrables */
.draggable img { 
    width: 100%; 
    height: 90px; 
    object-fit: cover; 
    border-radius: 8px; 
    cursor: grab; 
}

.wardrobe-grid .draggable {
    /* FIX: Fondo claro en Modo Oscuro */
    background: rgba(255, 255, 255, 0.92); 
    
    /* Estilos de tarjeta */
    border-radius: 16px; 
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); 
    padding: 0.5rem; 
    
    /* Propiedad necesaria para arrastrar */
    cursor: grab;
}

/* Canvas y elementos colocados */
.look-space { 
    position:relative; 
    min-height:320px; 
    border:2px dashed #ddd; 
    border-radius:12px; 
    padding:1rem; 
    display:flex; 
    flex-wrap:wrap; 
    align-items:center; 
    justify-content:center; 
    gap:1rem; 
    background:#faf9f8; 
    overflow:hidden; 
}
.placeholder { color:var(--muted); font-style:italic; text-align:center; }
.placed { position:absolute; width:140px; user-select:none; }
.placed img { width:100%; height:auto; border-radius:8px; }
.placed .remove { position:absolute; top:6px; right:6px; background:rgba(0,0,0,.45); color:#fff; border:none; border-radius:6px; padding:2px 6px; cursor:pointer; }


/* ==========================================================
   MIS LOOKS
   ========================================================== */
.saved-looks {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.saved-look-card {
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  padding: 1rem;
  text-align:center;
  transition: transform .22s ease, box-shadow .22s ease;
}

/* Titulo de los looks */
.saved-look-card h3{ 
  font-family:'Montserrat';
  font-size: 1.1rem; 
  font-weight: 900; 
  margin-bottom: 0.5rem;
}

/* Estilos limpios (sin cambios) */
.view-look-container{display:flex;flex-direction:column;align-items:center;padding:2rem 1rem;max-width:960px;margin:0 auto;}
.view-look-canvas{position:relative;width:100%;max-width:700px;min-height:500px;border:2px dashed #ccc;border-radius:12px;background:#fdfdfd;box-shadow:var(--shadow);margin:1.2rem 0;overflow:hidden;}

/* CORRECCIÓN DE ESTILO: Para mantener el 'aesthetic' del look combinado, 
   la prenda debe usar el tamaño guardado en el PHP para no distorsionar la combinación.
   Mantenemos el estilo visual (bordes y sombras) pero eliminamos el ancho fijo. */
.view-look-canvas img{
    /* Estilos visuales comunes (aesthetic) */
    position:absolute;
    border-radius:10px;
    user-select:none;
    pointer-events:none;
    box-shadow:0 4px 10px rgba(0,0,0,0.08);

    /* Se eliminan las propiedades de tamaño forzado para respetar la combinación guardada. */
}

.view-desc{text-align:center;margin-top:1rem;color:var(--text);font-weight:600;font-size:1.1rem;}
@media(max-width:768px){.view-look-canvas{min-height:420px;}}

/* Estilo para los iconos SVG dentro de los botones */
.look-actions .btn {
    /* FIX CRÍTICO: Forzar Flexbox en el botón para alinear el icono y el texto */
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
}

.look-actions .btn svg {
    /* Estilos del icono */
    width: 1.1rem; /* Tamaño del icono */
    height: 1.1rem;
    
    /* Espacio entre el icono y el texto "Ver" */
    margin-right: 0.3rem;
    
    /* ---------------------------------------------------- */
    /* FIX: Asegurar la visibilidad del icono (STROKE) */
    /* ---------------------------------------------------- */
    stroke: currentColor; /* Hereda el color del texto del botón */
    fill: none; /* Asegura que el interior esté vacío */
}

/* ==========================================================
    ALINEACIÓN VERTICAL DE TARJETAS (SOLUCIÓN FLEXBOX - REVISADA)
    El problema de la altura variable se soluciona haciendo que el contenedor 
    de las imágenes (.look-preview) sea el que absorba el espacio flexible.
    ========================================================== */
    .saved-look-card {
        /* Habilita Flexbox en columna para gestionar la alineación interna */
        display: flex;
        flex-direction: column;
        /* IMPORTANTE: Fuerza a la tarjeta a ocupar el 100% de la altura de la celda de la cuadrícula. */
        height: 100%;
    }
    
    .look-preview {
        /* Hace que el contenedor de imágenes absorba todo el espacio vertical sobrante.
           Esto empuja la fecha y los botones al final de la tarjeta. */
        flex-grow: 1; 
        
        /* Centra las imágenes horizontal y verticalmente dentro del espacio asignado */
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center; 
        
        /* Evita problemas de desbordamiento de Flexbox si el contenido es muy grande */
        min-height: 0; 
    }

    .look-actions {
        /* Ya no necesita margin-top: auto porque .look-preview ha expandido el espacio. */
        
        /* Estilos del contenedor de botones */
        display: flex; 
        justify-content: center; 
        flex-wrap: wrap; 
        gap: 0.6rem;
        padding-top: 0.8rem;
    }

.saved-look-card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(0,0,0,0.10); }
.look-preview { display:flex; flex-wrap:wrap; justify-content:center; gap:.5rem; margin:1rem 0; }
.look-thumb { width:80px; height:80px; border-radius:10px; object-fit:cover; transition: transform .22s ease; }
.look-thumb:hover { transform: scale(1.05); }

.dark-mode .saved-look-card h3,
.dark-mode .saved-look-card small {
    color: #444; /* Un color oscuro para contrastar con el fondo claro */
}

/* Mis_Looks */
        /* Estilos clave para la estructura de 3 columnas (wardrobe | canvas | form) */
        .editor-container {
            display: flex;
            flex-direction: row;
            max-width: 1500px; 
            margin: 0 auto;
            padding: 20px;
            gap: 20px;
            align-items: stretch;
        }

        /* COLUMNA 1: Guardarropa */
        .wardrobe-panel {
            width: 250px; 
            padding: 10px;
            background: #fff;
            border-radius: 12px;
            box-shadow: var(--shadow);
            overflow-y: auto;
            min-height: 80vh; 
            max-height: 80vh; 
            display: flex;
            flex-direction: column;
        }
        .wardrobe-panel h2 {
            font-size: 1.2rem;
            margin-bottom: 15px;
            text-align: center;
            flex-shrink: 0; 
        }
        .wardrobe-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 10px;
            padding: 10px 0;
            overflow-y: scroll; 
            flex-grow: 1; 
        }

        /* ESTILO DE LA PRENDA EN EL GUARDARROPA (MARCO Y CUADRATURA) */
        .draggable-source {
            cursor: grab;
            border-radius: 8px;
            aspect-ratio: 1 / 1; 
            overflow: hidden;
            
            border: 1px solid #ddd;
            background-color: #f9f9f9; 
            padding: 5px; 
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 
            transition: box-shadow 0.2s, transform 0.2s;
            
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .draggable-source img {
            width: 100%;
            height: 100%;
            object-fit: contain; 
            display: block;
            border-radius: 4px;
        }
        .draggable-source:hover {
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            transform: translateY(-1px);
        }

        /* COLUMNA 2: Canvas */
        .canvas-area {
            flex-grow: 1; 
            min-width: 500px;
            min-height: 80vh;
            max-height: 80vh; 
            display: flex;
            flex-direction: column;
        }
        .canvas-area label {
            font-family:'Montserrat';
            font-size: 1.1rem; 
            font-weight: 900; 
            margin-bottom: 0.5rem;
        }
        .look-canvas {
            position: relative;
            width: 100%;
            flex-grow: 1; 
            border: 2px dashed var(--borde);
            border-radius: 12px;
            background: #fdfdfd;
            overflow: hidden;
            touch-action: none;
        }
        
        /* COLUMNA 3: Controles */
        .form-area {
            width: 300px; 
            padding: 20px;
            background: #fff;
            border-radius: 12px;
            box-shadow: var(--shadow);
            min-height: 80vh;
            max-height: 80vh;
            overflow-y: auto;
        }

        /* Estilos clave para las prendas arrastrables EN EL CANVAS (Prenda In Look) */
        .prenda-in-look {
            position: absolute;
            width: 150px; 
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            cursor: grab;
            display: block;
            z-index: 1;
        }
        .prenda-in-look img {
            width: 100%;
            height: auto;
            border-radius: 6px;
        }
        .prenda-in-look:active {
            cursor: grabbing;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
            z-index: 2; 
        }
        
        /* Estilos para el clon que se arrastra desde el guardarropa */
        .cloned-prenda {
            position: absolute;
            width: 150px;
            z-index: 1000;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
            opacity: 0.8;
            pointer-events: none; 
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #333;
            background-color: #ffffff;
        }
        .cloned-prenda img {
            width: 100%;
            height: auto;
        }

        /* Botón de Eliminación (Remove) - Gris Suave (Consistente con Combinador) */
.remove-prenda-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    /* CAMBIO A GRIS SUAVE Y SEMI-TRANSPARENTE PARA FONDO */
    background: rgba(0, 0, 0, 0.4); 
    color: white; /* El texto/ícono sigue siendo blanco */
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    padding: 0;
}
.remove-prenda-btn:hover {
    /* Un gris ligeramente más oscuro al pasar el ratón */
    background: rgba(0, 0, 0, 0.6); 
}

.subtle-emphasis {
    color: #8B4513; /* Tono marrón sutil */
}

/* ==========================================================
   INFORMACIÓN TIEMPO
   ========================================================== */
#weather-info {
  background-color: #D1C6BF; 
  border-radius: 12px;
  padding: 10px 15px;
  margin: 0; 
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 0.9rem;
  color: #444;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.icon-weather {
    width: 40px; 
    height: 40px;
    vertical-align: middle; 
}

/* ==========================================================
   1. ESTILOS DE ENCABEZADOS PRINCIPALES DE SECCIÓN (CORRECCIÓN FINAL)
   ========================================================== */

/* Selector de máxima especificidad para el título de Clima Hoy */
.status-summary .weather-box h3 {
    /* CLAVE: Aplica el mismo estilo que a los otros dos títulos. */
    font-family: 'Montserrat', serif; 
    font-size: 1.1rem !important; /* Usamos !important para asegurar que sobrescribe cualquier estilo base de h3 */
    font-weight: 600 !important; 
    color: var(--text-primary, #38302C) !important; 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
    margin: 0; 
}

/* Aplicamos el mismo estilo a los otros dos títulos sin usar !important, pero con alta especificidad */
#prendas-recomendadas .heading-with-icon,
.sustainability-summary h2.minimal-heading {
    font-family: 'Montserrat', serif; 
    font-size: 1.1rem; /* TAMAÑO FINAL UNIFICADO */
    font-weight: 600; 
    color: var(--text-primary, #38302C); 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
    margin: 0; 
    display: flex;
    align-items: center; 
}


/* ==========================================================
   2. ESTILOS DE DATOS DE CLIMA Y ALINEACIÓN (Mantenidos)
   ========================================================== */

/* Asegura la alineación vertical del termómetro y la temperatura */
.temp-info {
    color: var(--text-primary, #38302C);
    display: flex;
    align-items: center; 
    margin-top: 0.4rem; 
}

/* Estilo para el número de la temperatura (el dato más grande) */
.temp-info strong {
    font-family: 'Inter', sans-serif; 
    font-size: 1.8rem; /* Tamaño prominente para la temperatura */
    font-weight: 700;
    color: var(--text-primary, #38302C); 
    line-height: 1; 
    margin-left: 0.2rem; 
}

/* SVG del termómetro */
.icon-weather {
    width: 1.6rem; 
    height: 1.6rem;
    margin-right: 0; 
    stroke: var(--text-primary, #C5AC98) !important; 
    fill: none;
}

/* Iconos dentro de títulos */
.heading-with-icon .heading-icon {
    width: 1.4rem; 
    height: 1.4rem;
    margin-right: 0.5rem; 
    stroke: var(--text-primary, #C5AC98); 
    fill: none;
}

/* Centrar el título Mi Impacto Global */
.sustainability-summary h2.minimal-heading {
    display: inline-flex; 
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================
   SUGERENCIA DE VESTUARIO
   ========================================================== */
/* Estilo para las minicards */
.prenda-card {
  width: 100px; /* Se ajusta el tamaño de las tarjetas */
  margin: 10px;
  display: inline-block;
  text-align: center;
}

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.card-info {
  margin-top: 8px;
}

.card-info h3 {
  font-size: 12px;
  color: #333;
}


/* ==========================================================
   FORMULARIOS
   ========================================================== */
.form-body { display:flex; justify-content:center; align-items:center; min-height:100vh; padding:2rem 0; }
.form-container { background: rgba(255,255,255,0.95); padding:2.2rem; border-radius:16px; box-shadow: 0 8px 30px rgba(0,0,0,0.06); text-align:center; width:360px; max-width:95%; }
.form-container h2 { font-size:1.5rem; margin-bottom:.6rem; color:#222; }
.form-container input, .form-container select { width:100%; padding:.72rem; margin:.5rem 0; border-radius:8px; border:1px solid #ddd; font-size:.95rem; transition: border .18s ease; }
.form-container input:focus { border-color:var(--accent-3); outline:none; }

/* ==========================================================
   UTILITIES
   ========================================================== */
.error { color:#c53d3d; background: rgba(255,235,235,0.9); padding:.5rem; border-radius:8px; font-size:.9rem; margin-top:.6rem; }
.success { color:#1c6b4c; background: rgba(222,255,240,0.9); padding:.5rem; border-radius:8px; font-size:.9rem; }

.fecha-uso { font-size:.85rem; color:#666; margin-top:.3rem; background: rgba(240,240,2F0,0.6); padding:.25rem .5rem; border-radius:6px; display:inline-block; }

.fade-in { animation: fadeIn .7s ease both; }
@keyframes fadeIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }


/* ==========================================================
   TOAST (Notificación Estética Minimalista)
   ========================================================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast-message {
    background-color: var(--card, #ffffff); 
    color: var(--text, #2E2E2E);
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
    transform: translateY(-20px);
    border-left: 4px solid var(--accent, #C3B091); 
    display: flex;
    align-items: center;
    font-size: 1rem;
}
.toast-message.success {
    border-left-color: #4CAF50; /* Verde sutil para éxito */
}
.toast-message.error {
    border-left-color: #F44336; /* Rojo sutil para error */
}

/* Estado de visualización */
.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Nuevos estilos para el Panel de Sostenibilidad Global */
.sustainability-summary {
    max-width: 650px;
    /* Ajusta el margen: un poco de espacio después del clima y antes de las tabs */
    margin: 20px auto 15px; 
    padding: 15px 20px;
    background-color: #F8F4F0; /* Fondo sutil como el summary */
    border-radius: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.03);
    border: 1px solid #E0D3C9;
    text-align: center;
}
.sustainability-summary h2 {
    font-size: 1.2rem; /* Sutil, no compite con el H1 */
    font-weight: 600;
    color: #7C6D60; /* Color que se integra con el tema */
    margin: 0 0 15px 0;
}
.stats-box-global {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.stat-item-global {
    text-align: center;
    line-height: 1.2;
    padding: 5px 0;
}
.stat-item-global strong {
    display: block;
    font-size: 1.6rem; /* Un tamaño importante para los números */
    font-weight: 700;
    color: #4F4640; /* Color oscuro y legible */
    margin-bottom: 2px;
}
.stat-item-global span {
    display: block;
    font-size: 0.7rem;
    color: #777;
    text-transform: uppercase;
    font-weight: 500;
}

/* Ajuste para el stats-box-subtle de la ficha (mostrar la meta 30) */
.stats-box-subtle {
    /* Mantener estilos existentes... */
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 0.9rem;
    color: #444;
}
.stat-item-subtle .goal-indicator {
    font-size: 1.2rem;
    color: #387042; /* Color 'verde' de éxito */
    margin-left: 5px;
}

/* ==========================================================
   ESTILO ESPECÍFICO DE LA PORTADA (Sobrescribe para centrar)
   ========================================================== */
.footer-index {
    /* Se mantienen las propiedades estéticas del principio */
    color: var(--text);
    font-size: 0.85rem;
    opacity: 0.7;
    
    /* El centrado y la limitación de ancho para alinearse con el Hero: */
    width: 100%;
    max-width: 880px; 
    margin: 20px auto 10px; /* Centra la caja horizontalmente */
    padding: 1rem 0;
}

/* ===================== MODAL DE BIENVENIDA ===================== */
#welcome-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center !important;
    align-items: center;
}

.welcome-modal-content {
    background-color: var(--card);
    color: var(--text);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow);
    animation: fadeInScale 0.3s ease-out forwards;
    text-align: center;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.welcome-modal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcomme-modal-content p {
    font-size: 1rem;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.welcome-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* ESTILO BASE DE BOTONES DEL MODAL */
/* La regla base 'button' se aplica aquí */
.welcome-modal-buttons button {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 1rem;
}

/* Estilo del botón "Cerrar" (Outline) */
/* Ya hereda el estilo 'outline' de la regla base 'button' */
#welcome-close-modal-btn {
    background-color: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

/* Estilo del botón "Ver Guía" (Filled) */
/* Este anula la regla base 'button' */
#welcome-view-guide-btn {
    background-color: var(--accent);
    color: var(--btn-text-light);
    border-color: var(--accent);
}

/* ==========================================================
   RESPONSIVE (CORREGIDO - DUPLICADOS ELIMINADOS)
   ========================================================== */

/* (Bloque duplicado de 900px eliminado) */
/* (Bloque duplicado de 600px eliminado) */

/* Asegurar z-index superior */
.header, .inicio-overlay, .parallax-overlay, .parallax-content { 
    z-index: 20; 
    position: relative; 
}

/* ==========================================================
   4. RESPONSIVE (TU CÓDIGO ACTUAL + AJUSTES DE MENÚ)
   ========================================================== */

/* Asegurar z-index superior */
.header, .inicio-overlay, .parallax-overlay, .parallax-content { 
    z-index: 20; 
    position: relative; 
}

/* ----------------------------------------------------------
   Media Query: Pantallas Medianas (max-width: 900px)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    /* 🛑 AJUSTES DEL MENÚ HAMBURGUESA */
    
    /* Mostrar el botón hamburguesa en móvil */
    .hamburger {
        display: block; 
    }
    
    /* Ocultar el menú horizontal por defecto y darle estilos de desplegable */
    .nav-menu {
        display: none; /* ⬅️ OCULTO POR DEFECTO EN MÓVIL */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Justo debajo del header */
        right: 0;
        background: var(--color-header-bg); /* Usa el fondo del header para el menú desplegable */
        width: 250px;
        padding: 1rem;
        gap: 1rem;
        border-radius: 0 0 0 12px;
        box-shadow: var(--shadow);
        z-index: 999;
    }
    
    /* Clase que el JS añade para mostrar el menú */
    .nav-menu.menu-show {
        display: flex; 
    }
    
    /* Layouts Generales */
    .parallax-section { height: 48vh; }

.control-container {
    display: flex; /* Convierte el contenedor en un flex container */
    align-items: center; /* Alinea los botones verticalmente */
    gap: 15px; /* <--- CLAVE: Añade 15px de espacio entre los elementos hijos */
}
   
    /* Inicio y Header */
    .inicio-titulo { font-size: 2.2rem; }
    .header { 
        flex-direction: row; 
        justify-content: space-between; 
        gap: .8rem; 
        text-align: left; 
        padding: 1rem 1.5rem; 
    }
    .header-actions { 
        justify-content: flex-end; 
    }
    
    /* Galería */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
        gap: 1.5rem;
    }

    /* Panel de Estadísticas Globales */
    .stats-box {
        padding: 1rem;
        flex-direction: column; 
        gap: 10px;
        align-items: flex-start;
    }
    .stats-box .stat-item {
        width: 100%; 
        text-align: left;
    }
}

/* ----------------------------------------------------------
   Media Query: Pantallas Pequeñas/Móvil (max-width: 600px)
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    /* Ajuste para que el menú ocupe todo el ancho en móvil pequeño */
    .nav-menu {
        width: 100%;
        border-radius: 0;
    }
    
    /* Inicio */
    .inicio-contenedor { 
        padding: 1.5rem; 
    }
    .inicio-subtitulo { 
        font-size: 1.1rem; 
    }
    .inicio-boton, .btn { 
        width: 100%; 
        text-align: center; 
    }
    
    /* Galería */
    .gallery-grid {
        grid-template-columns: 1fr; 
        gap: 1rem;
    }
    .card img { 
        height: 180px; 
        object-fit: cover;
    }

    /* Tarjetas */
    .card {
        padding: 15px;
    }
    .card-info h3 {
        font-size: 1rem;
    }
    .card-actions {
        flex-direction: column;
        gap: 10px;
    }
    .card-actions button {
        width: 100%;
    }
    
    /* Parallax */
    .parallax-section { 
        height: 55vh; 
    }
    .parallax-content h1 {
        font-size: 1.8rem;
    }
}

/* ---------- LAYOUT ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
header, footer { text-align: center; padding: 1.2rem 1rem; color: #444; }
a { color: inherit; text-decoration: none; transition: color .22s ease; }
a:hover { color: var(--accent-2); }

/* ==========================================================
   BOTONES — UNIFICADOS (Outline base + Fill hover)
   ========================================================== */

:root {
  --btn-border: var(--accent);
  --btn-hover: var(--accent-2); 
  --btn-text: var(--text);
}

/* Estado base: outline */
button,
.btn,
.inicio-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background-color: transparent; 
  color: var(--btn-border); 
  border: 2px solid var(--btn-border); 
  border-radius: 10px; 
  padding: .68rem 1.25rem; 
  font-weight: 600 !important; 
  font-family: inherit;
  letter-spacing: .2px;
  cursor: pointer;
  transition: background-color .20s ease, color .20s ease, transform .18s ease, box-shadow .20s ease;
  text-decoration: none !important; 
  -webkit-tap-highlight-color: transparent;
}

/* Hover: relleno khaki */
button:hover,
.btn:hover,
.inicio-boton:hover {
  background-color: var(--accent) !important; 
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

button:focus,
.btn:focus,
.inicio-boton:focus {
  outline: 3px solid rgba(198,160,135,0.16);
  outline-offset: 2px;
}

/* Botones secundarios / outline (igual look) */
.btn.secundario,
.btn-outline,
.inicio-boton.secundario {
  background-color: transparent;
  border: 2px solid var(--btn-border);
  color: var(--btn-border);
}
.btn.secundario:hover,
.btn-outline:hover,
.inicio-boton.secundario:hover {
  background-color: var(--accent) !important; 
  color: #fff !important;
}

/* Parallax CTA — CORREGIDO (Estilo Relleno como en index.php original) */
.parallax-content .btn {
  background: var(--accent);
  color: var(--btn-text-light);
  border: 2px solid var(--accent);
}
.parallax-content .btn:hover {
  background-color: var(--accent) !important; 
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* ==========================================================
   GALERÍA (Estilos movidos desde gallery.php)
   ========================================================== */
.gallery-body .header-actions {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}
.status-summary {
    max-width: 650px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #F8F4F0;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #E0D3C9;
}
.weather-box {
    flex: 1;
    padding-right: 20px;
    border-right: 1px solid #E0D3C9;
    min-width: 200px;
}
.weather-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4F4640;
    margin: 0 0 10px 0;
}
.temp-info {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.temp-info strong {
    font-size: 2.2rem;
    font-weight: 600;
    color: #4F4640;
    margin-right: 10px;
}
.temp-info span {
    font-size: 1.3rem;
    color: #4F4640;
    font-weight: 400;
}
#prendas-recomendadas {
    flex: 2;
}
#prendas-recomendadas h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7C6D60;
    margin: 0 0 10px 0;
}
#prendas-sugeridas-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-top: 5px;
    padding-bottom: 5px;
    align-items: flex-start;
}
.mini-card-outfit {
    min-width: 80px;
    max-width: 90px;
    text-align: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 5px;
    border: 1px solid #E0D3C9;
    flex-shrink: 0;
}
.mini-card-outfit img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 5px;
}
.mini-card-outfit p {
    font-size: 0.75rem;
    margin: 0;
    color: #4F4640;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-body .header h1 {
    font-family: 'DM Serif Display', serif;
    color: #4F4640;
    font-weight: 700; 
    font-size: 2.5rem; 
}
.card-info-align {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.zombi-message, .vender-donar-message {
    background-color: #fce4e4; 
    color: #c00; 
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* ==========================================================
   ESTILOS DE CONTENEDOR DE FILTROS (.tabs)
   ========================================================== */
.tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 1.5rem auto 0;
}

/* ==========================================================
   ESTILOS DE BOTÓN DE FILTRO (.tab)
   ========================================================== */
.tab {
    /* ... Estilos base (mantenidos) ... */
    display: inline-flex;
    align-items: center; 
    background: var(--accent, #C5AC98); 
    color: #fff;
    padding: .6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all .22s ease;
    text-decoration: none;
}

.tab:hover {
    /* Fondo más oscuro al hacer hover y elevación */
    background: var(--accent-2, #7F675A); 
    transform: translateY(-2px); /* Eleva el botón al pasar el ratón */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); 
    color: #fff; 
}

.tab.active {
    /* 💥 CORRECCIÓN ACTIVO: Color ligeramente diferente y SIN la elevación/sombra de hover */
    background: var(--accent-2, #7F675A); /* Mantenemos el color oscuro */
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); /* Sombra más sutil y plana */
    color: #fff;
    transform: translateY(0); /* CLAVE: Sin elevación para que se sienta presionado/fijo */
}

/* ==========================================================
   ESTILOS DE ICONO SVG DENTRO DEL .tab (Incluye la corrección de color marrón)
   ========================================================== */
.icon-tab {
    margin-right: 6px; 
    line-height: 1; 
    fill: none; 
    stroke: var(--text-primary, #38302C); /* Color base del icono: Marrón */
    transition: stroke 0.22s ease; 
}

/* Efecto hover/activo en el icono */
.tab:hover .icon-tab, 
.tab.active .icon-tab {
    /* Hacemos que el icono se atenúe al marrón más claro sobre el fondo oscuro */
    stroke: var(--text-muted, #7F675A); 
}

/* ==========================================================
   ESTILOS DE ICONO SVG DENTRO DEL .tab
   ========================================================== */
.icon-tab {
    /* Espacio entre el icono y el texto */
    margin-right: 6px; 
    
    /* Asegura que no haya espacio extra debajo del SVG */
    line-height: 1; 
    
    /* El 'fill: none' es crucial para Feather Icons (Stroke-based) */
    fill: none; 
    
    /* COLOR BASE MARRÓN: Sobrescribe el color del texto blanco del botón */
    stroke: var(--text-primary, #FBF4F2); 
    transition: stroke 0.22s ease; /* Transición suave para el color */
}

/* Efecto hover/activo en el icono */
.tab:hover .icon-tab, 
.tab.active .icon-tab {
    /* Hacemos que el icono se atenúe al marrón más claro sobre el fondo oscuro */
    stroke: var(--text-muted, #FBF4F2); 
}

/* ==========================================================
   GRID DE GALERÍA Y TARJETAS
   ========================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* 🛑 FICHA PRINCIPAL (Añadir Flexbox y Altura Mínima) */
.card {
  background: rgba(255,255,255,0.92); 
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transition: transform .22s ease, box-shadow .22s ease;
  border: 1px solid #ddd; 
  overflow: hidden; 
  
  /* 🛑 CLAVE 1: Activar Flexbox y columna */
  display: flex !important;
  flex-direction: column !important;
  
  /* 🛑 CLAVE 2: Forzar altura mínima (Ajusta este valor si es demasiado alto o bajo) */
  min-height: 480px !important; 
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,0,0,0.08); }
.card img { 
    width:100%; 
    height:180px; 
    object-fit:cover; 
    border-radius:8px; 
    margin-bottom:.6rem; 
}
.card p { 
    font-weight:600; 
    color:#444; 
}

/* 🛑 CONTENEDOR DE ACCIONES (.row) */
.card .row { 
    display:flex; 
    flex-direction:column; 
    align-items:center; 
    gap: .6rem; 
    margin-top: .8rem; 
    
    /* 🛑 CLAVE 3: Estirar para ocupar todo el espacio sobrante */
    flex-grow: 1 !important; 
    
    /* 🛑 CLAVE 4: Alinear el contenido al final de la tarjeta */
    justify-content: flex-end !important;
}

.card img { 
    width:100%; 
    height:180px; 
    object-fit:cover; 
    border-radius:8px; 
    margin-bottom:.6rem; 
}

.card .card-title {
    font-weight: 600;
    color: var(--text-primary); /* Variable para el color de texto principal */
    font-size: 1.1rem; /* Ajusta el tamaño si quieres */
    margin-bottom: 0.25rem;
}

.card .card-category,
.card .card-date {
    font-weight: 400; /* Un peso más ligero suele ir bien para subtextos */
    color: var(--text-secondary); /* Variable para texto secundario o "muted" */
    font-size: 0.9rem;
}

.card .row { display:flex; flex-direction:column; align-items:center; gap: .6rem; margin-top: .8rem; }
.card-img { /* De gallery.php, por si se usa en otro lado */
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.card-info { /* De gallery.php, por si se usa en otro lado */
  margin-top: 8px;
}
.card-info h3 { /* De gallery.php, por si se usa en otro lado */
  color: var(--text-primary); /* Variable para el color de texto principal */
  font-weight: 600;
  color: var(--text-primary); /* Variable para el color de texto principal */
  font-size: 1.1rem; 
  margin-bottom: 0.25rem;
}

/* ==========================================================
   FORMULARIOS
   ========================================================== */
.form-body { display:flex; justify-content:center; align-items:center; min-height:100vh; padding:2rem 0; }
.form-container { background: rgba(255,255,255,0.95); padding:2.2rem; border-radius:16px; box-shadow: 0 8px 30px rgba(0,0,0,0.06); text-align:center; width:360px; max-width:95%; }
.form-container h2 { font-size:1.5rem; margin-bottom:.6rem; color:#222; }
.form-container input, .form-container select { width:100%; padding:.72rem; margin:.5rem 0; border-radius:8px; border:1px solid #ddd; font-size:.95rem; transition: border .18s ease; }
.form-container input:focus { border-color:var(--accent-3); outline:none; }

/* ==========================================================
   UTILITIES
   ========================================================== */
.error { color:#c53d3d; background: rgba(255,235,235,0.9); padding:.5rem; border-radius:8px; font-size:.9rem; margin-top:.6rem; }
.success { color:#1c6b4c; background: rgba(222,255,240,0.9); padding:.5rem; border-radius:8px; font-size:.9rem; }

.fecha-uso { font-size:.85rem; color:#666; margin-top:.3rem; background: rgba(240,240,240,0.6); padding:.25rem .5rem; border-radius:6px; display:inline-block; }

.fade-in { animation: fadeIn .7s ease both; }
@keyframes fadeIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }


/* ==========================================================
   PANEL SOSTENIBILIDAD Y STATS
   ========================================================== */
.sustainability-summary {
    max-width: 650px;
    margin: 20px auto 15px; 
    padding: 15px 20px;
    background-color: #F8F4F0; 
    border-radius: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.03);
    border: 1px solid #E0D3C9;
    text-align: center;
}
.sustainability-summary h2 {
    font-size: 1.5rem; 
    font-weight: 600;
    color: #7C6D60; 
    margin: 0 0 15px 0;
}
.stats-box-global {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.stat-item-global {
    text-align: center;
    line-height: 1.2;
    padding: 5px 0;
}
.stat-item-global strong {
    display: block;
    font-size: 1.6rem; 
    font-weight: 700;
    color: #4F4640; 
    margin-bottom: 2px;
}
.stat-item-global span {
    display: block;
    font-size: 0.7rem;
    color: #777;
    text-transform: uppercase;
    font-weight: 500;
}

/* ==========================================================
   FICHA DE USO Y RETO (stats-box-subtle) - ESTILOS BASE
   ========================================================== */

/* 1. CONTENEDOR PRINCIPAL: stats-box-subtle */
.stats-box-subtle {
    display: flex;
    justify-content: space-around;
    align-items: center; 
    height: 70px; /* Altura fija */
    
    /* Estilos estéticos */
    padding: 0 0.8rem;
    margin: 0.8rem 0;
    border-radius: 12px;
    background-color: var(--color-timberwolf); 
    text-align: center;
}

/* 2. ITEM INDIVIDUAL: stat-item-subtle */
.stat-item-subtle {
    flex-basis: 50%;
    text-align: center;
    line-height: 1.2;
    /* El position: relative ya no es necesario aquí */
}

/* 3. NÚMERO BASE (strong) - CORRECCIONES DE CENTRADO */
.stat-item-subtle strong {
    /* 💥 CLAVES DE CENTRADO: Permite que el número sea un círculo y se centre */
    display: inline-flex; 
    align-items: center;
    justify-content: center; 
    
    /* Elimina el padding-top que causaba el desplazamiento */
    padding-top: 0; 
    
    /* Asegura que la altura de línea no interfiera */
    line-height: 1; 
    
    /* Mantenemos tus estilos originales */
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

/* 4. TEXTO SUBORDINADO */
.stat-item-subtle span {
    display: block;
    font-size: 0.6rem;
    color: var(--color-subtle-text); 
    text-transform: uppercase;
}

/* ==========================================================
   META ALCANZADA: CÍRCULO CSS PURO (.goal-met)
   ========================================================== */

.stat-item-subtle .goal-met {
    /* Define el tamaño exacto del círculo */
    width: 35px; 
    height: 35px;
    
    /* Dibuja el círculo */
    border-radius: 50%;
    
    /* Colores de Paleta: Khaki de fondo, Cinereous de texto */
    background-color: var(--color-khaki); 
    color: var(--color-cinereous); 
    
    /* Asegura que no tenga padding interno que lo agrande */
    padding: 0; 
    
    /* Evita que el flex lo reduzca */
    flex-shrink: 0; 
}

/* ==========================================================
   PIE DE PÁGINA
   ========================================================== */
body footer {
    width: 100%;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85em;
    color: var(--text); 
    background-color: var(--bg);
}

/* ----------------------------------------------------------
   Media Query: Pantallas Medianas (max-width: 900px)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    /* Layouts Generales */
    .parallax-section { height: 48vh; }
    .combinator-container { 
        grid-template-columns: 1fr; 
        padding: 1rem; 
    }
    
    /* Inicio y Header */
    .inicio-titulo { font-size: 2.2rem; }
    .header { 
        flex-direction: column; 
        gap: .8rem; 
        text-align: center; 
        padding: 1rem 0; 
    }
    .header-actions { 
        justify-content: center; 
    }
    
    /* Galería */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 1.5rem;
    }

    /* Panel de Estadísticas Globales */
    .stats-box {
        padding: 1rem;
        flex-direction: column; 
        gap: 10px;
        align-items: flex-start;
    }
    .stats-box .stat-item {
        width: 100%; 
        text-align: left;
    }
    
    /* Resumen de estado (Clima + Sugerencias) */
    .status-summary {
        flex-direction: column;
        gap: 15px;
    }
    .weather-box {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #E0D3C9;
        padding-bottom: 15px;
    }
}

/* ----------------------------------------------------------
   Media Query: Pantallas Pequeñas/Móvil (max-width: 600px)
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    /* Inicio */
    .inicio-contenedor { 
        padding: 1.5rem; 
    }
    .inicio-subtitulo { 
        font-size: 1.1rem; 
    }
    .inicio-boton, .btn { 
        width: 100%; 
        text-align: center; 
    }

    /* Galería */
    .gallery, .gallery-grid {
        grid-template-columns: 1fr; /* Una sola columna para móvil */
        gap: 1rem;
        padding: 1.5rem; /* Menos padding en móvil */
    }
    .card img { 
        height: 180px; 
        object-fit: cover;
    }

    /* Tarjetas */
    .card {
        padding: 15px;
    }
    .card-info h3 {
        font-size: 1rem;
    }
    .card-actions {
        flex-direction: column;
        gap: 10px;
    }
    .card-actions button {
        width: 100%;
    }
    
    /* Parallax */
    .parallax-section { 
        height: 55vh; 
    }
    .parallax-content h1 {
        font-size: 1.8rem;
    }

    /* Header de Galería */
    .gallery-body .header h1 {
        font-size: 1.8rem;
    }
}

/* ==========================================================
   FIX DEFINITIVO HEADER STICKY
   Estas reglas fuerzan la compatibilidad de "position: sticky" 
   anulando posibles conflictos en contenedores padres.
   ========================================================== */

/* 1. ANULA CUALQUIER RESTRICCIÓN DE OVERFLOW EN EL SCROLL PRINCIPAL */
/* Esto es CRUCIAL: asegura que el scroll de la página sea el del <html> o <body> */
html, body {
    /* Anula cualquier overflow: hidden o scroll que rompa el sticky */
    overflow: visible !important;
    overflow-x: visible !important;
    /* Asegura que el alto sea flexible, no fijo */
    height: auto !important; 
    min-height: 100vh; 
}

/* 2. FUERZA AL HEADER A SER STICKY Y LO PONE AL FRENTE DE TODO */
.header {
    position: -webkit-sticky !important; /* Para navegadores basados en Webkit (Safari) */
    position: sticky !important;
    top: 0 !important; /* Se pega a la parte superior (posición 0) */
    z-index: 999 !important; /* Siempre encima del contenido */
    width: 100% !important; /* Ocupa todo el ancho disponible */
}

/* ==========================================================
   ESTILOS DE PLANIFICACIÓN SEMANAL (plan_semanal.php) - VERSIÓN FINAL Y LIMPIA
   ========================================================== */

/* ------------------ 0. VARIABLES DE MODO OSCURO PARA PLANIFICADOR ------------------ */

body.dark-mode {
    /* 1. Fondo principal del BODY (Negro Profundo) */
    --color-background-page: #1a1a1a; 

    /* 2. Fondo de Tarjetas/Celdas (Blanco Roto del Combinador) */
    --color-card-background-light: #f7f7f7; 
    
    /* 3. Colores de Texto y Border */
    --color-text-dark-card: #403830;      /* Texto oscuro para las tarjetas claras */
    --color-text-primary: #e0e0e0;        /* Texto claro para el header/body */
    --color-border: #444444;              /* Borde oscuro para elementos principales */
    
    /* Sobrescribe la variable principal --card para que las tarjetas usen el fondo CLARO */
    --card: var(--color-card-background-light); 
    
    background-color: var(--color-background-page); 
}

/* ------------------ 1. LAYOUT PRINCIPAL Y ESPACIADO (Dar aire) ------------------ */

.main-container {
    display: flex;
    max-width: 1400px;
    margin: 3rem auto; /* Más aire arriba y abajo */
    padding: 0 40px; 
    gap: 40px; /* Separación amplia entre Looks y Calendario */
    align-items: flex-start;
}

/* ------------------ 2. SIDEBAR (LOOKS) ------------------ */

.looks-sidebar {
    width: 280px;
    flex-shrink: 0;
    padding: 1.5rem;
    background: var(--card); 
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 85vh;
    overflow-y: auto;
    position: sticky;
    top: 100px; 
}
.looks-sidebar h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900; 
    font-size: 1.5rem; 
    text-align: center;
    margin-bottom: 0.5rem;
}
.drag-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Items del sidebar */
.look-item {
    background: #FAF5F2; 
    border: 1px solid #EAE0D7; 
    border-radius: 12px;
    padding: 15px; 
    margin-bottom: 1.5rem; 
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06); 
    display: flex; 
    flex-direction: column;
    align-items: center; /* Centrado horizontal */
    text-align: center;
}
.look-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}
.look-description {
    font-family:'Montserrat';
  font-size: 1.1rem; 
  font-weight: 900; 
  margin-bottom: 0.5rem;
}
.no-img-text {
    color: #999;
    font-size: 0.75rem;
}

/* ------------------ 3. CALENDARIO (Alturas iguales/Aesthetic) ------------------ */

.calendar-section { flex-grow: 1; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 25px; 
    
    /* ALTURA FIJA: Fuerza la misma altura para todas las filas del grid */
    grid-auto-rows: 300px; 
}
.calendar-cell {
    background: var(--card); 
    border-radius: var(--radius);
    padding: 1.2rem; 
    
    /* Ocupa la altura forzada y permite Flexbox interno */
    height: 100%; 
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

/* Encabezado del día y clima */
.day-header {
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 0.75rem; 
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 8px;
}
.day-name { 
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem; 
    font-weight: 900; 
    margin-bottom: 0;
}
.day-date { 
    font-size: 1rem; 
    color: var(--text-secondary); 
}
.weather-indicator {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px; 
}
.icon-weather {
    width: 24px; 
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor; 
}  

/* Dropzone */
.outfit-drop-zone {
    /* CLAVE: Se estira para llenar el espacio restante */
    flex-grow: 1; 
    
    border: 2px dashed #C5AC98; 
    border-radius: 10px;
    
    /* 🎯 Centrado Horizontal y Vertical para el texto "Arrastra aquí" */
    display: flex; 
    align-items: center; 
    justify-content: center;
    
    margin-top: 15px; 
    position: relative;
    transition: all 0.2s;
}
.outfit-drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(197, 172, 152, 0.15);
}
.weather-suggestion { 
    font-size: 0.9rem; 
    color: #8B7C71;
    font-style: italic; 
    text-align: center; 
    padding: 10px;
}

/* Contenedor del look planificado (cuando ya hay un look) */
.planned-outfit-wrapper { 
    width: 100%; 
    height: 100%; 
    position: relative; 
    
    /* 🎯 Centrado Horizontal y Vertical para la imagen */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-unplan {
    position: absolute; 
    top: -8px; 
    right: -8px;
    background: #d9534f; 
    color: #fff;
    border: 2px solid var(--card); 
    border-radius: 50%; 
    width: 28px; 
    height: 28px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    z-index: 10;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn-unplan:hover { transform: scale(1.1); }


/* ------------------ 4. IMÁGENES APILADAS Y CENTRADO DE MINIATURAS ------------------ */

.look-preview {
    position: relative;
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.look-thumb, .planned-thumb {
    position: absolute;
    width: 80px; 
    height: 80px;
    object-fit: cover;
    border-radius: 10px; 
    
    /* 🎯 Centrado perfecto de la miniatura dentro de su contenedor */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 3px 6px rgba(0,0,0,0.15); 
    background: #fff;
    border: 1px solid #eee;
}

/* ------------------ 5. AJUSTES DE HEADER ------------------ */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 40px; 
    background-color: #fff; 
    border-bottom: none; 
    position: sticky;
    top: 0;
    z-index: 10;
}

/* TÍTULO (Tipografía correcta y centrada) */
.header-center {
    flex-grow: 1;
    text-align: center;
}
.page-title {
    font-family: 'DM Serif Display', serif !important; 
    font-size: 2.5rem !important; 
    color: #38302C; 
    margin: 0;
    font-weight: 400; 
    letter-spacing: -0.5px;
}
.page-title i {
    font-style: italic; 
    font-family: 'DM Serif Display', serif;
}


/* ------------------ 6. MODO OSCURO (Aplicación de Reglas) ------------------ */

body.dark-mode .header { 
    background-color: var(--color-background-page); 
    border-bottom: 1px solid var(--color-border);
}

/* Aplicación de colores oscuros para header y texto general */
body.dark-mode .page-title { color: var(--color-text-primary); }
body.dark-mode .logo-text { color: var(--color-text-primary); }

/* Fuerza el texto a OSCURO en las tarjetas CLARAS (Legibilidad sobre #f7f7f7) */
body.dark-mode .looks-sidebar, 
body.dark-mode .calendar-cell {
    color: var(--color-text-dark-card); 
}
body.dark-mode .day-date,
body.dark-mode .weather-indicator,
body.dark-mode .drag-hint,
body.dark-mode .weather-suggestion,
body.dark-mode .look-description,
body.dark-mode .no-img-text {
    color: var(--color-text-dark-card) !important;
}
body.dark-mode .weather-indicator svg {
    stroke: var(--color-text-dark-card) !important;
}

/* Ajustes de borde y sombra de elementos en modo oscuro */
body.dark-mode .look-item {
    border-color: #d0d0d0;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.08); 
}
body.dark-mode .outfit-drop-zone { 
    border-color: #A59286; 
}
body.dark-mode .look-thumb, 
body.dark-mode .planned-thumb { 
    box-shadow: 0 0 0 2px rgba(240, 240, 240, 0.5), 0 3px 6px rgba(0,0,0,0.5); 
}

/* ------------------ 7. RESPONSIVIDAD ------------------ */

@media (max-width: 900px) {
    .main-container { 
        flex-direction: column; 
        gap: 1.5rem;
        padding: 0 1rem;
    }
    .looks-sidebar { 
        width: 100%; 
        position: static; 
        max-height: none; 
        order: 2; 
        padding: 1.5rem;
    }
    .calendar-section {
        order: 1; 
        padding: 0 1rem;
    }
    .calendar-grid { 
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    }
    .header {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .header {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }
    .logo-text { display: none; }
    .header-center { 
        order: -1; 
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    .header-actions {
        order: 1;
        flex-basis: 100%;
        justify-content: space-between;
        gap: 5px;
    }
    
    .btn-header:nth-child(3) { 
        font-size: 0;
        width: 40px;
        padding: 0 !important;
    }
    .btn-header:nth-child(3) svg {
        display: inline-block !important;
        margin: 0;
        width: 16px; 
        height: 16px;
    }

    .calendar-grid { 
        grid-template-columns: 1fr;
    }
    .calendar-cell {
        min-height: 200px;
    }
}
