/* Layout CSS - Navbar, Footer, Drawer */

/* Topbar / Navbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    min-height: 42px;
    overflow: visible;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 750;
    font-size: 25px;
    letter-spacing: -0.02em;
    position: relative;
    overflow: visible;
}
.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    margin: -8px 0;
}
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: conic-gradient(
        from 180deg,
        var(--red),
        var(--yellow),
        var(--green),
        var(--blue),
        var(--red)
    );
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.16);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}
.nav-link {
    font-weight: 700;
    font-size: 14px;
    color: var(--red);
    padding: 10px 10px;
    border-radius: 12px;
}
.nav-link:hover {
    background: rgba(17, 24, 39, 0.05);
    color: var(--text);
}
.nav-link.active {
    color: white;
    background: var(--red);
    border: 1px solid rgba(17, 24, 39, 0.08);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease;
}
.icon-btn:hover {
    box-shadow: var(--shadow-sm);
}
.icon {
    width: 20px;
    height: 20px;
    display: block;
}
.cart-badge {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    background: #e11d48;
    /* merah */
    color: #fff;

    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;

    border-radius: 999px;
    box-shadow: 0 0 0 2px #fff;
}
.hamburger {
    display: none;
}

/* Mobile drawer */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(17, 24, 39, 0.45);
    display: none;
}
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 90;
    width: min(86vw, 340px);
    background: #fff;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    padding: 18px;
    border-right: 1px solid rgba(17, 24, 39, 0.08);
}
.drawer.open {
    transform: translateX(0);
}
.drawer-backdrop.open {
    display: block;
}
.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}
.drawer .nav-link {
    padding: 12px 12px;
}
.drawer-footer {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

/* Footer */
.footer {
    background: #0b1220;
    color: rgba(255, 255, 255, 0.86);
    padding: 44px 0 22px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 18px;
}
.footer h4 {
    margin: 0 0 10px;
    font-size: 14px;
    letter-spacing: -0.01em;
    color: #fff;
}
.footer a {
    color: rgba(255, 255, 255, 0.82);
}
.footer a:hover {
    color: #fff;
}
.footer small {
    color: rgba(255, 255, 255, 0.65);
}
.footer-bottom {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.social a {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.social a:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Responsive Layout */
@media (max-width: 720px) {
    .user-dropdown {
        display: none;
    }
    .brand {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 750;
        font-size: 17px;
        letter-spacing: -0.02em;
        position: relative;
        overflow: visible;
    }
    /* .brand-logo {
        display: none;
    } */
    .nav-links {
        display: none;
    }
    .nav-link {
        font-weight: 700;
        font-size: 14px;
        color: var(--red);
        padding: 10px 10px;
        border-radius: 12px;
    }
    .hamburger {
        display: inline-flex;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
