/* ========================================================
   GLOBAL & SHARED STYLES (WARNA, HEADER, FOOTER)
======================================================== */
:root {
    --primary: #10b981; --primary-dark: #065f46; --primary-hover: #059669;
    --primary-light: #d1fae5; 
    --bg: #f8fafc; --text: #1e293b; --text-muted: #64748b;
    --card: #ffffff; --border: #cbd5e1; --danger: #ef4444; --warning: #f97316;
}

body.dark-mode {
    --bg: #0f172a; --text: #f1f5f9; --text-muted: #94a3b8;
    --card: #1e293b; --border: #334155; --primary-dark: #022c22;
    --primary-light: #064e3b; 
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body { background: var(--bg); color: var(--text); transition: 0.3s; padding-bottom: 80px; font-size: 14px; line-height: 1.5; }

h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 5px; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 15px; }

header { background: var(--card); padding: 12px 5%; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); position: static; top: 0; z-index: auto; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 32px; width: auto; object-fit: contain; border-radius: 4px; }
#header-text {
    font-size: 1.5rem; font-weight: 900; letter-spacing: 0.5px; text-transform: uppercase; display: inline-block;
    background: linear-gradient(110deg, var(--primary) 20%, #ffffff 50%, var(--primary) 80%);
    background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text;
    animation: shimmerText 3s linear infinite;
}
body.dark-mode #header-text { background: linear-gradient(110deg, var(--primary) 20%, #fcd34d 50%, var(--primary) 80%); background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text; }
@keyframes shimmerText { 0% { background-position: 200% center; } 100% { background-position: -200% center; } }

.header-controls button { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; }

.full-footer { position: fixed; bottom: 0; left: 0; width: 100%; background: linear-gradient(135deg, var(--primary-dark), var(--primary-hover)); border-top: 1px solid var(--border); color: white; padding: 10px 15px; text-align: center; font-size: 0.75rem; z-index: 90; box-shadow: 0 -4px 10px rgba(0,0,0,0.1); display: flex; flex-direction: column; gap: 5px; }


/* ========================================================
   CUSTOMER STYLES (PROMO, PRODUK, CHECKOUT)
======================================================== */
.marquee-container { background: linear-gradient(135deg, var(--primary), #34d399); color: white; padding: 10px 0; font-size: 0.9rem; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.2); width: 100%; overflow: hidden; white-space: nowrap; }
.marquee-content { display: inline-block; padding-left: 100%; animation: marqueeMove 15s linear infinite; }
@keyframes marqueeMove { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.banner-wrapper { padding: 15px 5%; max-width: 1200px; margin: 0 auto; }
.banner-slider { position: relative; width: 100%; aspect-ratio: 16 / 5; border-radius: 12px; overflow: hidden; background: #e2e8f0; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

.content-wrapper { max-width: 1000px; margin: 10px auto 30px; padding: 0 5%; }
.subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 15px; font-weight: 400;}

.flash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; background: linear-gradient(135deg, var(--danger), #b91c1c); padding: 8px 15px; border-radius: 10px; color: white; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2); flex-wrap: wrap; gap: 8px;}
.flash-header h2 { font-size: 1.15rem; margin: 0; }
.flash-header i { font-size: 1.25rem; }
.countdown-timer { background: rgba(255, 255, 255, 0.25); padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; letter-spacing: 0.5px;}

.category-tabs { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 15px; margin-bottom: 15px; border-bottom: none; -ms-overflow-style: none; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.cat-btn { background: var(--card); border: 1px solid var(--border); border-radius: 30px; padding: 8px 20px; color: var(--text-muted); font-weight: 700; cursor: pointer; font-size: 0.85rem; transition: 0.3s; white-space: nowrap; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.cat-btn:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.cat-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); }
body.dark-mode .cat-btn { background: #334155; border-color: #475569; }

.tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; -ms-overflow-style: none; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { padding: 8px 18px; border-radius: 30px; background: var(--card); color: var(--text-muted); border: none; box-shadow: 0 2px 6px rgba(0,0,0,0.03); cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 0.85rem; transition: 0.3s; }
.tab-btn:hover { background: #e2e8f0; color: var(--text); transform: translateY(-2px); }
body.dark-mode .tab-btn:hover { background: #334155; }
.tab-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); transform: translateY(-2px); }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 100%; box-sizing: border-box; }

.product-card { background: linear-gradient(135deg, var(--card) 40%, rgba(16, 185, 129, 0.08) 100%); padding: 15px 8px 10px; border-radius: 10px; border: 1px solid var(--border); min-height: 85px; text-align: center; transition: all 0.3s ease; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: visible; box-shadow: 0 2px 8px rgba(0,0,0,0.02); cursor: pointer; }
.product-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12); background: linear-gradient(135deg, var(--card) 20%, rgba(16, 185, 129, 0.15) 100%); z-index: 2; }
.product-card.selected { border: 2px solid var(--primary); background: var(--primary-light); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25); transform: translateY(-4px); z-index: 3; }
body.dark-mode .product-card.selected { border-color: var(--primary); background: rgba(16, 185, 129, 0.2); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); }

