/* =============================================
   HOODS — main.css
   Navbar · Hero · Nosotros · Galería · Footer
   ============================================= */

/* ── Variables ─────────────────────────────── */
:root {
    --primary:    #ff4f00;
    --primary-dk: #e64600;
    --bg:         #212529;
    --bg-card:    #2c3034;
    --bg-input:   #1a1d20;
    --border:     #3d4247;
    --text:       #f8f9fa;
    --text-muted: #9aa0a6;
    --success:    #25d366;
    --font-head:  'Oswald', sans-serif;
    --font-body:  'Poppins', sans-serif;
    --radius:     12px;
    --transition: 0.25s ease;
}

/* ── Reset / Base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    line-height: 1.2;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dk); }

img { max-width: 100%; display: block; }

/* ── Utilidades ─────────────────────────────── */
.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-family: var(--font-head);
    letter-spacing: 1px;
}

.text-primary-hoods { color: var(--primary); }

.btn-hoods {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn-hoods:hover { background: var(--primary-dk); transform: translateY(-2px); color: #fff; }

/* ── Toast ──────────────────────────────────── */
#toast {
    visibility: hidden;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(255,79,0,0.4);
    white-space: nowrap;
}
#toast.show {
    visibility: visible;
    animation: toastIn 0.4s ease, toastOut 0.4s ease 2.1s forwards;
}
@keyframes toastIn  { from { opacity:0; bottom: 10px } to { opacity:1; bottom: 30px } }
@keyframes toastOut { from { opacity:1; bottom: 30px } to { opacity:0; bottom: 10px } }

/* ── Navbar ─────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 70px;
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    background: var(--bg);
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}
.navbar-brand img { width: 44px; border-radius: 50%; }

/* ── Logo centrado (index.php) ──────────────── */
.navbar-brand-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    text-decoration: none;
}
.navbar-brand-center img {
    width: 72px;       /* más grande que el original de 44px */
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform var(--transition);
}
.navbar-brand-center img:hover { transform: scale(1.08); }

.navbar-links-left,
.navbar-links-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.navbar-links a {
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color var(--transition);
}
.navbar-links a:hover { color: var(--primary); }

.navbar-links .btn-empresa {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all var(--transition);
}
.navbar-links .btn-empresa:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-carrito {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background var(--transition), transform var(--transition);
}
.btn-carrito:hover { background: var(--primary-dk); transform: translateY(-1px); }

#cart-count {
    background: #fff;
    color: var(--primary);
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* Hamburger mobile */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.navbar-toggler span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: all var(--transition);
    border-radius: 2px;
}

/* Sesión empresa (solo visible si hay sesión) */
.btn-salir {
    padding: 7px 14px;
    background: rgba(255,79,0,0.12);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition);
}
.btn-salir:hover { background: var(--primary); color: #fff; }

/* ── Hero ───────────────────────────────────── */
#hero {
    height: 100vh;
    min-height: 600px;
    background: url('../imgs/hero-bg.jpg') center center / cover no-repeat fixed;/* --------------FONDO DE PANTALLA --------------- */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 25, 0.82);
}

#hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 1rem;
}

#hero h1 {
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-family: var(--font-head);
    color: #fff;
    letter-spacing: 2px;
    line-height: 1;
}

#hero p {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    color: var(--text-muted);
    margin: 1rem 0 2rem;
    font-weight: 300;
}

/* ── Nosotros ───────────────────────────────── */
#nosotros {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
}

#nosotros .about-img {
    background: url('../imgs/about-bg.jpg') center center / cover no-repeat;
    min-height: 300px;
}

#nosotros .about-content {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    padding: 4rem 3rem;
}

#nosotros .about-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1.2rem;
    color: #fff;
}
#nosotros .about-content h2 span { color: var(--primary); }

#nosotros .about-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ── Galería ────────────────────────────────── */
#galeria {
    background: var(--bg);
}

#galeria .galeria-header {
    text-align: center;
    padding: 4rem 1rem 2rem;
}
#galeria .galeria-header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.galeria-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.galeria-item:hover img { transform: scale(1.06); }

/* ── Footer ─────────────────────────────────── */
#footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 1.5rem;
}

#footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 2rem;
    text-align: center;
}

#footer h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#footer p { color: var(--text-muted); font-size: 0.9rem; }

#footer .footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Botones Flotantes ──────────────────────── */
.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    z-index: 2000;
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    font-size: 1.5rem;
    position: relative;
}
.fab-btn:hover {
    transform: translateY(-3px) scale(1.07);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* WhatsApp */
.fab-whatsapp {
    background: #25d366;
    color: #fff;
}
.fab-whatsapp:hover { color: #fff; }

/* Carrito flotante — OCULTO en desktop (ya está en la navbar) */
.fab-carrito {
    background: var(--primary);
    color: #fff;
    font-size: 1.3rem;
    display: none;   /* solo aparece en mobile */
}
.fab-carrito:hover { color: #fff; }

.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fff;
    color: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 991px) {
    .navbar-toggler { display: block; }

    /* Navbar de dos columnas con logo centrado */
    .navbar-links-left {
        display: none;  /* se ocultan en mobile */
    }

    .navbar-links-right {
        display: none;
        position: absolute;
        top: 70px; left: 0; right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }
    .navbar-links-right.open { display: flex; }

    /* Navbar clásica (carrito.php) */
    .navbar-links {
        display: none;
        position: absolute;
        top: 70px; left: 0; right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }
    .navbar-links.open { display: flex; }

    /* El carrito en la navbar se oculta en mobile (hay FAB) */
    .navbar-links-right .btn-carrito,
    .navbar-links .btn-carrito { display: none; }

    /* En mobile el carrito flotante SÍ aparece, junto al WhatsApp */
    .fab-carrito { display: flex; }

    #nosotros { grid-template-columns: 1fr; }
    #nosotros .about-img { min-height: 250px; }
    #nosotros .about-content { padding: 2.5rem 1.5rem; }

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

    #footer .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 575px) {
    .galeria-grid { grid-template-columns: 1fr 1fr; }
    #hero h1 { font-size: 3rem; }
}
