* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== LIGHT MODE (default) ===== */
:root {
    --text: hsl(196, 44%, 5%);
    --background: hsl(187, 44%, 96%);
    --sub-background: hsl(187, 44%, 60%);
    --sub-primary: hsl(197, 69%, 40%);
    --primary: hsl(197, 69%, 33%);
    --secondary: hsl(225, 46%, 73%);
    --accent: hsl(240, 45%, 61%);
    --footer: hsl(210, 29%, 24%);
    --button-nav-mobile: hsl(235, 26%, 16%);
    --highlight: #7fff00;
    /* greenyellow */
    --white: #ffffff;

    /* tambahan untuk komponen */
    --card-bg: #ffffff;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    --text-muted: #718096;
    --border-light: #edf2f7;
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.15);
    --dropdown-bg: #ffffff;
    --dropdown-text: #2d3748;
    --navbar-text: #ffffff;
    --filter-panel-bg: #ffffff;
    --btn-primary-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --btn-primary-text: #ffffff;
}

/* ===== DARK MODE – kontras tinggi ===== */
body.dark-mode {
    /* Warna teks utama – putih terang */
    --text: #f0f4f8;
    --background: #18212F;
    --sub-background: #243447;
    --sub-primary: hsl(197, 69%, 55%);
    --primary: #3b5a7a;
    --secondary: hsl(225, 40%, 60%);
    --accent: hsl(240, 60%, 65%);
    --footer: #0f1620;
    --button-nav-mobile: #2a3a52;

    /* Komponen */
    --card-bg: #243447;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    --text-muted: #b0c4de;
    --border-light: #3a506e;
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.2);
    --dropdown-bg: #243447;
    --dropdown-text: #e8edf5;
    --navbar-text: #ffffff;
    --filter-panel-bg: #243447;
    --btn-primary-bg: linear-gradient(135deg, #5a7bc0 0%, #8a6db5 100%);
    --btn-primary-text: #ffffff;
}

body {
    background: var(--background);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main,
.main-container,
.main-content,
.container {
    flex: 1 0 auto;
}

body.dark-mode .section-title {
    color: #ffffff !important;
}

.container {
    max-width: 1440px;
    margin: 20px auto;
}

/* ======= NAVBAR DAN BOTTOM NAVIGATION ======== */
.navbar-modern {
    background: var(--primary);
    padding: 0.6rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    transition: background 0.3s ease;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.navbar-brand img {
    height: 30px;
    width: auto;
}

.navbar-brand:hover {
    color: #fff;
    opacity: 0.85;
}

.navbar-center {
    flex: 1 1 auto;
    max-width: 560px;
    min-width: 180px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.navbar-search {
    position: relative;
    width: 100%;
}

.navbar-search-input {
    width: 100%;
    padding: 0.55rem 3.4rem 0.55rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.92rem;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
    outline: none;
}

.navbar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
}

.navbar-search-input:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.navbar-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: color 0.3s;
    font-size: 1rem;
}

.navbar-search-btn:hover {
    color: #fff;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

/* ===== TOMBOL TOGGLE DARK/LIGHT ===== */
.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(20deg);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

body.dark-mode .theme-toggle i {
    transform: rotate(180deg);
}

/* theme toggle mobile */
.mobile-theme-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.mobile-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   FILTER PRODUK (Kategori, Rentang Harga, Bahan, Urutan)
   ============================================================ */
.navbar-filter {
    position: relative;
    flex-shrink: 0;
}

.navbar-filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
}

.navbar-filter-toggle:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}

.navbar-filter.open .navbar-filter-toggle {
    background: rgba(255, 255, 255, 0.2);
    border-color: #8a9eff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4);
}

.navbar-filter-badge {
    background: #e94560;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.navbar-filter-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s;
}

.navbar-filter.open .navbar-filter-arrow {
    transform: rotate(180deg);
}

.navbar-filter-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 320px;
    max-height: 75vh;
    overflow-y: auto;
    background: var(--filter-panel-bg);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-light);
    padding: 1rem 1rem 0;
    z-index: 1050;
    color: var(--text);
    scroll-behavior: smooth;
}

