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

:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --primary-soft: #e8f5e9;
    --secondary: #ff9800;
    --secondary-dark: #f57c00;
    --secondary-light: #fff3e0;
    --accent: #9c27b0;
    --danger: #f44336;
    --warning: #ffc107;
    --info: #2196f3;
    --success: #4caf50;
    --text-dark: #1a1a2e;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --shadow-primary: 0 10px 30px rgba(46,125,50,0.2);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background: var(--bg-light);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== LOADING SCREEN ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a2e1f;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

.loading-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.fruit-loader {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.fruit {
    font-size: 40px;
    animation: fruitBounce 0.6s ease infinite alternate;
}

.fruit:nth-child(1) { animation-delay: 0s; }
.fruit:nth-child(2) { animation-delay: 0.15s; }
.fruit:nth-child(3) { animation-delay: 0.3s; }
.fruit:nth-child(4) { animation-delay: 0.45s; }

@keyframes fruitBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-30px); }
}

.loading-text {
    color: white;
    font-size: 18px;
    letter-spacing: 2px;
}

/* ==================== SCROLL TO TOP ==================== */
.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

/* ==================== FLOATING CART ==================== */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 99;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-primary);
}

.floating-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    font-size: 11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ==================== NAVBAR berkualitas ==================== */
.navbar {
    background: var(--bg-white);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
}

.logo-text h1 span {
    color: var(--primary);
}

.logo-text p {
    font-size: 10px;
    color: var(--text-gray);
    letter-spacing: 1px;
}

.search-wrapper {
    flex: 1;
    max-width: 450px;
}

.search-container {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 0 18px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.search-container:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.search-container i {
    color: var(--text-gray);
}

.search-container input {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.search-voice {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-gray);
    padding: 8px;
    transition: var(--transition);
}

.search-voice:hover {
    color: var(--primary);
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-bell i {
    font-size: 20px;
    color: var(--text-gray);
    transition: var(--transition);
}

.notification-bell:hover i {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10;
}

.notification-bell:hover .notification-dropdown {
    opacity: 1;
    visibility: visible;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.notification-header button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--primary-soft);
}

.notification-item.unread {
    background: #fff8e1;
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-light);
}

.notification-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-light);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tracking-btn, .review-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 30px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-dark);
}

.tracking-btn:hover, .review-btn:hover {
    background: #f5f5f5;
}

.review-btn {
    position: relative;
}

.pending-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 40px;
    background: #f5f5f5;
    transition: var(--transition);
}

.user-trigger:hover {
    background: #e0e0e0;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 10px;
    display: none;
    z-index: 10;
}

