/* ============================================================
   Kids Kingdom - Header + Footer Stylesheet
   (All header + footer + nav + dropdown + search + footer-badge
   CSS lives here. Keep this separate from style.css.)
   ============================================================ */

/* ================= HEADER ================= */
body.nav-open { overflow: hidden; }

.site-header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo img { height: 60px; /* width: 42px; border-radius: 50%;  */}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--color-dark);
    transition: color 0.2s, background 0.2s;
}

.search-icon:hover {
    color: var(--color-primary);
    background: var(--color-bg);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-dark);
}

/* Mobile-only pieces - hidden on desktop by default */
.mobile-nav-header { display: none; }
.nav-close { display: none; }
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 150;
}
.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ================= NAV + DROPDOWN ================= */
.main-nav .nav-list {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--color-dark);
    transition: color 0.2s;
}

/* Hover = color change only, no background */
.nav-link:hover,
.nav-item.open > .nav-link {
    color: var(--color-primary);
}

.caret { font-size: 0.7rem; }

/*
   Dropdown gap fix:
   The submenu sits flush against the bottom of the nav-item
   (top: 100%, no margin-top gap) so the hover area is continuous
   from the link straight into the dropdown - moving the mouse
   down never leaves a "dead zone" that closes the menu.
   Visual breathing room is added with padding-top INSIDE the
   submenu box instead of a margin, so the box itself starts
   right where the link ends.
*/
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    margin-top: 0;
}

.nav-item:hover .submenu,
.nav-item.open .submenu {
    display: block;
}

.submenu li a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 500;
    color: var(--color-text);
    transition: color 0.2s;
}

.submenu li a:hover {
    color: var(--color-primary);
}

/* ================= FOOTER ================= */
.site-footer {
    background: #FFF3E6;
    border-top: 1px solid #F0E4D3;
    margin-top: 40px;
    color: var(--color-text);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 14px;
    color: var(--color-dark);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #555;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--color-primary);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.footer-logo img { height: 56px; /* width: 36px; border-radius: 50%;  */}

.footer-desc {
    font-size: 0.9rem;
    color: #666;
    max-width: 320px;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: var(--color-dark);
    box-shadow: var(--shadow);
    transition: color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-divider {
    border: none;
    border-top: 1px solid #F0E4D3;
    margin-bottom: 20px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-copy {
    font-size: 0.85rem;
    color: #777;
}

.footer-copy .heart {
    color: var(--color-primary);
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.footer-legal-links a {
    color: #777;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: var(--color-primary);
}

.footer-legal-links span {
    color: #ccc;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 28px;
    padding-top: 16px;
    border-top: 1px solid #F0E4D3;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-dark);
}

.badge-icon { font-size: 1rem; }

/* ================= RESPONSIVE ================= */
@media (max-width: 860px) {
    .menu-toggle { display: block; }

    .header-inner { flex-wrap: nowrap; }

    /*
       Mobile nav = fixed right-side slide-in drawer/panel.
       It does NOT push page content - it overlays on top,
       sliding in from off-screen right (right: -100%) to
       right: 0 when opened.
    */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 85vw);
        height: 100vh;
        background: #fff;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        z-index: 200;
        overflow-y: auto;
        transition: right 0.3s ease;
        padding-bottom: 20px;
    }

    .main-nav.open {
        right: 0;
    }

    .nav-overlay { display: block; }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
    }

    .mobile-nav-title {
        font-family: var(--font-heading);
        font-weight: 700;
        color: var(--color-primary);
        font-size: 1.1rem;
    }

    .nav-close {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        line-height: 1;
        color: var(--color-dark);
        cursor: pointer;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0;
    }

    .nav-item { width: 100%; }

    .nav-link { padding: 14px 20px; border-radius: 0; }

    .submenu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
        display: none;
    }

    .nav-item.open .submenu { display: block; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand-col {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}