.navbar-filter.open .navbar-filter-panel {
    display: block;
}

.filter-group+.filter-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.filter-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.35rem 0.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text);
    transition: background 0.2s;
}

.filter-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.filter-option input[type="radio"] {
    accent-color: var(--accent);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

.filter-actions {
    position: sticky;
    bottom: 0;
    margin-top: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0.85rem 1rem;
    background: var(--filter-panel-bg);
    border-top: 1px solid var(--border-light);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.08);
}

.filter-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 38px;
    padding: 0 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.filter-btn-reset {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.filter-btn-reset:hover {
    transform: translateY(-1px);
    filter: brightness(0.9);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    color: #ffffff;
}

.filter-btn-apply {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 59, 92, 0.25);
}

.filter-btn-apply:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
    box-shadow: 0 6px 16px rgba(11, 59, 92, 0.4);
    color: #ffffff;
}

/* Dark Mode Filter Panel Overrides */
body.dark-mode .navbar-filter-panel,
body.dark-mode .mobile-filter-panel {
    background: #243447 !important;
    background-color: #243447 !important;
    border-color: #3a506e !important;
    color: #f0f4f8 !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .navbar-filter-panel .filter-group,
body.dark-mode .mobile-filter-panel .filter-group {
    border-color: #3a506e !important;
}

body.dark-mode .filter-group-title {
    color: #b0c4de !important;
}

body.dark-mode .filter-option {
    color: #f0f4f8 !important;
}

body.dark-mode .filter-option:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .filter-option span {
    color: #f0f4f8 !important;
}

body.dark-mode .filter-actions {
    background: #243447 !important;
    border-color: #3a506e !important;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.35);
}

body.dark-mode .filter-btn-reset {
    background: var(--accent) !important;
    color: #ffffff !important;
}

body.dark-mode .filter-btn-reset:hover {
    filter: brightness(1.1) !important;
    color: #ffffff !important;
}

body.dark-mode .filter-btn-apply {
    background: var(--primary) !important;
    color: #ffffff !important;
}

body.dark-mode .filter-btn-apply:hover {
    background: #4a6a90 !important;
    color: #ffffff !important;
}

.navbar-cart {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    transition: all 0.3s;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.navbar-cart:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: 0;
    background: #e94560;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.6);
}

.navbar-notif {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    transition: all 0.3s;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.navbar-notif:hover,
.navbar-notif.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: 0;
    background: #e94560;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.6);
}

.notif-badge.show {
    display: flex;
}

.navbar-external {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-external:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-external i {
    font-size: 0.9rem;
}

.navbar-auth {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}

.navbar-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: #fff;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.navbar-dropdown {
    position: relative;
}

.navbar-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
    pointer-events: auto;
    z-index: 1050;
}

.navbar-dropdown-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1051;
}

.navbar-dropdown-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.navbar-dropdown-toggle .dropdown-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s;
}

.navbar-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.navbar-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 185px;
    background: var(--dropdown-bg, #ffffff);
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 6px;
    list-style: none;
    border: 1px solid var(--border-light, #edf2f7);
    z-index: 1050;
    margin-top: 8px;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-dropdown:hover .navbar-dropdown-menu,
.navbar-dropdown-menu.show {
    display: block;
}

.navbar-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1rem;
    color: var(--dropdown-text, #2d3748);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.navbar-dropdown-menu li a i {
    font-size: 0.95rem;
    color: var(--text-muted, #718096);
    transition: transform 0.25s ease, color 0.25s ease, filter 0.25s ease;
}

.navbar-dropdown-menu li a:hover {
    background: rgba(82, 152, 168, 0.08);
    color: var(--primary, #1e6074);
    box-shadow: 0 0 12px rgba(82, 152, 168, 0.2), inset 0 0 0 1px rgba(82, 152, 168, 0.18);
    transform: translateX(3px);
}

.navbar-dropdown-menu li a:hover i {
    color: var(--primary, #1e6074);
    transform: scale(1.15);
    filter: drop-shadow(0 0 5px rgba(82, 152, 168, 0.4));
}

.navbar-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border-light, #edf2f7);
    margin: 4px 6px;
    border: none;
}

/* Logout link in dropdown */
.navbar-dropdown-menu li a.dropdown-item-logout,
.navbar-dropdown-menu li a[href*="logout"] {
    color: #dc2626;
}

.navbar-dropdown-menu li a.dropdown-item-logout i,
.navbar-dropdown-menu li a[href*="logout"] i {
    color: #dc2626;
}

.navbar-dropdown-menu li a.dropdown-item-logout:hover,
.navbar-dropdown-menu li a[href*="logout"]:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.2), inset 0 0 0 1px rgba(220, 38, 38, 0.18);
}

.navbar-dropdown-menu li a.dropdown-item-logout:hover i,
.navbar-dropdown-menu li a[href*="logout"]:hover i {
    color: #b91c1c;
    filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.4));
}