.user-dropdown:hover .user-menu {
    display: block;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.user-menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

.user-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-name {
    font-weight: 600;
    font-size: 14px;
}

.user-menu-email {
    font-size: 11px;
    color: var(--text-light);
}

.user-menu-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

/* === Dropdown user: state "belum masuk" === */
.user-menu-guest { padding: 4px 6px 6px; }
.umg-head { display: flex; align-items: center; gap: 12px; padding: 6px 4px 12px; }
.umg-icon {
    width: 46px; height: 46px; border-radius: 50%;
    background: #e8f5e9; color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.umg-title { font-weight: 700; font-size: 14px; color: var(--text-dark); }
.umg-sub { font-size: 11.5px; color: var(--text-light); line-height: 1.35; }
.umg-benefits { list-style: none; margin: 2px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.umg-benefits li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #4b5563; }
.umg-benefits li i { color: var(--primary); font-size: 13px; }
.umg-note { font-size: 10.5px; color: var(--text-light); line-height: 1.4; margin-top: 8px; text-align: center; }
.login-btn-google { background: #fff; color: #3c4043; border: 1.5px solid #dadce0; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.login-btn-google:hover { background: #f8f9fa; border-color: #c6cace; }
.login-btn-google i { color: #4285f4; }

/* === Bottom sheet akun (mobile) === */
.wb-sheet-overlay { display: none; position: fixed; inset: 0; z-index: 1050; background: rgba(0,0,0,.45); }
.wb-sheet { position: absolute; bottom: 0; left: 0; right: 0; max-height: 88vh; overflow-y: auto;
    background: #fff; border-radius: 24px 24px 0 0; padding: 10px 20px calc(28px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(0,0,0,.18); }
.wb-sheet-handle { width: 40px; height: 4px; background: #ddd; border-radius: 2px; margin: 4px auto 12px; }
.wb-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wb-sheet-head h3 { font-size: 1.05rem; color: #1a2b1c; display: flex; align-items: center; gap: 8px; }
.wb-sheet-head h3 i { color: var(--primary); }
.wb-sheet-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: #f2f2f2; color: #555;
    font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wb-sheet-close:hover { background: #e8e8e8; }

.wb-acct-hero { display: flex; align-items: center; gap: 14px; padding: 4px 0 14px; }
.wb-acct-avatar { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: #e8f5e9; color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden; }
.wb-acct-avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }
.wb-acct-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.wb-acct-title { font-weight: 700; font-size: .98rem; color: #1a2b1c; }
.wb-acct-sub { font-size: .78rem; color: #7a7a7a; line-height: 1.35; margin-top: 2px; }
.wb-acct-benefits { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wb-acct-benefits li { display: flex; align-items: center; gap: 9px; font-size: .84rem; color: #4b5563; }
.wb-acct-benefits li i { color: var(--primary); font-size: .9rem; }
.wb-btn-google { width: 100%; background: #fff; color: #3c4043; border: 1.5px solid #dadce0; border-radius: 12px;
    padding: 13px 16px; font-size: .93rem; font-weight: 700; cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.wb-btn-google:hover { background: #f8f9fa; border-color: #c6cace; }
.wb-btn-google i { color: #4285f4; font-size: 1rem; }
.wb-btn-google:disabled { opacity: .6; cursor: default; }
.wb-acct-note { font-size: .68rem; color: #9aa0a6; line-height: 1.45; text-align: center; margin: 10px 2px 0; }

.wb-acct-profile { display: flex; align-items: center; gap: 14px; padding: 6px 0 16px; }
.wb-acct-pinfo { min-width: 0; }
.wb-acct-name { font-weight: 700; font-size: 1rem; color: #1a2b1c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-acct-email { font-size: .8rem; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wb-acct-group { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; margin-bottom: 12px;
    border: 1px solid #eee; background: #fff; }
.wb-acct-appearance { margin-top: 4px; }
.wb-acct-label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9aa0a6;
    padding: 10px 14px 4px; }
.wb-acct-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border: none; background: #fff;
    color: #2b2b2b; font-size: .92rem; font-weight: 600; cursor: pointer; text-align: left; }
.wb-acct-item + .wb-acct-item { border-top: 1px solid #f2f2f2; }
.wb-acct-item:hover { background: #fafafa; }
.wb-acct-item > i:first-child { width: 20px; text-align: center; color: var(--primary); font-size: 1rem; }
.wb-acct-item span { flex: 1; }
.wb-chev { color: #c4c4c4; font-size: .8rem; }
.wb-acct-item-danger { color: #c62828; }
.wb-acct-item-danger > i:first-child { color: #c62828; }

/* Dark mode untuk sheet akun */
body.dark-mode .wb-sheet { background: #1e1e1e; box-shadow: 0 -8px 32px rgba(0,0,0,.5); }
body.dark-mode .wb-sheet-head h3 { color: #eaeaea; }
body.dark-mode .wb-sheet-close { background: #2c2c2c; color: #bbb; }
body.dark-mode .wb-sheet-close:hover { background: #333; }
body.dark-mode .wb-acct-title,
body.dark-mode .wb-acct-name { color: #eaeaea; }
body.dark-mode .wb-acct-sub,
body.dark-mode .wb-acct-email { color: #9aa0a6; }
body.dark-mode .wb-acct-benefits li { color: #c9c9c9; }
body.dark-mode .wb-acct-group { background: #262626; border-color: #333; }
body.dark-mode .wb-acct-item { background: #262626; color: #e0e0e0; }
body.dark-mode .wb-acct-item + .wb-acct-item { border-top-color: #333; }
body.dark-mode .wb-acct-item:hover { background: #2f2f2f; }
body.dark-mode .wb-btn-google { background: #2a2a2a; color: #eaeaea; border-color: #3a3a3a; }
body.dark-mode .wb-btn-google:hover { background: #333; }
body.dark-mode .wb-acct-item-danger { color: #ef9a9a; }
body.dark-mode .wb-acct-item-danger > i:first-child { color: #ef9a9a; }

.login-btn, .logout-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.login-btn:hover, .logout-btn:hover {
    background: var(--primary-dark);
}

.admin-btn {
    background: var(--secondary);
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,152,0,0.3);
}

/* ==================== HERO SECTION ==================== */
/* ==================== HERO CAROUSEL (Phase 13) ==================== */
.hero-berkualitas {
    background: var(--primary-soft);
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}

.hero-berkualitas .container {
    display: block;
}

.hero-carousel {
    position: relative;
    background: var(--bg-white);
    border: 1px solid rgba(46, 125, 50, 0.14);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-carousel:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
}

.hc-viewport {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Phase 20: background video cinematic bersama di belakang seluruh carousel.
   Satu elemen video untuk tiga slide — tidak pernah di-restart saat ganti slide;
   sinkronisasi "warna per slide" lewat .hc-bg-tint (transisi background-color). */
.hc-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hc-bg-scrim {
    position: absolute;
    inset: 0;
    /* Phase 21: .74 → .58 — video lebih jelas di area luar kartu voucher;
       teks gelap tetap terbaca di atas video yang diterangkan scrim. */
    background: rgba(252, 254, 251, 0.58);
    z-index: 0;
}

.hc-bg-tint {
    position: absolute;
    inset: 0;
    background: rgba(46, 125, 50, 0.10);
    transition: background-color 0.6s ease;
    z-index: 0;
}

.hero-carousel[data-slide="1"] .hc-bg-tint {
    background: rgba(255, 152, 0, 0.14);
}

.hero-carousel[data-slide="2"] .hc-bg-tint {
    background: rgba(27, 94, 32, 0.12);
}

.hc-track {
    display: flex;
    transform: translateX(calc(var(--hc-i, 0) * -100%));
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.hc-slide {
    flex: 0 0 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    padding: 44px 72px;
}

.hc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hc-chip i {
    color: var(--primary);
}

.hc-text h2 {
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.hc-text p {
    color: var(--text-gray);
    line-height: 1.65;
    max-width: 46ch;
    margin-bottom: 26px;
}

.hc-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-berkualitas .hc-btn-solid {
    background: var(--primary);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.22);
}

.hc-media {
    height: clamp(250px, 26vw, 340px);
    background: var(--bg-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.hc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid rgba(46, 125, 50, 0.25);
    color: var(--primary-dark);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 2;
}

.hc-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.hc-arrow:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

.hc-prev {
    left: 14px;
}

.hc-next {
    right: 14px;
}

.hc-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 0 18px;
}

.hc-dot {
    position: relative;
    width: 26px;
    height: 26px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hc-dot::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.28);
    transition: var(--transition);
}

.hc-dot.is-active::before {
    background: var(--primary);
    transform: scale(1.4);
}

.hc-dot:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: -2px;
    border-radius: 999px;
}

.hc-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@media (max-width: 960px) {
    .hc-slide {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 28px 26px;
    }
    .hc-media {
        height: clamp(220px, 40vw, 300px);
    }
}

@media (max-width: 640px) {
    .hero-berkualitas {
        padding: 24px 0;
    }
    .hc-arrow {
        display: none;
    }
    .hc-slide {
        padding: 26px 20px 22px;
        gap: 16px;
    }
    .hc-text p {
        margin-bottom: 20px;
    }
    .hc-cta .btn-primary {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
    .hc-dots {
        padding-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .hc-slide {
        padding: 22px 16px 18px;
    }
    .hc-text h2 {
        font-size: clamp(22px, 6.4vw, 28px);
    }
    .hc-text p {
        font-size: 14px;
    }
    .hc-media {
        height: clamp(190px, 52vw, 240px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hc-track,
    .hc-dot::before,
    .hc-arrow,
    .hero-berkualitas .hc-btn-solid {
        transition: none;
    }
    .hc-bg-video {
        display: none;
    }
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ==================== MARQUEE ==================== */
.marquee-container {
    background: var(--primary);
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
}

.marquee-content span {
    color: white;
    font-weight: 500;
    margin: 0 30px;
    font-size: 14px;
}

.marquee-content span i {
    margin-right: 5px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==================== FLASH SALE ==================== */
.flash-sale-section {
    padding: 40px 0;
    background: #fff3e0;
}

.flash-sale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.flash-sale-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.flash-sale-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.flash-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}

.countdown-timer {
    text-align: center;
    margin-top: 10px;
}

.countdown-label {
    font-size: 12px;
    color: var(--text-gray);
    margin-right: 10px;
}

.countdown {
    font-size: 18px;
    font-weight: 700;
    color: var(--danger);
    background: white;
    padding: 4px 12px;
    border-radius: 30px;
}

/* ==================== CATEGORY SECTION ==================== */
.category-section {
    padding: 60px 0 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.section-header .highlight {
    color: var(--primary);
}

.section-header p {
    color: var(--text-gray);
}

.category-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.category-card {
    text-align: center;
    cursor: pointer;
    padding: 15px 25px;
    border-radius: 60px;
    background: white;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-card.active {
    background: var(--primary);
    color: white;
}

.category-card.active .category-icon {
    color: white;
}

.category-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary);
}

.category-card h4 {
    font-size: 14px;
    font-weight: 600;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
    background: white;
    padding: 15px 0;
    margin: 20px 0;
    border-radius: 60px;
    box-shadow: var(--shadow-md);
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-btn.active, .sort-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-result {
    color: var(--text-gray);
    font-size: 14px;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==================== PRODUCT GRID ==================== */
.product-section {
    padding: 30px 0 60px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-grid.list-view {
    grid-template-columns: 1fr;
}

.product-grid.list-view .product-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-grid.list-view .product-image {
    width: 150px;
    height: 150px;
}

.product-grid.list-view .product-info {
    flex: 1;
}

.product-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f1f8e9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s;
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: #ccc;
}

.wishlist-btn.active {
    color: var(--danger);
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.product-info {
    padding: 14px;
}

.product-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 5px;
    color: var(--text-dark);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
    margin: 6px 0;
}

.original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 8px;
}

.product-rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.stars-display {
    color: var(--warning);
    font-size: 12px;
    letter-spacing: 2px;
}

.rating-count {
    font-size: 11px;
    color: var(--text-light);
}

.product-stock {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin: 10px 0;
}

.stock-available { background: var(--primary-soft); color: var(--primary); }
.stock-low { background: var(--secondary-light); color: var(--secondary-dark); }
.stock-out { background: #ffebee; color: var(--danger); }

.btn-add {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-add:hover {
    transform: scale(1.02);
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--primary);
    color: white;
}

/* ==================== MEMBER BENEFITS ==================== */
.member-benefits {
    padding: 40px 0;
}

.benefits-card {
    background: var(--primary);
    border-radius: var(--border-radius-xl);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    color: white;
}

.benefits-icon {
    font-size: 50px;
}

.benefits-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.benefits-list {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.benefits-list span {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.benefits-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 12px 25px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.benefits-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ==================== RATING SECTION ==================== */
.rating-section-berkualitas {
    background: white;
    padding: 60px 0;
}

.rating-wrapper {
    display: flex;
    gap: 50px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.rating-stats {
    flex: 1;
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.rating-score {
    text-align: center;
}

.score-number {
    font-size: 56px;
    font-weight: 800;
    color: var(--primary);
}

.score-stars {
    font-size: 20px;
    color: var(--warning);
    letter-spacing: 4px;
    margin: 8px 0;
}

.rating-progress {
    flex: 1;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.progress-item span {
    width: 35px;
    font-size: 13px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--warning);
    border-radius: 10px;
}

.reviews-container {
    max-height: 500px;
    overflow-y: auto;
}

.review-card {
    background: #f8f9fa;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.review-card:hover {
    transform: translateX(5px);
    background: var(--primary-soft);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    overflow: hidden;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-stars {
    color: var(--warning);
    font-size: 13px;
    margin-bottom: 3px;
}

.review-date {
    font-size: 11px;
    color: var(--text-light);
}

.review-photo {
    margin-top: 10px;
}

.review-photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.see-all-reviews {
    display: block;
    margin: 20px auto 0;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
}

/* ==================== FOOTER ==================== */
.footer-berkualitas {
    background: #1a2e1f;
    color: white;
    padding: 50px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--secondary);
}

.footer-brand p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-contact p {
    margin-bottom: 10px;
    color: #aaa;
    font-size: 14px;
}

.footer-contact i {
    width: 25px;
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 25px;
    border-top: 1px solid #3a4a3a;
}

.footer-bottom p {
    color: #888;
    font-size: 12px;
}

.payment-methods-footer i {
    font-size: 24px;
    margin-left: 10px;
    color: #aaa;
}

/* ==================== CART SIDEBAR ==================== */
.cart-sidebar-berkualitas {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100%;
    height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: white;
    z-index: 1000;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.cart-sidebar-berkualitas.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

.cart-header-berkualitas {
    background: var(--primary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header-berkualitas h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.cart-items-berkualitas {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart-berkualitas {
    text-align: center;
    padding: 50px 20px;
}

.empty-cart-berkualitas i {
    font-size: 60px;
    color: #ccc;
    margin-bottom: 15px;
}

.empty-cart-berkualitas p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.btn-shop {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info strong {
    font-size: 14px;
}

.cart-item-price {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
}

.cart-footer-berkualitas {
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
}

.cart-subtotal, .cart-shipping, .cart-discount {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-gray);
}

.cart-discount .discount-amount {
    color: var(--danger);
}

.cart-points {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--primary);
}

.cart-total-berkualitas {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.btn-checkout-berkualitas {
    width: 100%;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: var(--transition);
}

.btn-checkout-berkualitas:hover {
    transform: translateY(-2px);
}

/* ==================== MODALS ==================== */
.modal-berkualitas {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}

.modal-berkualitas.active {
    display: flex;
}

.modal-content-berkualitas {
    background: white;
    border-radius: var(--border-radius-xl);
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header-berkualitas {
    background: var(--primary);
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.modal-body-berkualitas {
    padding: 20px;
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Payment Methods */
.payment-amount {
    text-align: center;
    margin-bottom: 20px;
}

.payment-amount h2 {
    font-size: 32px;
    color: var(--primary);
}

.payment-group {
    margin-top: 20px;
}

.payment-group-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.payment-method-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method-card:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateX(5px);
}

.payment-method-card.featured {
    border: 2px solid var(--primary);
    background: var(--primary-soft);
}

.payment-method-icon {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
}

.payment-method-icon-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 10px;
}

.badge-recommended {
    background: var(--secondary);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
}

.payment-method-info {
    flex: 1;
}

.payment-method-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.payment-method-desc {
    font-size: 12px;
    color: var(--text-gray);
}

/* Use Points Section */
.use-points-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Kurir Options */
.kurir-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kurir-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.kurir-card:hover,
.kurir-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.kurir-icon {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.kurir-info {
    flex: 1;
}

.kurir-name {
    font-weight: bold;
    font-size: 16px;
}

.kurir-estimasi {
    font-size: 12px;
    color: var(--text-gray);
}

.kurir-harga {
    font-weight: bold;
    color: var(--primary);
}

/* Voucher Section */
.voucher-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.voucher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.voucher-list {
    margin-top: 10px;
}

.voucher-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.voucher-item:hover {
    background: var(--primary-soft);
}

.voucher-item .voucher-code {
    font-weight: bold;
    color: var(--primary);
}

/* Tracking Timeline */
.tracking-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.timeline-icon.completed {
    background: var(--primary);
    color: white;
}

.timeline-icon.active {
    background: var(--secondary);
    color: white;
    animation: pulse 1s infinite;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: bold;
}

.timeline-date {
    font-size: 11px;
    color: var(--text-light);
}

.timeline-line {
    position: absolute;
    left: 19px;
    top: 40px;
    width: 2px;
    height: calc(100% - 20px);
    background: #e0e0e0;
    z-index: 1;
}

.timeline-item:last-child .timeline-line {
    display: none;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-paid { background: #c8e6c9; color: var(--primary); }
.status-processing { background: #b3e5fc; color: #0277bd; }
.status-shipped { background: #ffe0b2; color: #ef6c00; }
.status-delivered { background: #c8e6c9; color: var(--primary); }
.status-cancelled { background: #ffcdd2; color: #c62828; }

/* Pesanan Saya (My Orders) — kartu pesanan, kotak cari, & tombol aksi generik. */
.tracking-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.tracking-search .form-control {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 13px;
}
.btn-search {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Tab filter status (Semua/Menunggu/Diproses/dst) — scrollable horizontal, dengan fade
   di tepi kanan buat kasih sinyal visual masih ada tab lain yang belum kelihatan. */
.order-filter-tabs-wrap {
    position: relative;
    margin-bottom: 14px;
}
.order-filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 20px 8px 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.order-filter-tabs::-webkit-scrollbar { height: 4px; }
.order-filter-tabs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.order-filter-tabs-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 8px;
    width: 24px;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
}
body.dark-mode .order-filter-tabs-wrap::after { background: linear-gradient(to right, transparent, #1a1c20); }
.order-filter-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.1px;
}
.order-filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.order-filter-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
body.dark-mode .order-filter-tab { background: #23252b; border-color: #333; color: #aaa; }

/* Kartu satu pesanan di daftar "Pesanan Saya" */
.tracking-order-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 0;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    overflow: hidden;
}
.tracking-order-card .order-card-body {
    padding: 14px 16px;
    cursor: pointer;
}
.order-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.order-card-id {
    font-size: 13.5px;
    font-weight: 700;
    color: #222;
    letter-spacing: 0.2px;
}
body.dark-mode .order-card-id { color: #eee; }
.order-card-items {
    font-size: 12.5px;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
}
.order-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.order-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}
.order-card-date {
    font-size: 11px;
    color: #aaa;
}
.order-card-cancel-note {
    font-size: 11.5px;
    color: #f57c00;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff8e1;
    padding: 6px 10px;
    border-radius: 8px;
}
.order-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
    flex-wrap: wrap;
}
.order-card-actions button {
    flex: 1;
    min-width: 100px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.order-card-actions button:active { opacity: 0.85; transform: scale(0.98); }
.order-card-btn-primary { background: var(--primary); color: #fff; border: none; }
.order-card-btn-outline { background: #fff; border: 1px solid #ddd; color: #555; }
.order-card-btn-danger { background: #fff; border: 1px solid #e53935; color: #e53935; }
body.dark-mode .tracking-order-card { background: #23252b; border-color: #333; }
body.dark-mode .order-card-items { color: #999; }
body.dark-mode .order-card-btn-outline { background: #23252b; border-color: #444; color: #ccc; }

.btn-confirm {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.btn-confirm:active { transform: scale(0.98); opacity: 0.92; }

/* Halaman detail satu pesanan (di dalam modal yang sama) */
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.order-detail-id { font-size: 14px; font-weight: 700; color: #222; }
body.dark-mode .order-detail-id { color: #eee; }
.order-detail-date { font-size: 11.5px; color: #999; margin-bottom: 14px; }
.order-detail-section-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 16px 0 8px;
}
body.dark-mode .order-detail-section-title { color: #ccc; }
.order-detail-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f0f0;
}
body.dark-mode .order-detail-item-row { border-color: #333; }
.order-detail-item-row:last-child { border-bottom: none; }
.order-detail-item-name { font-size: 13px; font-weight: 600; }
.order-detail-item-sub { font-size: 11.5px; color: #999; margin-top: 2px; }
.order-detail-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #666;
    padding: 4px 0;
}
.order-detail-price-row.total {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed #ddd;
}
body.dark-mode .order-detail-price-row.total { border-color: #444; }
.order-detail-address { font-size: 12.5px; color: #666; line-height: 1.6; }

/* Kartu "Produk yang Belum Direview" — sebelumnya kelas ini gak punya CSS sama sekali,
   jadi <img> produk render di ukuran ASLI (bisa ribuan pixel, meluber keluar modal). */
.unreviewed-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fff;
}
.unreviewed-card img {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: #f2f2f2;
}
.unreviewed-card .product-info {
    flex: 1;
    min-width: 0;
    padding: 0;
}
.unreviewed-card .product-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.unreviewed-card .product-price {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
}
.unreviewed-card .btn-review {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}
.unreviewed-card .btn-review:active { opacity: 0.85; transform: scale(0.97); }
body.dark-mode .unreviewed-card { background: #23252b; border-color: #333; }
body.dark-mode .unreviewed-card img { background: #333; }
body.dark-mode .order-detail-address { color: #aaa; }

/* Toast */
.toast-berkualitas {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 1200;
    display: none;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
}

/* Loading Skeleton */
.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.skeleton-card {
    height: 350px;
    background: #f0f0f0;
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius-lg);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== RESPONSIVE ==================== */

/* ==================== OPTIMASI UNTUK HP & APK ==================== */
/* Mencegah zoom berlebihan */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Ukuran font minimal untuk kenyamanan baca */
html {
    font-size: 16px;
}

/* Ukuran tombol minimal untuk touch (44x44px) */
button, 
.btn, 
.product-card, 
.flash-sale-card,
.category-card,
.cart-item-qty button {
    min-height: 44px;
    min-width: 44px;
}

/* Scroll behavior smooth */
html {
    scroll-behavior: smooth;
}

/* Safe area untuk notched phone (iPhone, Android modern) */
body {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* Loading screen di HP */
.loading-screen {
    background: #1a2e1f;
}

.fruit {
    font-size: clamp(30px, 10vw, 50px);
}

/* Hero section HP */
@media (max-width: 768px) {
    /* Grid produk untuk HP */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image {
        height: 155px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 15px;
        margin: 4px 0;
    }
    
    .product-rating-display {
        margin: 4px 0;
        gap: 4px;
    }
    
    .product-stock {
        font-size: 10px;
        padding: 3px 8px;
        margin: 6px 0;
    }
    
    .btn-add {
        padding: 8px;
        font-size: 12px;
        gap: 5px;
        margin-top: 4px;
    }
    
    .original-price {
        font-size: 11px;
        display: block;
        margin-left: 0;
    }
    
    /* Flash sale card di HP */
    .flash-sale-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .flash-sale-card .product-image {
        height: 140px;
    }
    
    /* Category cards di HP */
    .category-card {
        padding: 10px 16px;
    }
    
    .category-icon {
        font-size: 20px;
    }
    
    .category-card h4 {
        font-size: 12px;
    }
    
    /* Filter bar di HP */
    .filter-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .sort-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sort-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    /* Cart sidebar di HP (fullscreen) */
    .cart-sidebar-berkualitas {
        width: 100%;
        right: -100%;
    }
    
    /* Modal di HP */
    .modal-content-berkualitas {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
    }
    
    /* Form di HP */
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Payment methods di HP */
    .payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Footer di HP */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    /* Toast notification di HP */
    .toast-berkualitas {
        bottom: 80px;
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
    
    /* Floating cart di HP */
    .floating-cart {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    /* Scroll to top di HP */
    .scroll-top {
        bottom: 90px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    /* Tracking button di HP (text hilang, icon saja) */
    .tracking-btn span,
    .review-btn span {
        display: none;
    }
    
    .tracking-btn, .review-btn {
        font-size: 20px;
        padding: 8px;
    }
}

/* Untuk HP kecil (max 480px) */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .btn-add {
        padding: 8px;
        font-size: 12px;
    }
    
    .discount-badge, .flash-sale-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
}

/* Untuk tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .flash-sale-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Landscape mode HP */
@media (max-width: 768px) and (orientation: landscape) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Swipe untuk menutup modal di HP */
@media (max-width: 768px) {
    .cart-sidebar-berkualitas {
        transition: transform 0.3s ease;
    }
    
    .modal-content-berkualitas {
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}
/* ==================== PERBAIKAN RESPONSIF & PAYMENT UI ==================== */

/* Safe area insets untuk HP dengan notch/punch-hole */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* Navbar responsif — fix overflow di HP kecil */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 0 4px;
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 0;
        padding-top: calc(8px + var(--safe-top));
    }
    .nav-wrapper {
        gap: 6px;
        padding: 0 2px;
    }
    .logo-text h1 { font-size: 18px !important; }
    .logo-text p { display: none; }
    .logo-icon { width: 32px; height: 32px; }
    .search-wrapper { flex: 1; min-width: 0; }
    .search-container input { font-size: 16px; padding: 8px 10px 8px 32px; }
    .user-name { display: none; }
    .nav-actions { gap: 4px; }
    .notification-bell { font-size: 18px; }
}

/* Navbar scroll behavior improvement */
.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}

    /* Hero section mobile */
    @media (max-width: 480px) {
    .hero-berkualitas {
        padding: 24px 0;
    }
}

/* Product grid — lebih rapi di semua ukuran */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px;
    }
    .product-image { height: 130px; }
    .product-name { font-size: 12px; line-height: 1.3; }
    .product-price { font-size: 13px; }
    .btn-add { font-size: 11px; padding: 6px 4px; }
}

/* Modal — full screen di HP, centered di tablet/desktop */
.modal-overlay-berkualitas {
    padding: 0 !important;
    display: flex;
    align-items: flex-end;
}

@media (max-width: 600px) {
    .modal-overlay-berkualitas {
        align-items: flex-end;
    }
    .modal-content-berkualitas {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 92dvh;
        max-height: 92vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 601px) {
    .modal-overlay-berkualitas {
        align-items: center;
        padding: 20px !important;
    }
    .modal-content-berkualitas {
        border-radius: 20px !important;
        max-width: 560px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Cart sidebar — full di HP, partial di tablet */
@media (max-width: 480px) {
    .cart-sidebar-berkualitas {
        width: 100% !important;
        right: -100%;
    }
    .cart-sidebar-berkualitas.active {
        right: 0;
    }
}
@media (min-width: 481px) and (max-width: 768px) {
    .cart-sidebar-berkualitas {
        width: 380px;
    }
}

/* Payment modal — styling baru yang lebih baik */
.payment-detail-wrapper {
    padding: 16px;
}
.payment-method-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.payment-method-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.payment-icon { font-size: 40px; color: #2e7d32; }
.payment-amount-box {
    background: #f0faf0;
    border: 2px solid #2e7d32;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}
.payment-amount-box span { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.payment-amount-box strong { display: block; font-size: 24px; font-weight: 700; color: #2e7d32; }
.payment-va-box {
    background: #fff8e1;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}
.payment-va-box > span { display: block; font-size: 12px; color: #666; margin-bottom: 8px; }
.va-number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.va-number strong { font-size: 20px; letter-spacing: 2px; color: #333; }
.btn-copy {
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.payment-steps {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}
.payment-steps p { margin: 0 0 8px; font-size: 13px; }
.payment-steps ol { margin: 0; padding-left: 18px; }
.payment-steps li { font-size: 13px; line-height: 1.8; color: #555; }
.payment-timer-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff3cd;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #856404;
}
.payment-timer-box i { color: #f0a500; }
.payment-timer-box strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.payment-qr-wrapper {
    text-align: center;
    margin-bottom: 16px;
}
.payment-qr-wrapper img {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 8px;
}
.btn-confirm-payment {
    width: 100%;
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}
.btn-confirm-payment:active { transform: scale(0.98); opacity: 0.9; }

/* Payment methods grid — lebih user friendly */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px;
}
@media (min-width: 480px) {
    .payment-methods-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.payment-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    min-height: 80px;
    text-align: center;
}
.payment-method-btn:active, .payment-method-btn:hover {
    border-color: #2e7d32;
    background: #f0faf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46,125,50,0.15);
}
.payment-method-btn img {
    height: 32px;
    object-fit: contain;
}
.payment-method-btn i {
    font-size: 24px;
    color: #2e7d32;
}

/* Floating bottom bar untuk mobile (checkout always visible) */
@media (max-width: 600px) {
    .floating-checkout-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 16px calc(12px + var(--safe-bottom));
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
        z-index: 900;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .floating-checkout-bar .cart-summary {
        flex: 1;
        font-size: 13px;
        color: #666;
    }
    .floating-checkout-bar .cart-total {
        font-size: 16px;
        font-weight: 700;
        color: #2e7d32;
    }
    .floating-checkout-bar .btn-checkout-float {
        background: #2e7d32;
        color: white;
        border: none;
        border-radius: 12px;
        padding: 12px 20px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
    }
}

/* Buttons — proper touch targets (min 44x44px) */
button, .btn-add, .btn-primary, .sort-btn, .category-card {
    min-height: 40px;
    touch-action: manipulation;
}
@media (max-width: 480px) {
    button, .btn-add { min-height: 44px; }
}

/* Input fields — bigger on mobile */
@media (max-width: 600px) {
    input[type="text"], input[type="tel"], input[type="email"], 
    input[type="number"], textarea, select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 12px 14px;
        border-radius: 10px;
    }
}

/* Loading screen */
.loading-screen {
    padding-top: var(--safe-top);
}

/* Scroll padding untuk navbar */
html {
    scroll-padding-top: 80px;
}

/* Fix notification dropdown di HP */
@media (max-width: 480px) {
    .notification-dropdown {
        right: -60px;
        width: 300px;
    }
}

/* User dropdown — full width di HP */
@media (max-width: 480px) {
    .user-menu {
        right: -20px;
        width: 240px;
    }
}

/* Review dan tracking button — ikon lebih besar di HP */
@media (max-width: 360px) {
    .tracking-btn, .review-btn {
        padding: 6px;
        font-size: 16px;
    }
    .notification-bell {
        font-size: 16px;
    }
}

/* Smooth scrolling + overscroll bounce */
.modal-content-berkualitas,
.cart-sidebar-berkualitas,
.notification-dropdown {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Fix font size icon FontAwesome di Capacitor WebView */
.fas, .fab, .far {
    -webkit-font-smoothing: antialiased;
    font-display: block;
}

 
/* ==================== HP FIXES ==================== */
@media (max-width: 480px) {
    .navbar {
        padding: 8px 0;
        padding-top: calc(8px + var(--safe-top));
    }
    .hero-berkualitas {
        padding: 24px 0;
    }
    .product-grid {
        gap: 10px;
        padding: 0 4px;
    }
    .product-image {
        height: 140px;
    }
    .product-name {
        font-size: 13px;
    }
    .product-price {
        font-size: 15px;
    }
    .btn-add {
        font-size: 12px;
        padding: 8px 6px;
    }
    .floating-cart {
        bottom: 80px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .scroll-top {
        bottom: 150px;
        right: 15px;
    }
    .cart-sidebar-berkualitas {
        width: 100%;
    }
    .modal-content-berkualitas {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
    }
    .payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .notification-dropdown {
        right: -80px;
        width: 280px;
    }
    .tracking-btn span, .review-btn span {
        display: none;
    }
    .tracking-btn, .review-btn {
        font-size: 18px;
        padding: 6px;
    }
}

/* Input zoom prevention iOS */
input, select, textarea {
    font-size: 16px !important;
}

/* Better touch feedback */
button, .product-card, .flash-sale-card, .category-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:active, .product-card:active, .flash-sale-card:active {
    transform: scale(0.98);
}

/* Safe area for notched phones */
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}


@media (max-width: 768px) {
    .data-table { overflow-x: auto; }
    table { font-size: 12px; }
    th, td { padding: 8px 6px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .modal-content-berkualitas { width: 100%; max-width: 100%; margin: 0; border-radius: 20px 20px 0 0; }
}


/* ==================== FIX TAMPILAN HP ==================== */

/* Mobile First - HP kecil (max 480px) */
@media (max-width: 480px) {
    /* Container padding */
    .container {
        padding: 0 12px !important;
    }
    
    /* Navbar */
    .navbar {
        padding: 8px 0 !important;
    }
    .nav-wrapper {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .logo-text p {
        display: none !important;
    }
    .logo-text h1 {
        font-size: 16px !important;
    }
    .logo-icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 18px !important;
    }
    
    /* Search bar */
    .search-wrapper {
        order: 3 !important;
        width: 100% !important;
        margin-top: 8px !important;
    }
    .search-container input {
        font-size: 16px !important;
        padding: 10px !important;
    }
    
    /* Nav actions */
    .nav-actions {
        gap: 8px !important;
    }
    .tracking-btn span, .review-btn span {
        display: none !important;
    }
    .tracking-btn, .review-btn {
        font-size: 18px !important;
        padding: 8px !important;
    }
    .user-name {
        display: none !important;
    }
    
    /* Hero section */
    .hero-berkualitas {
        padding: 24px 0;
    }
    
    /* Category grid */
    .category-grid {
        gap: 10px !important;
    }
    .category-card {
        padding: 8px 12px !important;
    }
    .category-icon {
        font-size: 18px !important;
    }
    .category-card h4 {
        font-size: 11px !important;
    }
    
    /* Filter bar */
    .filter-wrapper {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .sort-buttons {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    .sort-btn {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }
    .filter-result {
        font-size: 12px !important;
    }
    
    /* Product grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .product-image {
        height: 130px !important;
    }
    .product-name {
        font-size: 12px !important;
    }
    .product-price {
        font-size: 14px !important;
    }
    .product-price small {
        font-size: 10px !important;
    }
    .original-price {
        font-size: 10px !important;
    }
    .btn-add {
        font-size: 11px !important;
        padding: 6px !important;
    }
    .product-rating-display {
        font-size: 10px !important;
    }
    
    /* Flash sale */
    .flash-sale-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .flash-sale-card .product-image {
        height: 120px !important;
    }
    .countdown {
        font-size: 14px !important;
    }
    
    /* Member benefits */
    .benefits-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px !important;
    }
    .benefits-list {
        justify-content: center !important;
    }
    
    /* Rating section */
    .rating-wrapper {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .rating-stats {
        flex-direction: column !important;
        text-align: center !important;
    }
    .score-number {
        font-size: 40px !important;
    }
    
    /* Reviews */
    .review-card {
        padding: 12px !important;
    }
    .review-header {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    .social-links {
        justify-content: center !important;
    }
    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    /* Cart sidebar */
    .cart-sidebar-berkualitas {
        width: 100% !important;
    }
    
    /* Modal */
    .modal-content-berkualitas {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
    }
    .modal-header-berkualitas h3 {
        font-size: 16px !important;
    }
    
    /* Toast */
    .toast-berkualitas {
        bottom: 70px !important;
        font-size: 12px !important;
        white-space: normal !important;
        text-align: center !important;
        max-width: 90% !important;
    }
    
    /* Floating cart */
    .floating-cart {
        bottom: 70px !important;
        right: 15px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
    
    /* Scroll top */
    .scroll-top {
        bottom: 130px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
    }
}

/* Tablet (768px ke bawah) */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .flash-sale-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .charts-row {
        grid-template-columns: 1fr !important;
    }
    .sidebar {
        width: 70px !important;
    }
    .sidebar span, .sidebar .menu-title {
        display: none !important;
    }
    .main-content {
        margin-left: 70px !important;
    }
}

/* HP kecil (max 360px) */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .product-image {
        height: 110px !important;
    }
    .product-name {
        font-size: 11px !important;
    }
    .btn-add {
        font-size: 10px !important;
        padding: 5px !important;
    }
}

/* Fix angka 0 berjejer */
.rating-progress {
    width: 100% !important;
}
.progress-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.progress-bar {
    flex: 1 !important;
}

/* Fix teks terpotong */
.product-name, .product-price, .btn-add {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* Input tidak zoom di iOS */
input, select, textarea {
    font-size: 16px !important;
}

@media (max-width: 480px) {
    .marquee-content span {
        font-size: 11px !important;
        margin: 0 15px !important;
    }
}

/* ==================== FINAL MOBILE FIXES ==================== */

/* Fix: floating cart & scroll-top jangan nabrak bottom nav / safe area */
.floating-cart {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.scroll-top {
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 480px) {
    .floating-cart {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .scroll-top {
        bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Fix: toast jangan ketutup floating cart di HP */
@media (max-width: 480px) {
    .toast-berkualitas {
        bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Fix: notification dropdown jangan keluar layar di HP kecil */
@media (max-width: 480px) {
    .notification-dropdown {
        right: 0 !important;
        left: auto !important;
        width: min(320px, 90vw) !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
}

/* Fix: input & select semua ukuran tidak zoom di iOS */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="password"],
input[type="search"],
select,
textarea {
    font-size: 16px !important;
}

/* Fix: tabel di admin tidak overflow ke kiri (hidden konten) */
.data-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Fix: cart sidebar safe area bottom padding */
@media (max-width: 480px) {
    .cart-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    }
}


/* ==================== FLOATING WA BUTTON ==================== */
.floating-wa {
    position: fixed;
    left: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    border-radius: 50px;
    padding: 14px 18px;
    font-size: 26px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: waPulse 2.5s infinite;
}

.floating-wa:hover,
.floating-wa:active {
    background: #128C7E;
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65);
    color: #fff;
}

.floating-wa-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
    50%       { box-shadow: 0 4px 32px rgba(37, 211, 102, 0.85); }
}

@media (max-width: 480px) {
    .floating-wa {
        left: 14px;
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 12px 14px;
        font-size: 22px;
    }
    .floating-wa-label {
        font-size: 12px;
    }
}

/* Footer contact links */
.footer-contact a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline;
}
.footer-contact a:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* Footer social links hover effect */
.social-links a {
    transition: transform 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.social-links a:hover {
    transform: scale(1.15);
}
   
/* ==================== FINAL MOBILE FIXES ==================== */

/* Fix: floating cart & scroll-top jangan nabrak bottom nav / safe area */
.floating-cart {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.scroll-top {
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 480px) {
    .floating-cart {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .scroll-top {
        bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Fix: toast jangan ketutup floating cart di HP */
@media (max-width: 480px) {
    .toast-berkualitas {
        bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Fix: notification dropdown jangan keluar layar di HP kecil */
@media (max-width: 480px) {
    .notification-dropdown {
        right: 0 !important;
        left: auto !important;
        width: min(320px, 90vw) !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
}

/* Fix: input & select semua ukuran tidak zoom di iOS */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="password"],
input[type="search"],
select,
textarea {
    font-size: 16px !important;
}

/* Fix: tabel di admin tidak overflow ke kiri (hidden konten) */
.data-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Fix: cart sidebar safe area bottom padding */
@media (max-width: 480px) {
    .cart-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ==================== FLOATING WA BUTTON ==================== */
.floating-wa {
    position: fixed;
    left: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    border-radius: 50px;
    padding: 14px 18px;
    font-size: 26px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: waPulse 2.5s infinite;
}

.floating-wa:hover,
.floating-wa:active {
    background: #128C7E;
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65);
    color: #fff;
}

.floating-wa-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
    50%       { box-shadow: 0 4px 32px rgba(37, 211, 102, 0.85); }
}

@media (max-width: 480px) {
    .floating-wa {
        left: 14px;
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 12px 14px;
        font-size: 22px;
    }
    .floating-wa-label {
        font-size: 12px;
    }
}

/* Footer contact links */
.footer-contact a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline;
}
.footer-contact a:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* Footer social links hover effect */
.social-links a {
    transition: transform 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.social-links a:hover {
    transform: scale(1.15);
}



.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-dark);
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.dark-mode-toggle:hover {
    background: rgba(0,0,0,0.1);
}

body.dark-mode .dark-mode-toggle {
    color: #ffd966;
}

/* Tracking steps */
.tracking-status {
    margin-top: 15px;
}

.tracking-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #999;
}

.tracking-step.active {
    color: #2e7d32;
    font-weight: bold;
}

.tracking-step.completed {
    color: #4caf50;
}

body.dark-mode .tracking-step {
    border-bottom-color: #444;
}


/* ==================== FIX GAMBAR REVIEW KEBESARAN ==================== */

/* Container review card */
.review-card {
    background: #f8f9fa;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--transition);
    overflow: hidden;
}

/* Foto review - BATASI UKURAN MAKSIMAL */
.review-photo {
    margin-top: 12px;
    max-width: 100%;
}

.review-photo img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: transform 0.2s;
    display: block;
}

.review-photo img:hover {
    transform: scale(1.02);
}

/* Untuk grid foto multiple (jika ada lebih dari 1) */
.review-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.review-photos-grid img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

/* Preview foto saat upload di modal rating */
.photo-preview {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
}

.photo-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid #ddd;
}

.photo-preview button {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== RESPONSIVE UNTUK HP ==================== */
@media (max-width: 768px) {
    .review-photo img {
        max-height: 150px;
    }
    
    .review-photos-grid img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .review-photo img {
        max-height: 120px;
    }
    
    .review-photos-grid img {
        width: 55px;
        height: 55px;
    }
}

/* ==================== NOTIFIKASI RESPONSIF HP (FINAL) ==================== */

/* Container notifikasi */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-bell i {
    font-size: 20px;
    color: var(--text-gray);
    transition: var(--transition);
}

.notification-bell:hover i {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-top: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.notification-bell:hover .notification-dropdown,
.notification-bell:focus-within .notification-dropdown {
    opacity: 1;
    visibility: visible;
}

/* Header notifikasi */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    background: white;
}

.notification-header button {
    background: none;
    border: none;
    color: #2e7d32;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
}

/* List notifikasi */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Item notifikasi */
.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f5f5f5;
}

.notification-item.unread {
    background: #fff8e1;
}

/* Icon notifikasi */
.notification-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Konten notifikasi - WRAP TEKS OTOMATIS */
.notification-content {
    flex: 1;
    min-width: 0; /* PENTING: biar teks bisa wrap */
}

.notification-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: #333;
    word-break: break-word;
}

.notification-message {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.notification-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* Dark mode support */
body.dark-mode .notification-dropdown {
    background: #1e1e1e;
    border: 1px solid #333;
}

body.dark-mode .notification-header {
    border-bottom-color: #333;
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .notification-item {
    border-bottom-color: #2a2a2a;
}

body.dark-mode .notification-item:hover {
    background: #2a2a2a;
}

body.dark-mode .notification-item.unread {
    background: #2d2810;
}

body.dark-mode .notification-title {
    color: #e0e0e0;
}

body.dark-mode .notification-message {
    color: #aaa;
}

body.dark-mode .notification-time {
    color: #777;
}

body.dark-mode .notification-icon {
    background: #2d2d2d;
    color: #e0e0e0;
}

/* ==================== RESPONSIF HP - FIX KEPOTONG ==================== */
@media (max-width: 480px) {
    .notification-bell {
        position: static;
    }
    
    .notification-dropdown {
        position: fixed;
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        max-height: 70vh;
        margin-top: 0;
        border-radius: 12px;
    }
    
    .notification-header {
        padding: 12px 16px;
        position: sticky;
        top: 0;
        z-index: 2;
        background: white;
    }
    
    body.dark-mode .notification-header {
        background: #1e1e1e;
    }
    
    .notification-list {
        max-height: calc(70vh - 50px);
    }
    
    .notification-item {
        padding: 14px 16px;
    }
    
    .notification-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 20px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-message {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }
}
/* HP kecil (max 360px) */
@media (max-width: 360px) {
    .notification-dropdown {
        top: 55px;
        right: 5px;
        left: 5px;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 16px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 11px;
    }
}

/* ==================== UPGRADE UI/UX berkualitas ==================== */

/* 1. GLASS MORPHISM EFFECT */
.navbar, 
.product-card,
.category-card,
.modal-content-berkualitas,
.cart-sidebar-berkualitas {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

body.dark-mode .navbar,
body.dark-mode .product-card,
body.dark-mode .category-card,
body.dark-mode .modal-content-berkualitas,
body.dark-mode .cart-sidebar-berkualitas {
    background: rgba(30,30,30,0.95);
    backdrop-filter: blur(10px);
}

/* 2. SMOOTH CARD HOVER - EFFECT KEREN */
.product-card,
.flash-sale-card,
.category-card {
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.product-card:hover,
.flash-sale-card:hover,
.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.25);
}

.product-card:active,
.flash-sale-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* 3. BUTTON BASE */
.btn-add,
.btn-primary,
.btn-checkout-berkualitas,
.load-more-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}


/* 4. PRODUCT CARD HOVER RING */
.product-card {
    position: relative;
    background: white;
    border-radius: 20px;
}

.product-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary);
    border-radius: 22px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.product-card:hover::after {
    opacity: 1;
}

/* 5. SMOOTH SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #2e7d32;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1b5e20;
}

/* 6. LOADING SKELETON */
.skeleton-card {
    background: #ececec;
    border-radius: 20px;
}

body.dark-mode .skeleton-card {
    background: #2a2a2a;
}

/* 8. TOAST NOTIFICATION berkualitas */
.toast-berkualitas {
    background: #2e7d32;
    border-radius: 50px;
    padding: 14px 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(46,125,50,0.3);
}

.toast-berkualitas.error {
    background: #dc3545;
}

/* 10. CARD GLOW ON HOVER */
.product-card:hover .product-image img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

/* 11. BADGE ANIMATION */
.discount-badge,
.flash-sale-badge {
    animation: badgePulse 1.5s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* 12. MODAL ENTRY ANIMATION berkualitas */
.modal-content-berkualitas {
    animation: modalFloatIn 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes modalFloatIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 13. CART SIDEBAR SMOOTH */
.cart-sidebar-berkualitas {
    transition: right 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* 14. COUNTDOWN TIMER berkualitas */
.countdown {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(244,67,54,0.3);
}

/* 15. INPUT FIELD berkualitas FOCUS */
.form-control:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 4px rgba(46,125,50,0.15);
    transform: scale(1.01);
}

/* 16. BUTTON CLICK FEEDBACK */
.btn-add:active,
.btn-primary:active,
.btn-checkout-berkualitas:active {
    transform: scale(0.96);
    transition: transform 0.1s;
}

/* 17. PRICE TAG berkualitas */
.product-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    display: inline-block;
}

/* 18. RATING STARS berkualitas */
.stars-display {
    font-size: 14px;
    letter-spacing: 3px;
    color: #ffc107;
}

/* 19. EMPTY STATE berkualitas */
.empty-cart-berkualitas i,
.empty-state i {
    font-size: 80px;
    color: #ccc;
    animation: emptyStateBounce 2s ease infinite;
}

@keyframes emptyStateBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 20. RESPONSIVE TOUCH FEEDBACK */
@media (max-width: 768px) {
    .product-card:active,
    .btn-add:active,
    .category-card:active {
        transform: scale(0.96);
        transition: transform 0.05s;
    }
    
    /* Haptic feedback (getar di HP) */
    button:active {
        transform: scale(0.97);
    }
}
/* ==================== LANDING PAGE berkualitas ==================== */

/* Welcome Banner */
.welcome-banner {
    background: #2e7d32;
    color: white;
    padding: 12px 20px;
    position: relative;
    z-index: 99;
    animation: slideDown 0.5s ease;
}

.welcome-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.welcome-badge {
    background: #ff9800;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 12px;
}

.welcome-text h3 {
    font-size: 16px;
    margin: 0;
    display: inline;
}

.welcome-text p {
    font-size: 13px;
    margin: 0;
    display: inline;
    margin-left: 10px;
}

.welcome-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.welcome-close:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Trust Section */
.trust-section {
    padding: 40px 0;
    background: white;
    border-bottom: 1px solid #eee;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 16px;
    transition: all 0.3s;
}

.trust-item:hover {
    transform: translateY(-5px);
    background: #f5f5f5;
}

.trust-icon {
    width: 50px;
    height: 50px;
    background: #2e7d32;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.trust-text h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.trust-text p {
    font-size: 12px;
    color: #666;
}

/* Best Seller Section */
.best-seller-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.best-seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.best-seller-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.best-seller-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.best-seller-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff9800;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}

.best-seller-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    z-index: 2;
}

/* Dark Mode */
body.dark-mode .trust-section {
    background: #1e1e1e;
    border-bottom-color: #333;
}

body.dark-mode .trust-item:hover {
    background: #2d2d2d;
}

body.dark-mode .trust-text h4 {
    color: #e0e0e0;
}

body.dark-mode .best-seller-section {
    background: #1a1a1a;
}

body.dark-mode .best-seller-card {
    background: #2d2d2d;
}

/* Responsive */
@media (max-width: 768px) {
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .trust-item {
        flex-direction: column;
        text-align: center;
    }
    .best-seller-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .welcome-text h3, .welcome-text p {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .best-seller-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── PRODUCT CARD — HP KECIL (≤480px) ── */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-image { height: 130px; }
    .product-info { padding: 8px; }
    .product-name { font-size: 12px; }
    .product-price { font-size: 13px; }
    .original-price { font-size: 10px; }
    .stars-display { font-size: 10px; letter-spacing: 1px; }
    .rating-count { font-size: 10px; }
    .product-stock { font-size: 9px; padding: 2px 6px; }
    .btn-add { font-size: 11px; padding: 7px 4px; gap: 4px; }
    .product-badge { font-size: 9px; padding: 3px 7px; }
    .discount-badge { font-size: 9px; padding: 3px 8px; }
}
/* ==================== DROPDOWN NOTIF & USER MENU — FIX KLIK/TAP DI HP ====================
   Sebelumnya SEMUA rule di atas cuma pakai ":hover" (dan sekali sempat dicoba ":focus-within"
   yang juga gak reliable buat <div> tanpa tabindex). Di HP gak ada hover, jadi dropdown-nya
   gak pernah kebuka dengan benar. Sekarang ditambah kelas ".show" yang di-toggle lewat JS
   (lihat setupDropdownToggles() di js/script.js) dan di-force pakai !important supaya
   menang dari rule ":hover" manapun yang numpuk di atas — jalan konsisten di HP & laptop. */
.notification-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
}
.user-menu.show {
    display: block !important;
}
