/* ============================================================
   InAllCart — Shared Navbar & Footer Styles
   components.css  |  Loaded by every page
   ============================================================ */

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(37,99,235,0.08);
    height: 76px;
    display: flex;
    align-items: center;
    transition: height 0.3s ease, box-shadow 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.navbar.nav-hidden {
    transform: translateY(-100%);
}
.navbar.nav-visible {
    transform: translateY(0);
}
.navbar.nav-compact {
    height: 64px !important;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.98) !important;
}
.navbar.scrolled {
    height: 68px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: var(--scroll-progress, 0%);
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    transition: width 0.1s ease;
}

/* ── NAV CONTAINER & LOGO ── */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
}
.brand-logo-main {
    display: block;
    height: 46px;
    width: auto;
    max-width: min(240px, 42vw);
    object-fit: contain;
}
.footer-brand-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
}
.brand-logo-footer {
    display: block;
    width: min(240px, 100%);
    height: auto;
    object-fit: contain;
}

/* ── NAV LINKS ── */
.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}
.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    position: relative;
    transition: color 0.3s ease;
    text-decoration: none;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

/* ── LIVE DEMO BUTTON ── */
.btn-demo {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #ffffff !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700 !important;
    box-shadow: 0 4px 16px rgba(37,99,235,0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}
.btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}
.btn-demo::after { display: none !important; }

/* ── HAMBURGER ── */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark);
    line-height: 1;
}

/* ── RESOURCES DROPDOWN (Desktop) ── */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}
.nav-dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem !important;
    color: var(--text);
    transition: color 0.3s ease;
    text-decoration: none;
}
.nav-dropdown-toggle:hover { color: var(--primary) !important; }
.nav-dropdown-toggle::after { display: none !important; }
.nav-chevron {
    font-size: 0.65rem !important;
    transition: transform 0.3s ease;
    pointer-events: none;
}
.nav-dropdown:hover .nav-chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.13);
    min-width: 215px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, top 0.25s ease, visibility 0.25s ease;
    z-index: 9999;
    border: 1px solid rgba(37,99,235,0.1);
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px; left: 50%;
    width: 12px; height: 12px;
    background: #fff;
    border-left: 1px solid rgba(37,99,235,0.1);
    border-top: 1px solid rgba(37,99,235,0.1);
    transform: translateX(-50%) rotate(45deg);
}
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: calc(100% + 10px);
}
.nav-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 11px 14px !important;
    border-radius: 9px;
    color: var(--text) !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
    margin-bottom: 2px;
    text-decoration: none;
}
.nav-dropdown-item:last-child { margin-bottom: 0; }
.nav-dropdown-item:hover { background: #f1f5f9 !important; color: var(--primary) !important; }
.nav-dropdown-item::after { display: none !important; }
.nav-dropdown-item i { width: 18px; color: var(--primary); font-size: 0.85rem; flex-shrink: 0; }

/* ── FOOTER ── */
.footer {
    background: #060d1a;
    border-top: 1px solid rgba(37,99,235,0.15);
    color: #94a3b8;
    padding: 80px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}
.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
}
.footer-col a {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}
.footer-col a:hover { color: #60a5fa; transform: translateX(5px); }
.footer-bottom {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 30px;
    font-size: 0.9rem;
    color: #64748b;
}
.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-icons a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    color: #94a3b8;
    text-decoration: none;
}
.social-icons a:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
}
.qr-code {
    width: 140px; height: 140px;
    border-radius: 14px;
    margin-bottom: 15px;
    background: white;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: block;
}

/* ── MOBILE NAV (≤768px) ── */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 76px; left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 10px 20px 20px;
        display: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        z-index: 999;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
    }
    .nav-links.active { display: flex; }

    /* Each top-level link gets a divider row */
    .nav-links > a {
        padding: 14px 4px !important;
        border-bottom: 1px solid #e2e8f0;
        width: 100%;
        font-size: 0.95rem;
        color: var(--text);
    }
    .nav-links > a:last-child { border-bottom: none; }

    /* Dropdown block */
    .nav-dropdown {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        border-bottom: 1px solid #e2e8f0;
    }
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 14px 4px !important;
        font-size: 0.95rem !important;
        color: var(--text) !important;
    }
    .nav-dropdown-toggle::after { display: none !important; }

    /* Submenu slides in */
    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: 3px solid rgba(37,99,235,0.25);
        border-radius: 0;
        padding: 4px 0 8px 14px;
        margin: 0 0 6px 4px;
        background: transparent;
        display: none;
        opacity: 1;
        visibility: visible;
        min-width: unset;
    }
    .nav-dropdown-menu::before { display: none; }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown.open .nav-chevron { transform: rotate(180deg); }

    .nav-dropdown-item {
        padding: 10px 10px !important;
        color: #64748b !important;
        font-size: 0.9rem !important;
        border-radius: 8px;
        margin-bottom: 2px;
    }
    .nav-dropdown-item:hover {
        background: rgba(37,99,235,0.06) !important;
        color: var(--primary) !important;
    }

    /* Live Demo button at bottom */
    .nav-links > .btn-demo {
        margin-top: 14px !important;
        text-align: center;
        border-bottom: none !important;
        padding: 12px 28px !important;
        align-self: flex-start;
    }

    .brand-logo-main { height: 38px; max-width: 180px; }
    .brand-logo-footer { width: min(200px, 100%); }

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

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .brand-logo-main { height: 34px; max-width: 150px; }
    .brand-logo-footer { width: min(170px, 100%); }
}