/* Dark Mode Dropdown Menu */
body.dark-mode .navbar-dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .navbar-dropdown-menu li a {
    color: #cbd5e1;
}

body.dark-mode .navbar-dropdown-menu li a i {
    color: #94a3b8;
}

body.dark-mode .navbar-dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25), inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

body.dark-mode .navbar-dropdown-menu li a:hover i {
    color: #38bdf8;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

body.dark-mode .navbar-dropdown-menu li a.dropdown-item-logout,
body.dark-mode .navbar-dropdown-menu li a[href*="logout"] {
    color: #ef4444;
}

body.dark-mode .navbar-dropdown-menu li a.dropdown-item-logout i,
body.dark-mode .navbar-dropdown-menu li a[href*="logout"] i {
    color: #ef4444;
}

body.dark-mode .navbar-dropdown-menu li a.dropdown-item-logout:hover,
body.dark-mode .navbar-dropdown-menu li a[href*="logout"]:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25), inset 0 0 0 1px rgba(239, 68, 68, 0.2);
}

body.dark-mode .navbar-dropdown-menu li a.dropdown-item-logout:hover i,
body.dark-mode .navbar-dropdown-menu li a[href*="logout"]:hover i {
    color: #f87171;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
}

body.dark-mode .navbar-dropdown-menu .dropdown-divider {
    background: #334155;
}

/* ===== HAMBURGER (mobile toggle) - DIPERBAIKI ===== */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
    color: #ffffff;
    font-size: 20px;

    /* [PERBAIKAN] Pastikan tombol berada di lapisan paling atas & responsif di mobile */
    position: relative;
    z-index: 1001;
    touch-action: manipulation;
}

.menu-toggle i {
    display: block;
    line-height: 1;
    /* [PERBAIKAN] Agar klik pada ikon langsung diteruskan ke tombol pembungkusnya */
    pointer-events: none;
}