.badge-flash { position: absolute; top: -8px; left: -5px; padding: 3px 6px; font-size: 0.65rem; color: white; font-weight: 800; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 5; background: linear-gradient(135deg, #ef4444, #991b1b); }
.btn-info { position: absolute; top: -8px; right: -5px; width: 22px; height: 22px; font-size: 0.8rem; font-weight: 900; background: linear-gradient(135deg, #0ea5e9, #0369a1); color: white; border: none; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: 0.2s; z-index: 10; }
.btn-info:hover { transform: scale(1.15); box-shadow: 0 4px 8px rgba(0,0,0,0.3); filter: brightness(1.1); }

.product-text-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; }
.product-nominal { font-size: 0.9rem; font-weight: 800; margin-bottom: 4px; color: var(--text); pointer-events: none; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 38px; line-height: 1.2; word-wrap: break-word; width: 100%; }
.product-price { border-top: 1px solid var(--border); padding-top: 8px; margin-top: auto; width: 100%; color: var(--primary); font-weight: 800; display: block; font-size: 0.85rem; pointer-events: none; }

.checkout-section { background: var(--card); padding: 25px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 4px 15px rgba(0,0,0,0.02); margin-top: 25px; margin-bottom: 20px;}
.payment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-bottom: 25px; }
.payment-card { background: linear-gradient(135deg, var(--card) 50%, rgba(16, 185, 129, 0.06) 100%); border: 1px solid var(--border); padding: 12px 10px; border-radius: 8px; text-align: center; cursor: pointer; font-weight: 700; font-size: 0.85rem; color: var(--text-muted); transition: all 0.3s ease; user-select: none; }
.payment-card:hover { border-color: var(--primary); color: var(--text); background: linear-gradient(135deg, var(--card) 20%, rgba(16, 185, 129, 0.12) 100%); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.05); }
.payment-card.selected { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-color: var(--primary); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); transform: scale(1.05); }

.btn-master-buy { width: 100%; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, #25D366, #128C7E); color: white; border: none; font-size: 1rem; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.2); transition: 0.3s; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 20px; }
.btn-master-buy:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35); filter: brightness(1.05); }

.contact-section { background: linear-gradient(to bottom right, var(--card), var(--bg)); padding: 20px 20px; border-radius: 12px; border: 1px solid var(--border); margin-top: 10px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }

.destination-input { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 0.95rem; font-weight: 600; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.destination-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-light); }
body.dark-mode .destination-input:focus { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

.destination-input-group { display: flex; gap: 8px; width: 100%; }
.destination-input.id-field { flex: 2; }
.destination-input.server-field { flex: 1; text-align: center; padding: 14px 8px; }

#customer-search { width: 100%; padding: 12px 18px; border-radius: 30px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 0.95rem; transition: 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
#customer-search:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-light); }
body.dark-mode #customer-search:focus { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

@media (max-width: 480px) {
    .checkout-section { padding: 20px 15px; }
    .destination-input-group { gap: 6px; }
}