/* --- VARIABLES --- */
:root {
    --color-primario: #ef6735;       /* Naranja Marca */
    --color-acento: #d65a00;         /* Naranja Oscuro Hover */
    --color-texto: #333333;          /* Gris Oscuro Texto */
    --color-footer: #1a1a1a;         /* Negro Footer */
    --color-gris-claro: #f4f6f8;     /* Fondos suaves */
    --fuente-principal: 'Poppins', sans-serif;
    --sombra-nav: 0 2px 10px rgba(0,0,0,0.05);
    --sombra-card: 0 10px 30px rgba(0,0,0,0.08);
}

/* --- RESET BÁSICO --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--fuente-principal); color: var(--color-texto); background-color: #fff; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- 1. HEADER & NAV (Estilo FisioSpace) --- */
header {
    background: white;
    box-shadow: var(--sombra-nav);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primario);
    text-transform: uppercase;
    display: flex; align-items: center; gap: 10px;
}

/* Menú Principal */
.nav-menu ul { display: flex; gap: 30px; align-items: center; }
.nav-menu a { font-weight: 500; font-size: 0.95rem; color: #444; }
.nav-menu a:hover { color: var(--color-primario); }

/* Dropdown (Menú Desplegable para Servicios) */
.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-top: 3px solid var(--color-primario);
    z-index: 1000;
    border-radius: 0 0 5px 5px;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a {
    padding: 12px 16px;
    display: block;
    border-bottom: 1px solid #eee;
}
.dropdown-content a:hover { background-color: #f9f9f9; }

/* --- 2. HERO (PORTADA IMPACTANTE) --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?q=80&w=2070');
    background-size: cover;
    background-position: center;
    height: 400px; /* Altura ajustada para catálogos */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.hero-content h1 { font-size: 3rem; margin-bottom: 15px; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 30px; opacity: 0.9; }

.btn-cta {
    background-color: var(--color-primario);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(239, 103, 53, 0.4);
}
.btn-cta:hover { background-color: var(--color-acento); transform: translateY(-2px); }

/* --- 3. CONTENIDO PRINCIPAL --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; flex: 1; }

.section-title {
    text-align: center;
    margin-bottom: 30px;
}
.section-title h2 { font-size: 2rem; color: var(--color-texto); margin-bottom: 10px; }
.divider { width: 60px; height: 3px; background-color: var(--color-primario); margin: 0 auto 20px; }

/* --- ACORDEÓN (LISTA DESPLEGABLE) --- */
.accordion-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    transition: background 0.3s;
}
.accordion-header:hover { background-color: #e9ecef; }
.accordion-header h2 { font-size: 1.4rem; color: var(--color-primario); margin: 0; display: flex; align-items: center; gap: 10px; }
.accordion-icon { transition: transform 0.3s; font-size: 1.2rem; color: #666; }
.accordion-header.active .accordion-icon { transform: rotate(180deg); }

.accordion-content {
    max-height: 2000px; /* Altura máxima para animación */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 1;
}
.accordion-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* --- GRID COMPACTA (AHORA DE 3 COLUMNAS) --- */
.services-grid-compact {
    display: grid;
    /* CAMBIO: Forzamos 3 columnas fijas en escritorio */
    grid-template-columns: repeat(3, 1fr);
    gap: 25px; /* Un poco más de espacio entre tarjetas */
    margin-bottom: 50px;
    padding: 10px 5px;
}

/* Tarjeta Compacta (AJUSTADA: IMAGEN MÁS GRANDE) */
.compact-card {
    background: white;
    border-radius: 12px; /* Borde más redondeado como las grandes */
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Sombra un poco más fuerte */
    transition: transform 0.2s;
    border: 1px solid #eee;
    display: flex; flex-direction: column;
}
.compact-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.12); }

.compact-card img {
    width: 100%;
    /* CAMBIO IMPORTANTE: Aumentamos altura de 140px a 200px para que se vean grandes */
    height: 200px;
    object-fit: cover;
}

.compact-body {
    padding: 20px; /* Más espacio interno */
    display: flex; flex-direction: column; flex-grow: 1; text-align: center;
}
.compact-body h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--color-primario); font-weight: 700; line-height: 1.2; }
.compact-body p {
    font-size: 0.9rem; /* Letra un poco más grande */
    color: #666; margin-bottom: 18px; flex-grow: 1; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.btn-add-mini {
    width: 100%; padding: 10px; /* Botón un poco más grande */
    background-color: var(--color-texto); color: white;
    border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem;
    transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-add-mini:hover { background-color: var(--color-primario); }

/* Grid de Servicios (Estándar para Faciales/Corporales.html) */
.services-grid {
    display: grid;
    /* CAMBIO: Forzamos 3 columnas fijas en escritorio en lugar de automático */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}
.service-card {
    background: white; border-radius: 12px; overflow: hidden; box-shadow: var(--sombra-card);
    transition: transform 0.3s; border: 1px solid #eee; display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-10px); }
.service-card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--color-primario); }
.card-content p { color: #666; font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }
.btn-add { width: 100%; padding: 12px; background-color: var(--color-texto); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-add:hover { background-color: var(--color-primario); }

/* --- 4. FOOTER PROFESIONAL --- */
footer {
    background-color: var(--color-footer);
    color: #bbb;
    padding: 70px 0 30px;
    margin-top: auto;
}

.footer-grid {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 50px;
}
.footer-col h4 { color: white; font-size: 1.1rem; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col p, .footer-col li { margin-bottom: 12px; font-size: 0.95rem; }
.footer-col a { color: #bbb; }
.footer-col a:hover { color: var(--color-primario); }
.social-links { display: flex; gap: 15px; margin-top: 20px; }
.social-links a { width: 40px; height: 40px; background: #333; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; transition: 0.3s; }
.social-links a:hover { background: var(--color-primario); }
.copyright { text-align: center; border-top: 1px solid #333; padding-top: 30px; font-size: 0.85rem; }

/* --- 5. CARRITO SIDE-PANEL --- */
.floating-cart-btn {
    position: fixed; bottom: 30px; right: 30px; background-color: var(--color-primario); color: white;
    width: 65px; height: 65px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    box-shadow: 0 5px 20px rgba(239, 103, 53, 0.5); cursor: pointer; z-index: 2000; transition: transform 0.2s;
}
.floating-cart-btn:hover { transform: scale(1.1); }
.cart-badge {
    position: absolute; top: 0; right: 0; background: red; color: white;
    width: 24px; height: 24px; border-radius: 50%; font-size: 0.8rem; font-weight: bold;
    display: flex; justify-content: center; align-items: center; border: 2px solid white;
}

.cart-sidebar {
    position: fixed; top: 0; right: -400px; width: 380px; height: 100vh; background: white; z-index: 3000;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2); transition: right 0.4s ease; display: flex; flex-direction: column;
}
.cart-sidebar.open { right: 0; }
.cart-header { background: var(--color-primario); color: white; padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.cart-body { flex: 1; padding: 20px; overflow-y: auto; }
.cart-footer { padding: 20px; border-top: 1px solid #eee; background: #f9f9f9; }
.cart-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2500; }
.cart-overlay.open { display: block; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }
.cart-item-remove { color: #dc3545; cursor: pointer; padding: 5px; }

/* --- RESPONSIVE (CELULARES) --- */
@media (max-width: 768px) {
    .nav-menu { display: none; }

    /* En móvil mantenemos 2 columnas para el desplegable (tarjetas chicas) */
    .services-grid-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* En móvil forzamos 1 columna para las tarjetas grandes (Faciales.html) */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 { font-size: 2rem; }
    .cart-sidebar { width: 100%; right: -100%; }
}