/* ----- MOBILE OVERLAY MENU (slide down) ----- */
.navbar-mobile-overlay {
    display: none;
    width: 100%;
    background: rgba(18, 25, 38, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.4s ease,
        padding 0.4s ease;
    opacity: 0;
    padding: 0 1rem;
    margin: 0;

    /* [PERBAIKAN] Positioning & Pointer Events */
    position: fixed;
    top: 62px;
    /* Sesuaikan dengan tinggi navbar Anda */
    left: 0;
    z-index: 999;
    pointer-events: none;
    /* Mencegah overlay memblokir klik saat tertutup */
}

.navbar-mobile-overlay.active {
    display: block;
    max-height: 700px;
    opacity: 1;
    padding: 1rem 1rem 1.5rem;
    overflow-y: auto;

    /* [PERBAIKAN] Mengaktifkan kembali klik saat menu terbuka */
    pointer-events: auto;
}

.navbar-mobile-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mobile-item {
    width: 100%;
}

.mobile-filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.mobile-filter-toggle:focus,
.mobile-filter-toggle.open {
    border-color: #8a9eff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.mobile-filter-toggle i:first-child {
    margin-right: 6px;
}

.mobile-filter-panel {
    display: none;
    background: var(--filter-panel-bg);
    border-radius: 16px;
    margin-top: 0.6rem;
    padding: 1rem 1rem 0;
    max-height: 60vh;
    overflow-y: auto;
    color: var(--text);
    scroll-behavior: smooth;
}

.mobile-filter-panel.open {
    display: block;
}

.mobile-search-wrapper {
    position: relative;
    width: 100%;
}

.mobile-search-input {
    width: 100%;
    padding: 0.6rem 3.2rem 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
    outline: none;
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
}

.mobile-search-input:focus {
    border-color: #8a9eff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.mobile-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: color 0.3s;
    font-size: 1rem;
}

.mobile-search-btn:hover {
    color: #fff;
}

/* ----- RESPONSIVE NAVBAR ----- */
@media (max-width: 1350px) and (min-width: 1151px) {
    .navbar-center {
        max-width: 440px;
    }
}

@media (max-width: 1150px) and (min-width: 769px) {
    .navbar-center {
        max-width: 320px;
    }
}

@media (max-width: 992px) {
    .navbar-modern {
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 768px) {

    .navbar-center,
    .navbar-filter,
    .navbar-cart,
    .navbar-notif,
    .navbar-external,
    .navbar-auth,
    .navbar-dropdown {
        display: none !important;
    }

    .navbar-modern {
        padding: 0.5rem 1rem;
        flex-wrap: nowrap;
        background: var(--primary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar-left {
        flex: 1;
        gap: 0.5rem;
    }

    .navbar-brand {
        font-size: 0.9rem;
    }

    .navbar-brand img {
        height: 22px;
    }

    .navbar-right {
        gap: 0.5rem;
    }

    .menu-toggle {
        display: flex !important;
    }

    .navbar-mobile-overlay {
        display: block;
    }

    /* [PERBAIKAN] Hapus opacity: 0 agar animasi bisa jalan */
    .navbar-mobile-overlay.active .mobile-item {
        animation: fadeSlideIn 0.4s ease forwards;
    }

    .navbar-mobile-overlay.active .mobile-item:nth-child(1) {
        animation-delay: 0.05s;
    }

    .navbar-mobile-overlay.active .mobile-item:nth-child(2) {
        animation-delay: 0.10s;
    }

    @keyframes fadeSlideIn {
        0% {
            opacity: 0;
            transform: translateY(-12px) scale(0.96);
        }

        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

@media (max-width: 400px) {
    .navbar-modern {
        padding: 0.5rem 0.8rem;
    }

    .navbar-brand {
        font-size: 0.8rem;
    }

    .navbar-brand img {
        height: 20px;
    }

    .mobile-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }

    .mobile-search-input {
        font-size: 0.8rem;
        padding: 0.5rem 2.8rem 0.5rem 0.8rem;
    }

    .mobile-filter-toggle {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}

/* ============================================================
   BOTTOM NAVIGATION - FLOATING PILL (Mobile Only)
   ============================================================ */
.bottom-nav {
    position: fixed !important;
    left: 50% !important;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    -webkit-transform: translate3d(-50%, 0, 0) !important;
    transform: translate3d(-50%, 0, 0) !important;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    width: calc(100% - 32px);
    max-width: 320px;
    background: var(--button-nav-mobile);
    border-radius: 32px;
    display: none;
    align-items: center;
    padding: 0 6px;
    z-index: 999999 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: 52px;
    transition: background 0.3s ease;
    touch-action: manipulation;
}

/* Tambahan untuk dark mode agar bottom nav lebih kontras */
body.dark-mode .bottom-nav {
    background: #2a3a52;
    /* lebih terang dari background */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.bottom-nav-side {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-evenly;
}

.bottom-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s, transform 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    position: relative;
}

.bottom-nav-item i {
    font-size: 16px;
    transition: transform 0.2s;
}

.bottom-nav-item>span:not(.cart-badge-bottom):not(.notification-badge) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: #ffffff;
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-home {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin: 0 6px;
    background: var(--primary);
    border-radius: 50%;
    color: #fff;
    transform: translateY(-16px);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.55), 0 0 0 5px #16161f;
}

/* Dark mode: home button lebih terang */
body.dark-mode .bottom-nav-home {
    background: #4a6a8a;
    box-shadow: 0 8px 18px rgba(70, 130, 200, 0.6), 0 0 0 5px #1a2533;
}

.bottom-nav-home i {
    font-size: 19px;
}

.bottom-nav-home:hover,
.bottom-nav-home.active {
    color: #fff;
    transform: translateY(-16px) scale(1.05);
}

.bottom-nav-home.active i {
    transform: none;
}

.bottom-nav-cart .cart-badge-bottom {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e94560;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 2px 6px rgba(233, 69, 96, 0.5);
}

.bottom-nav-item .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e94560;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 2px 6px rgba(233, 69, 96, 0.5);
}

.bottom-nav-item .notification-badge.show {
    display: flex;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background-color: var(--footer);
    color: #ecf0f1;
    padding: 12px 0 6px;
    margin-top: auto;
    font-family: "Poppins", sans-serif;
    animation: slideUp 0.5s ease;
    transition: background 0.3s ease;
}

@keyframes slideUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 12px 35px;
}

.footer-section {
    flex: 1 1 200px;
    max-width: 260px;
    margin-bottom: 2px;
    padding: 0 5px;
}

.footer-section h3 {
    font-size: 0.9rem;
    margin-bottom: 6px;
    position: relative;
    padding-bottom: 4px;
    font-weight: 600;
}

.footer-section h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 22px;
    height: 2px;
    background-color: #3498db;
}

.footer-section p {
    margin-bottom: 3px;
    line-height: 1.35;
    font-size: 0.78rem;
}

.footer-section p:last-child {
    margin-bottom: 0;
}

.footer-section i {
    margin-right: 6px;
    color: #3498db;
    width: 14px;
    font-size: 0.8rem;
}

/* ============================================================
   SOCIAL LINKS
   ============================================================ */
.social-links {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.social-links a {
    display: block;
    position: relative;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ecf0f1;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    line-height: 1;
    margin: 0;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

.social-links a:hover {
    background-color: #3498db;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
    font-size: 0.72rem;
}

.footer-bottom p {
    margin: 0;
    padding: 0;
}

/* ============================================================
   RESPONSIVE FOOTER & BOTTOM NAV
   ============================================================ */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important;
    }

    .footer {
        padding: 14px 15px 8px;
        margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .footer-section {
        flex: none;
        width: 100%;
        max-width: 360px;
        margin-bottom: 2px;
        text-align: center;
        padding: 0;
    }

    .footer-section h3 {
        font-size: 0.88rem;
        margin-bottom: 5px;
        padding-bottom: 3px;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section p {
        font-size: 0.76rem;
        line-height: 1.35;
        margin-bottom: 2px;
    }

    .social-links {
        justify-content: center;
        gap: 10px;
        margin-top: 5px;
    }

    .footer-bottom {
        margin-top: 6px;
        padding-top: 6px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .bottom-nav {
        height: 48px;
        width: calc(100% - 20px);
        max-width: 280px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .bottom-nav-item {
        width: 32px;
        height: 32px;
    }

    .bottom-nav-item i {
        font-size: 15px;
    }

    .bottom-nav-home {
        width: 44px;
        height: 44px;
        transform: translateY(-14px);
    }

    .bottom-nav-home i {
        font-size: 18px;
    }

    .bottom-nav-home:hover,
    .bottom-nav-home.active {
        transform: translateY(-14px) scale(1.05);
    }

    .bottom-nav-cart .cart-badge-bottom,
    .bottom-nav-item .notification-badge {
        font-size: 8px;
        min-width: 14px;
        height: 14px;
    }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    transform: translateY(10px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.back-to-top:active {
    transform: scale(0.95);
}

@media (min-width: 769px) {
    .back-to-top {
        bottom: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 70px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ============================================================
   BREADCRUMB / LOKASI HALAMAN (RESPONSIF & DARK MODE)
   ============================================================ */
.app-breadcrumb-nav {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 20px;
}

.app-breadcrumb-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
    box-sizing: border-box;
}

.app-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 12px 20px;
    margin: 0;
    width: 100%;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 0.88rem;
    line-height: 1.4;
    transition: background 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

.app-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.app-breadcrumb-link:hover {
    color: var(--accent);
    text-decoration: none;
    transform: translateY(-1px);
}

.app-breadcrumb-home-icon {
    font-size: 0.95rem;
}

.app-breadcrumb-separator {
    color: var(--text-muted, #718096);
    font-size: 0.72rem;
    opacity: 0.65;
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.app-breadcrumb-current {
    color: var(--text-muted, #718096);
    font-weight: 500;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* Dark Mode Breadcrumb */
body.dark-mode .app-breadcrumb-list {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

body.dark-mode .app-breadcrumb-link {
    color: #38bdf8;
}

body.dark-mode .app-breadcrumb-link:hover {
    color: #818cf8;
}

body.dark-mode .app-breadcrumb-separator {
    color: #64748b;
}

body.dark-mode .app-breadcrumb-current {
    color: #94a3b8;
}

/* Mobile Responsive Breadcrumb */
@media (max-width: 768px) {
    .app-breadcrumb-nav {
        margin: 6px 0 12px 0;
    }

    .app-breadcrumb-container {
        padding: 0 10px;
    }

    .app-breadcrumb-list {
        padding: 5px 10px;
        font-size: 0.74rem;
        gap: 4px;
        border-radius: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .app-breadcrumb-list::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari */
    }

    .app-breadcrumb-item {
        gap: 4px;
    }

    .app-breadcrumb-link {
        gap: 4px;
    }

    .app-breadcrumb-home-icon {
        font-size: 0.78rem;
    }

    .app-breadcrumb-separator {
        font-size: 0.58rem;
        opacity: 0.5;
    }

    .app-breadcrumb-current {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .app-breadcrumb-nav {
        margin: 4px 0 10px 0;
    }

    .app-breadcrumb-container {
        padding: 0 8px;
    }

    .app-breadcrumb-list {
        padding: 4px 8px;
        font-size: 0.7rem;
        gap: 3px;
        border-radius: 6px;
    }

    .app-breadcrumb-home-icon {
        font-size: 0.72rem;
    }

    .app-breadcrumb-separator {
        font-size: 0.52rem;
    }

    .app-breadcrumb-current {
        max-width: 120px;
    }
}

/* ============================================================
   PAGINATION STYLING (RESPONSIF, COMPACT & NO-WRAP)
   ============================================================ */
#pagination-wrapper {
    width: 100%;
    margin-top: 25px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#pagination-wrapper .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap !important;
    gap: 6px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

#pagination-wrapper .page-item {
    display: inline-flex;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

#pagination-wrapper .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    background: var(--card-bg, #ffffff);
    color: var(--text, #2d3748);
    border: 1px solid #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

#pagination-wrapper .page-link:hover {
    background: var(--sub-primary, #38bdf8);
    color: #ffffff;
    border-color: var(--sub-primary, #38bdf8);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#pagination-wrapper .page-item.active .page-link {
    background: var(--primary, #0f4c81);
    color: #ffffff;
    border-color: var(--primary, #0f4c81);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.35);
}

#pagination-wrapper .page-item.disabled .page-link {
    background: rgba(0, 0, 0, 0.02);
    border-color: #e2e8f0;
    color: var(--text-muted, #a0aec0);
    cursor: not-allowed !important;
    box-shadow: none;
    opacity: 0.45;
    pointer-events: none;
}

#pagination-wrapper .page-link.pagination-ellipsis,
#pagination-wrapper .pagination-ellipsis {
    border: none;
    background: transparent;
    width: auto;
    min-width: 18px;
    padding: 0 2px;
    cursor: default;
    box-shadow: none;
    color: var(--text-muted, #a0aec0);
    font-weight: 800;
    letter-spacing: 1px;
}

/* Dark mode pagination */
body.dark-mode #pagination-wrapper .page-link {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.dark-mode #pagination-wrapper .page-link:hover {
    background: var(--accent, #6366f1);
    border-color: var(--accent, #6366f1);
    color: #ffffff;
}

body.dark-mode #pagination-wrapper .page-item.active .page-link {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

body.dark-mode #pagination-wrapper .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.02);
    border-color: #334155;
    color: #64748b;
    opacity: 0.35;
    pointer-events: none;
}

/* Jump to page styling */
.pagination-jump-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--card-bg, #ffffff);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    font-size: 13px;
    color: var(--text-muted, #718096);
    transition: all 0.3s ease;
}

body.dark-mode .pagination-jump-wrapper {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.pagination-jump-input {
    width: 44px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: var(--background, #f8fafc);
    color: var(--text, #1e293b);
    font-weight: 700;
    font-size: 13px;
    padding: 0;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-jump-input:focus {
    border-color: var(--primary, #0f4c81);
    box-shadow: 0 0 0 2px rgba(15, 76, 129, 0.2);
}

body.dark-mode .pagination-jump-input {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .pagination-jump-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.pagination-jump-input::-webkit-outer-spin-button,
.pagination-jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination-jump-input[type=number] {
    -moz-appearance: textfield;
}

.pagination-jump-total {
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    line-height: 1;
    color: var(--text-muted, #64748b);
    user-select: none;
}

body.dark-mode .pagination-jump-total {
    color: #94a3b8;
}

.pagination-jump-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--primary, #0f4c81);
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.pagination-jump-btn:hover {
    background: var(--sub-primary, #38bdf8);
    transform: scale(1.08);
}

/* Mobile screen optimization */
@media (max-width: 768px) {
    .pagination-hide-mobile {
        display: none !important;
    }
}

@media (max-width: 576px) {
    #pagination-wrapper {
        margin-top: 15px;
        margin-bottom: 5px;
        gap: 8px;
    }

    #pagination-wrapper .pagination {
        gap: 4px;
    }

    #pagination-wrapper .page-link {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    #pagination-wrapper .page-link.pagination-ellipsis,
    #pagination-wrapper .pagination-ellipsis {
        min-width: 14px;
        padding: 0 1px;
    }

    .pagination-jump-wrapper {
        padding: 3px 10px;
        font-size: 12px;
    }

    .pagination-jump-input {
        width: 38px;
        height: 26px;
        font-size: 12px;
    }
}

/* ============================================================
   GLOBAL ALERT STYLES (Dismissible & Auto-dismiss)
   ============================================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    box-sizing: border-box;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert span {
    flex: 1;
    line-height: 1.4;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-success i {
    color: #28a745;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.alert-error i,
.alert-danger i {
    color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
}

.alert-warning i {
    color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 5px solid #17a2b8;
}

.alert-info i {
    color: #17a2b8;
}

.alert-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    margin-left: auto;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.alert-fade-out {
    opacity: 0 !important;
    transform: translateY(-8px) scale(0.98);
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
    overflow: hidden !important;
}

/* Dark Mode Alerts */
body.dark-mode .alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #a3e635;
    border-left-color: #22c55e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .alert-success i {
    color: #22c55e;
}

body.dark-mode .alert-error,
body.dark-mode .alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #fca5a5;
    border-left-color: #ef4444;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .alert-error i,
body.dark-mode .alert-danger i {
    color: #ef4444;
}

body.dark-mode .alert-warning {
    background: rgba(255, 193, 7, 0.18);
    color: #fde047;
    border-left-color: #eab308;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .alert-warning i {
    color: #eab308;
}

body.dark-mode .alert-info {
    background: rgba(23, 162, 184, 0.2);
    color: #7dd3fc;
    border-left-color: #0ea5e9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .alert-info i {
    color: #0ea5e9;
}

body.dark-mode .alert-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   TWEAK NUMBER INPUTS (TAP TARGET & HIDE SPINNERS)
   ============================================================ */
/* Hide default increment/decrement arrows on number inputs globally */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    /* Firefox */
}

/* Ensure minimum tap target of 44px on mobile devices */
@media (max-width: 768px) {

    input[type="number"],
    .cart-quantity-btn,
    .cart-quantity-input,
    .quantity-btn,
    .qty-btn,
    button[onclick*="updateQuantity"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}