/* ═══════════════════════════════════════════
   VARIABLES & RESET
════════════════════════════════════════════ */
:root {
    --primary:       #1B3A6B;
    --primary-light: #2B5BA8;
    --primary-dark:  #0D2247;
    --accent:        #C9A84C;
    --accent-light:  #E0C06A;
    --gold:          #D4AF37;
    --gold-light:    #F5E6A3;
    --success:       #2E7D52;
    --bg:            #F0F4FB;
    --bg2:           #FFFDF4;
    --card-bg:       #FFFFFF;
    --cream:         #FDF8EE;
    --text-main:     #0D2247;
    --text-muted:    #6B80A0;
    --border:        #D9E4F0;
    --header-h:      64px;
    --bottom-nav-h:  66px;
    --radius-card:   18px;
    --radius-sm:     12px;
    --shadow-card:   0 4px 22px rgba(27,58,107,.12);
    --shadow-nav:    0 -6px 28px rgba(27,58,107,.12);
    --grad-header:   linear-gradient(135deg, #0D2247 0%, #1B3A6B 55%, #2E5BA8 100%);
    --grad-btn:      linear-gradient(135deg, #1B3A6B 0%, #2B5BA8 100%);
    --grad-fab:      linear-gradient(135deg, #C9A84C 0%, #E0BF6A 100%);
    --grad-gold:     linear-gradient(90deg, #C9A84C 0%, #E0C06A 50%, #C9A84C 100%);
    --grad-price:    linear-gradient(90deg, #B8860B 0%, #C9A84C 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(160deg, #EEF3FC 0%, #FDF8EE 100%);
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
    /* Simulate phone width on desktop */
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body {
    padding-top: var(--header-h);
    padding-bottom: calc(var(--bottom-nav-h) + 8px);
}

/* ═══════════════════════════════════════════
   APP HEADER
════════════════════════════════════════════ */
.app-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--header-h);
    background: var(--grad-header);
    z-index: 1040;
    box-shadow: 0 4px 20px rgba(13,34,71,.40);
    border-bottom: 1px solid rgba(212,175,55,.25);
}

/* Brand */
.brand-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.brand-logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: screen;   /* removes white background on dark header */
    filter: brightness(1.05) contrast(1.05);
    display: block;
}
.brand-text    { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.brand-accent  { color: var(--gold); text-shadow: 0 0 14px rgba(212,175,55,.65); }

/* Search */
.search-wrapper { position: relative; }
.search-input {
    background: rgba(255,255,255,.18) !important;
    border: none !important;
    border-radius: 24px !important;
    color: #fff !important;
    font-size: 13px !important;
    padding: 7px 36px 7px 34px !important;
    outline: none !important;
    box-shadow: none !important;
    height: 38px;
}
.search-input::placeholder { color: rgba(255,255,255,.7) !important; }
.search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,.8); font-size: 15px; pointer-events: none;
}
.search-mic {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,.8); font-size: 15px; cursor: pointer;
}

/* Header icon buttons */
.icon-btn {
    background: rgba(212,175,55,.15);
    border: 1px solid rgba(212,175,55,.30);
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    color: #F5E6A3;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background .2s;
    backdrop-filter: blur(6px);
}
.icon-btn:active { background: rgba(212,175,55,.28); }
.badge-dot {
    position: absolute; top: 5px; right: 5px;
    width: 8px; height: 8px;
    border-radius: 50%; background: var(--gold);
    border: 1.5px solid var(--primary-dark);
    box-shadow: 0 0 7px rgba(212,175,55,.8);
}
.cart-count {
    position: absolute; top: 2px; right: 2px;
    min-width: 16px; height: 16px; border-radius: 8px;
    background: linear-gradient(135deg, #C9A84C, #E0C06A); color: #0D2247;
    font-size: 9px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    border: 1.5px solid var(--primary-dark);
    box-shadow: 0 2px 8px rgba(201,168,76,.55);
}

/* ═══════════════════════════════════════════
   HERO BANNER
════════════════════════════════════════════ */
.banner-slide {
    height: 148px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}
.banner-slide-1 { background: linear-gradient(135deg, #0A1B38 0%, #1B3A6B 55%, #2E5BA8 100%); }
.banner-slide-2 { background: linear-gradient(135deg, #7A5C00 0%, #C9A84C 55%, #E0C06A 100%); }
.banner-slide-3 { background: linear-gradient(135deg, #0D2247 0%, #1B3A6B 40%, #C9A84C 100%); }

/* Image fills the full banner as background */
.banner-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* No overlay when image-only — banner has its own design */
.banner-image-only .banner-img-wrap::after { display: none; }
/* Overlay only when text is shown on top of image */
.banner-content-overlay ~ .banner-img-wrap::after,
.banner-img-wrap:has(~ .banner-content-overlay)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.1) 100%);
}

.banner-content { position: relative; z-index: 2; flex: 1; padding-right: 16px; }
.banner-tag {
    display: inline-block;
    background: rgba(255,255,255,.25);
    color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
    margin-bottom: 4px; letter-spacing: .5px; text-transform: uppercase;
}
.banner-title { color: #fff; font-size: 18px; line-height: 1.2; margin-bottom: 2px; }
.banner-sub   { color: rgba(255,255,255,.85); font-size: 11px; margin-bottom: 8px; }
.btn-banner {
    background: linear-gradient(135deg, #C9A84C, #E0C06A);
    color: #0D2247;
    font-size: 11px; font-weight: 900;
    border-radius: 20px;
    padding: 6px 16px;
    border: none;
    display: inline-block;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    letter-spacing: .2px;
    text-shadow: none;
}

/* Carousel dots */
.carousel-indicators-custom {
    bottom: 8px;
}
.carousel-indicators-custom button {
    width: 6px !important; height: 6px !important;
    border-radius: 50% !important; background: rgba(255,255,255,.5) !important;
    border: none !important;
    transition: all .3s;
}
.carousel-indicators-custom .active {
    background: #fff !important;
    width: 18px !important;
    border-radius: 4px !important;
}

/* ═══════════════════════════════════════════
   PROMO STRIP
════════════════════════════════════════════ */
.promo-strip {
    background: linear-gradient(135deg, #FFFDF4 0%, #FDF5DC 100%);
    border: 1px solid #DFC97A;
    overflow: hidden;
}
.promo-scroll-text {
    font-size: 12px;
    color: #7A5C00;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: marquee 18s linear infinite;
}
@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ═══════════════════════════════════════════
   SECTION TITLES
════════════════════════════════════════════ */
.section-title {
    font-size: 15px; font-weight: 700; color: var(--text-main);
}
.see-all {
    font-size: 12px; color: var(--primary); font-weight: 600;
    text-decoration: none;
}
.see-all:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   FILTER CHIPS
════════════════════════════════════════════ */
.filter-chip {
    display: flex; align-items: center; gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 11px; font-weight: 600;
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: all .2s;
}
.filter-chip.active {
    background: var(--grad-btn);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(27,58,107,.28);
}

/* ═══════════════════════════════════════════
   PRODUCT CARD
════════════════════════════════════════════ */

/* Grid wrapper */
#productGrid .row {
    align-items: stretch;
}
.product-item {
    display: flex;
    transition: opacity .3s, transform .3s;
}
.product-item.hidden { display: none; }

/* Card – full height flex column */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(212,175,55,.18);
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.product-card:active { transform: scale(.97); box-shadow: 0 1px 6px rgba(0,0,0,.06); }

/* Image */
.product-img-wrap {
    position: relative;
    background: linear-gradient(135deg, #EEF3FC 0%, #FFFDF4 100%);
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.product-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}
.product-card:hover .product-img { transform: scale(1.05); }

/* Badge */
.product-badge {
    position: absolute; top: 8px; left: 8px;
    font-size: 9px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px;
    color: #fff; text-transform: uppercase; letter-spacing: .3px;
}

/* Wishlist btn */
.wishlist-btn {
    position: absolute; top: 6px; right: 6px;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(4px);
    border: none;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
}
.wishlist-btn.active, .wishlist-btn:active {
    color: var(--accent);
}

/* Product info – flex grow to fill card */
.product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-name {
    font-size: 12px; font-weight: 600; color: var(--text-main);
    line-height: 1.4; margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px; /* 2 baris tetap konsisten */
}
.product-price-wrap { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.product-price {
    font-size: 13px; font-weight: 800;
    background: var(--grad-price);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.product-original {
    font-size: 10px; color: var(--text-muted);
    text-decoration: line-through;
}
/* Selalu reservasi ruang untuk baris diskon agar kartu sejajar */
.product-discount-row {
    min-height: 20px;
    display: flex;
    align-items: center;
    margin-top: 3px;
}
.discount-pct {
    display: inline-block;
    background: #FFFDF0; color: #7A5C00;
    border: 1px solid #DFC97A;
    font-size: 9px; font-weight: 700;
    padding: 1px 6px; border-radius: 6px;
}
.product-meta {
    display: flex; align-items: center;
    margin-top: 5px;
}
.meta-text { font-size: 10px; color: var(--text-muted); margin-left: 2px; }

/* Tombol selalu di bawah */
.product-info-footer {
    margin-top: auto;
    padding-top: 8px;
}

/* Add to cart */
.add-to-cart-btn {
    background: var(--grad-btn);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 700;
    padding: 7px 4px;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(27,58,107,.30);
    transition: opacity .2s, transform .15s;
    letter-spacing: .2px;
}
.add-to-cart-btn:active {
    opacity: .85;
    transform: scale(.97);
}

/* ═══════════════════════════════════════════
   BOTTOM NAVIGATION
════════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 430px;
    height: var(--bottom-nav-h);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-nav);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    border-radius: 22px 22px 0 0;
    padding: 0 8px;
    border-top: 1px solid var(--border);
}
.bottom-nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px; text-decoration: none;
    color: var(--text-muted);
    transition: color .2s;
    padding: 8px 0;
}
.bottom-nav-item.active { color: var(--primary); }
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; font-weight: 600; }

/* Center FAB */
.nav-center-btn { position: relative; top: -14px; flex: 0 0 56px; }
.nav-fab {
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--grad-fab);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(201,168,76,.55);
    transition: transform .15s;
    border: 2px solid rgba(255,255,255,.5);
}
.nav-center-btn:active .nav-fab { transform: scale(.93); }

/* ═══════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════════ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ═══════════════════════════════════════════
   DESKTOP FRAME (kosmetik)
════════════════════════════════════════════ */
@media (min-width: 480px) {
    html { background: linear-gradient(160deg, #071120 0%, #0D2247 50%, #1B3A6B 100%); }
    body {
        box-shadow: 0 0 60px rgba(0,0,0,.45), 0 0 0 1px rgba(212,175,55,.15);
        border-left:  1px solid rgba(212,175,55,.18);
        border-right: 1px solid rgba(212,175,55,.18);
    }
}

/* ═══════════════════════════════════════════
   AUTH MODAL
════════════════════════════════════════════ */
.auth-dialog { max-width: 380px; padding: 0 12px; }

.auth-modal {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.auth-close {
    position: absolute;
    top: 12px; right: 14px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: background .2s;
}
.auth-close:hover { background: rgba(255,255,255,.28); }

.auth-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    text-align: center;
    padding: 28px 24px 20px;
}
.auth-logo { height: 44px; margin-bottom: 8px; mix-blend-mode: screen; }
.auth-title { color: #fff; font-size: 16px; font-weight: 800; margin: 0; letter-spacing: .2px; }
.auth-sub { color: rgba(255,255,255,.65); font-size: 12px; margin: 4px 0 0; }

.auth-tabs {
    display: flex;
    border-bottom: 1.5px solid #EEF3FC;
    background: #fff;
}
.auth-tab {
    flex: 1;
    padding: 11px 0;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: #9CA3AF;
    cursor: pointer;
    transition: all .2s;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1.5px;
}
.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-form {
    background: #fff;
    padding: 20px 22px 24px;
}
.auth-field { margin-bottom: 14px; }
.auth-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 5px;
}
.auth-input {
    width: 100%;
    border: 1.5px solid #D9E4F0;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #FAFBFF;
}
.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,58,107,.1);
    background: #fff;
}
.auth-pw-wrap { position: relative; }
.auth-pw-wrap .auth-input { padding-right: 42px; }
.auth-pw-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 4px;
}
.auth-error {
    color: #EF4444;
    font-size: 12px;
    min-height: 16px;
    margin-bottom: 8px;
    font-weight: 500;
}
.auth-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    transition: opacity .2s, transform .1s;
}
.auth-submit:hover  { opacity: .92; }
.auth-submit:active { transform: scale(.98); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Auth step indicator */
.auth-steps { display: flex; align-items: center; justify-content: center; padding: 14px 8px 18px; }
.auth-step { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; background: #EEF3FC; color: #9CA3AF; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #D9E4F0; transition: all .3s; }
.auth-step.active .step-dot { background: var(--primary); color: #C9A84C; border-color: var(--primary); }
.auth-step.done   .step-dot { background: #10B981; color: #fff; border-color: #10B981; }
.auth-step span { font-size: 9px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.auth-step.active span { color: var(--primary); }
.auth-step.done   span { color: #10B981; }
.step-line { flex: 1; height: 2px; background: #D9E4F0; margin: 0 4px; margin-bottom: 14px; min-width: 20px; transition: background .3s; }
.step-line.done { background: #10B981; }
/* Phone prefix input */
.auth-phone-wrap { position: relative; }
.auth-phone-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--primary); pointer-events: none; z-index: 1; }
.auth-input-phone { padding-left: 22px; }
/* OTP input */
.auth-otp-input { letter-spacing: 6px; font-size: 22px; font-weight: 800; text-align: center; padding: 10px 16px; }
/* OTP info box */
.auth-otp-info { display: flex; align-items: flex-start; gap: 10px; background: #EEF3FC; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 12px; color: var(--primary); line-height: 1.5; }
.auth-otp-info ion-icon { font-size: 20px; color: #C9A84C; flex-shrink: 0; margin-top: 1px; }
.auth-otp-info p { margin: 0; }
/* OTP demo box */
.auth-otp-demo { background: #FFFBEB; border: 1.5px dashed #C9A84C; border-radius: 10px; padding: 8px 12px; font-size: 12px; color: #92400E; margin-bottom: 12px; text-align: center; }
.auth-otp-demo strong { font-size: 22px; letter-spacing: 6px; display: block; margin-top: 4px; color: var(--primary); font-family: monospace; }
/* Back button */
.auth-back-btn { width: 100%; background: none; border: none; color: #9CA3AF; font-size: 12px; font-weight: 600; cursor: pointer; padding: 8px 0; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 6px; transition: color .2s; }
.auth-back-btn:hover { color: var(--primary); }

/* ═══════════════════════════════════════════
   TOAST NOTIFICATION
════════════════════════════════════════════ */
.app-toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(14px);
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    white-space: nowrap;
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    gap: 7px;
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease;
}
.app-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.app-toast-info    { background: var(--primary); color: #fff; }
.app-toast-success { background: #059669; color: #fff; }
.app-toast-error   { background: #DC2626; color: #fff; }
.app-toast ion-icon { font-size: 15px; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   PROFILE BOTTOM SHEET
════════════════════════════════════════════ */
.profile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity .3s;
}
.profile-backdrop.show { opacity: 1; }

.profile-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 0 22px calc(var(--bottom-nav-h) + 10px);
    z-index: 1050;
    transition: transform .3s cubic-bezier(.34,1.26,.64,1);
}
.profile-sheet.open {
    transform: translateX(-50%) translateY(0);
}
.profile-sheet-handle {
    width: 40px; height: 4px;
    background: #D9E4F0;
    border-radius: 2px;
    margin: 14px auto 20px;
}
.profile-sheet-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800;
    margin: 0 auto 10px;
}
.profile-sheet-name  { text-align: center; font-weight: 800; font-size: 16px; color: var(--primary-dark); }
.profile-sheet-email { text-align: center; font-size: 12px; color: #9CA3AF; margin-top: 3px; }
.profile-sheet-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    background: #FEF2F2;
    color: #EF4444;
    border: none;
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.profile-sheet-row:hover { background: #FEE2E2; }
.profile-sheet-row ion-icon { font-size: 18px; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   CART DRAWER
════════════════════════════════════════════ */
.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1055;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.cart-backdrop.show { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%; max-width: 430px;
    background: #fff;
    border-radius: 22px 22px 0 0;
    z-index: 1056;
    display: flex;
    flex-direction: column;
    max-height: 90dvh;
    transition: transform .32s cubic-bezier(.34,1.2,.64,1);
    overflow: hidden;
    box-shadow: 0 -8px 32px rgba(0,0,0,.2);
}
.cart-drawer.open { transform: translateX(-50%) translateY(0); }

.cart-drawer-handle {
    width: 40px; height: 4px;
    background: #D9E4F0;
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

.cart-drawer-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 10px;
    border-bottom: 1.5px solid #EEF3FC;
    flex-shrink: 0;
}
.cart-drawer-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    font-size: 15px;
    color: var(--primary-dark);
    flex: 1;
}
.cart-drawer-title ion-icon { font-size: 19px; color: var(--primary); }
.cart-drawer-badge {
    background: var(--gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}
.cart-drawer-close {
    background: #EEF3FC;
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: #6B7280;
    flex-shrink: 0;
    transition: background .2s;
}
.cart-drawer-close:hover { background: #D9E4F0; }

/* Items area */
.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
    overscroll-behavior: contain;
}
.cart-drawer-items::-webkit-scrollbar { width: 3px; }
.cart-drawer-items::-webkit-scrollbar-thumb { background: #D9E4F0; border-radius: 2px; }

/* Empty state */
.cart-empty {
    text-align: center;
    padding: 44px 20px;
    color: #9CA3AF;
}
.cart-empty ion-icon { font-size: 54px; display: block; margin: 0 auto 12px; color: #D9E4F0; }
.cart-empty p { font-weight: 700; font-size: 15px; color: #374151; margin: 0 0 4px; }
.cart-empty small { font-size: 12px; }

/* Loading spinner */
.cart-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 48px;
    color: var(--primary);
    font-size: 28px;
}
.spin { animation: spin .8s linear infinite; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cart item row */
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 4px;
    border-bottom: 1px solid #EEF3FC;
    transition: opacity .2s;
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
    width: 62px; height: 62px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid #EEF3FC;
    background: #f5f7fa;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
    font-size: 13px; font-weight: 600;
    color: #1F2937;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin: 0 0 3px;
}
.cart-item-price { font-size: 12px; color: #6B7280; margin: 0 0 8px; }

/* Qty controls */
.cart-qty-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: #EEF3FC;
    border-radius: 20px;
    width: fit-content;
    overflow: hidden;
}
.cart-qty-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    color: var(--primary);
    font-size: 16px;
    display: flex; align-items: center;
    transition: background .15s;
}
.cart-qty-btn:hover { background: rgba(27,58,107,.12); }
.cart-qty-num {
    font-size: 13px; font-weight: 700;
    color: var(--primary-dark);
    min-width: 22px; text-align: center;
    user-select: none;
}

/* Right side: remove + subtotal */
.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.cart-remove-btn {
    background: #FEF2F2;
    border: none;
    border-radius: 50%;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: #EF4444;
    cursor: pointer;
    transition: background .15s;
}
.cart-remove-btn:hover { background: #FEE2E2; }
.cart-item-subtotal {
    font-size: 13px; font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
}

/* Footer */
.cart-drawer-footer {
    border-top: 1.5px solid #EEF3FC;
    padding: 14px 18px calc(env(safe-area-inset-bottom) + 16px);
    flex-shrink: 0;
    background: #fff;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.cart-total-label { font-size: 14px; color: #6B7280; font-weight: 600; }
.cart-total-amount { font-size: 18px; font-weight: 800; color: var(--primary-dark); }

.cart-checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: opacity .2s, transform .1s;
    box-shadow: 0 4px 16px rgba(13,34,71,.25);
}
.cart-checkout-btn:hover  { opacity: .92; }
.cart-checkout-btn:active { transform: scale(.98); }

/* ═══════════════════════════════════════════
   CHECKOUT PAGE
════════════════════════════════════════════ */
.co-body {
    background: #F0F4FA;
    min-height: 100dvh;
}

.co-header {
    position: fixed;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.co-back-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px;
    text-decoration: none;
    transition: background .2s;
    flex-shrink: 0;
}
.co-back-btn:hover { background: rgba(255,255,255,.28); color: #fff; }
.co-header-title {
    color: #fff; font-size: 16px; font-weight: 800; margin: 0;
    letter-spacing: .2px;
}

.co-page {
    max-width: 430px;
    margin: 0 auto;
    padding: 76px 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Card shell */
.co-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.co-section-title {
    display: flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 14px;
}
.co-section-title ion-icon { font-size: 17px; color: var(--primary); }
.co-badge {
    margin-left: auto;
    background: var(--gold);
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 9px; border-radius: 20px;
}

/* Items */
.co-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.co-item { display: flex; align-items: center; gap: 10px; }
.co-item-img {
    width: 54px; height: 54px; border-radius: 10px;
    object-fit: cover; flex-shrink: 0;
    border: 1px solid #EEF3FC;
    background: #f5f7fa;
}
.co-item-info { flex: 1; min-width: 0; }
.co-item-name { font-size: 13px; font-weight: 600; color: #1F2937; margin: 0 0 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-item-price { font-size: 11px; color: #9CA3AF; margin: 0; }
.co-item-total { font-size: 13px; font-weight: 800; color: var(--primary-dark); white-space: nowrap; }

/* Price rows */
.co-price-rows { border-top: 1.5px solid #EEF3FC; padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.co-price-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #6B7280; }
.co-price-total { font-size: 15px; font-weight: 800; color: var(--primary-dark); padding-top: 4px; border-top: 1px dashed #EEF3FC; }
.co-free-badge { background: #D1FAE5; color: #059669; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.co-free-text { color: #059669; font-weight: 700; }

/* Form */
.co-form { display: flex; flex-direction: column; gap: 12px; }
.co-field-row { display: flex; gap: 10px; }
.co-field-row .co-field { flex: 1; }
.co-field { display: flex; flex-direction: column; gap: 5px; }
.co-label { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; }
.co-input {
    border: 1.5px solid #D9E4F0; border-radius: 10px;
    padding: 10px 12px; font-size: 13px;
    outline: none; background: #FAFBFF;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
.co-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,58,107,.1); background: #fff; }
.co-textarea { resize: none; }

/* Payment options */
.co-pay-option {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 12px;
    border: 1.5px solid #D9E4F0;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color .2s, background .2s;
    user-select: none;
}
.co-pay-option:last-of-type { margin-bottom: 0; }
.co-pay-option.selected { border-color: var(--primary); background: #F0F6FF; }
.co-pay-radio { display: none; }
.co-pay-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.co-pay-icon-cod  { background: #FEF9EB; color: var(--gold); }
.co-pay-icon-bank { background: #EEF3FC; color: var(--primary); }
.co-pay-info { flex: 1; min-width: 0; }
.co-pay-name { font-size: 13px; font-weight: 700; color: #1F2937; margin: 0 0 2px; }
.co-pay-desc { font-size: 11px; color: #9CA3AF; margin: 0; }
.co-pay-check { flex-shrink: 0; }
.co-pay-check-icon { font-size: 20px; color: #D9E4F0; transition: color .2s; }
.co-pay-option.selected .co-pay-check-icon { color: var(--primary); }

/* Bank details */
.co-bank-details {
    background: #F0F6FF; border-radius: 12px;
    padding: 14px; margin-top: 12px;
}
.co-bank-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: var(--primary);
    margin-bottom: 10px;
}
.co-bank-header ion-icon { font-size: 15px; }
.co-bank-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 7px; }
.co-bank-label { color: #6B7280; flex-shrink: 0; }
.co-bank-val { color: #1F2937; font-weight: 600; text-align: right; }
.co-bank-copy {
    cursor: pointer; color: var(--primary); font-weight: 700;
    display: flex; align-items: center; gap: 4px;
    text-decoration: underline; text-underline-offset: 2px;
}
.co-bank-copy ion-icon { font-size: 13px; }
.co-bank-total { color: var(--primary-dark); font-weight: 800; font-size: 14px; }
.co-bank-note {
    display: flex; gap: 5px; align-items: flex-start;
    font-size: 11px; color: #B45309;
    background: #FEF3C7; border-radius: 8px; padding: 9px 10px;
    margin: 10px 0 0; line-height: 1.5;
}
.co-bank-note ion-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* Error */
.co-error {
    background: #FEF2F2; color: #DC2626;
    border-radius: 10px; padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    border: 1px solid #FCA5A5;
}

/* Footer */
.co-footer {
    background: #fff; border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.co-footer-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.co-footer-total span { font-size: 13px; color: #6B7280; font-weight: 600; }
.co-footer-total strong { font-size: 18px; font-weight: 800; color: var(--primary-dark); }
.co-place-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; border: none; border-radius: 14px;
    padding: 14px; font-size: 15px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 16px rgba(13,34,71,.3);
    transition: opacity .2s, transform .1s;
}
.co-place-btn:hover  { opacity: .92; }
.co-place-btn:active { transform: scale(.98); }
.co-place-btn:disabled { opacity: .65; cursor: not-allowed; }

/* Success overlay */
.co-success-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9000;
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; transition: opacity .3s;
}
.co-success-overlay.show { opacity: 1; }
.co-success-card {
    background: #fff; border-radius: 24px 24px 0 0;
    padding: 28px 22px calc(env(safe-area-inset-bottom) + 28px);
    width: 100%; max-width: 430px;
    text-align: center;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.34,1.2,.64,1);
}
.co-success-overlay.show .co-success-card { transform: translateY(0); }
.co-success-icon { font-size: 56px; color: #22C55E; line-height: 1; margin-bottom: 10px; }
.co-success-title { font-size: 22px; font-weight: 800; color: var(--primary-dark); margin: 0 0 4px; }
.co-success-sub { color: #6B7280; font-size: 13px; margin: 0 0 14px; }
.co-success-id {
    background: #EEF3FC; border-radius: 10px;
    padding: 8px 16px; font-size: 14px; font-weight: 700;
    color: var(--primary); display: inline-block; margin-bottom: 12px;
    letter-spacing: .5px;
}
.co-success-pay {
    background: #F0FDF4; border-radius: 10px; padding: 10px 14px;
    font-size: 12px; color: #065F46; text-align: left;
    display: flex; gap: 6px; align-items: flex-start; margin-bottom: 20px;
    border: 1px solid #BBF7D0; line-height: 1.6;
}
.co-success-pay ion-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; color: #22C55E; }
.co-success-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; border-radius: 14px;
    padding: 13px; font-size: 14px; font-weight: 700;
    text-decoration: none; margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(13,34,71,.25);
}
.co-success-home {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    color: #6B7280; font-size: 13px; font-weight: 600;
    text-decoration: none; padding: 8px;
}
.co-success-home:hover { color: var(--primary); }

/* ═══════════════════════════════════════════
   ORDERS PAGE
════════════════════════════════════════════ */
.ord-empty {
    text-align: center; padding: 56px 20px; color: #9CA3AF;
}
.ord-empty ion-icon { font-size: 60px; display: block; margin: 0 auto 14px; color: #D9E4F0; }
.ord-empty p { font-weight: 700; font-size: 16px; color: #374151; margin: 0 0 4px; }
.ord-empty small { font-size: 13px; }
.ord-shop-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; border-radius: 12px; padding: 11px 22px;
    font-size: 14px; font-weight: 700; text-decoration: none;
    margin-top: 20px; box-shadow: 0 4px 14px rgba(13,34,71,.2);
}

.ord-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
    margin-bottom: 14px;
}
.ord-card-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 14px 14px 10px;
    border-bottom: 1px solid #EEF3FC;
}
.ord-id { font-size: 13px; font-weight: 800; color: var(--primary-dark); margin: 0 0 2px; letter-spacing: .4px; }
.ord-date { font-size: 11px; color: #9CA3AF; margin: 0; }

/* Status badges */
.ord-status {
    font-size: 11px; font-weight: 700; padding: 4px 10px;
    border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.ord-status-pending     { background: #FEF9EB; color: #B45309; }
.ord-status-processing  { background: #EEF3FC; color: var(--primary); }
.ord-status-shipped     { background: #F0FDF4; color: #059669; }
.ord-status-delivered   { background: #D1FAE5; color: #065F46; }
.ord-status-cancelled   { background: #FEF2F2; color: #DC2626; }

.ord-items-preview {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #EEF3FC;
}
.ord-thumb {
    width: 44px; height: 44px; border-radius: 8px;
    object-fit: cover; border: 1px solid #EEF3FC;
    background: #f5f7fa; flex-shrink: 0;
}
.ord-thumb-more {
    width: 44px; height: 44px; border-radius: 8px;
    background: #EEF3FC; color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.ord-items-label { font-size: 11px; color: #9CA3AF; margin-left: auto; }

.ord-bottom-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
}
.ord-pay-method {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; color: #6B7280;
}
.ord-pay-method ion-icon { font-size: 14px; }
.ord-pay-status {
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
    margin-left: 6px;
}
.ord-pay-pending   { background: #FEF9EB; color: #B45309; }
.ord-pay-awaiting  { background: #EEF3FC; color: var(--primary); }
.ord-pay-paid      { background: #D1FAE5; color: #059669; }
.ord-total { font-size: 16px; font-weight: 800; color: var(--primary-dark); margin: 0; }

.ord-toggle-btn {
    width: 100%; background: #F8FAFF;
    border: none; border-top: 1px solid #EEF3FC;
    padding: 10px; font-size: 12px; font-weight: 600;
    color: var(--primary); cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: background .15s;
}
.ord-toggle-btn:hover { background: #EEF3FC; }

.ord-details { padding: 0 14px 14px; }
.ord-detail-section { margin-top: 14px; }
.ord-detail-heading {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: var(--primary);
    margin: 0 0 8px;
}
.ord-detail-heading ion-icon { font-size: 14px; }
.ord-detail-text { font-size: 12px; color: #374151; line-height: 1.7; margin: 0; }
.ord-detail-note { font-size: 11px; color: #9CA3AF; margin: 4px 0 0; font-style: italic; }

.ord-item-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0; border-bottom: 1px solid #EEF3FC;
}
.ord-item-row:last-child { border-bottom: none; }
.ord-item-img {
    width: 42px; height: 42px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0; border: 1px solid #EEF3FC;
}
.ord-item-info { flex: 1; min-width: 0; }
.ord-item-info p { font-size: 12px; font-weight: 600; color: #1F2937; margin: 0 0 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-item-info small { font-size: 11px; color: #9CA3AF; }
.ord-item-sub { font-size: 12px; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }

.ord-price-summary {
    border-top: 1.5px solid #EEF3FC;
    margin-top: 10px; padding-top: 10px;
    display: flex; flex-direction: column; gap: 6px;
}
.ord-price-row { display: flex; justify-content: space-between; font-size: 12px; color: #6B7280; }
.ord-price-total { font-size: 14px; font-weight: 800; color: var(--primary-dark); padding-top: 4px; border-top: 1px dashed #EEF3FC; }

.ord-bank-remind {
    background: #FEF3C7; border-radius: 10px; padding: 10px 12px;
    font-size: 12px; color: #92400E; line-height: 1.6; margin-top: 12px;
    display: flex; gap: 6px; align-items: flex-start;
    border: 1px solid #FDE68A;
}
.ord-bank-remind ion-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
