/* ==================================================
   PILIHAN AURA VARIAN RASA (VARIABLE ROOT MASTER)
   ================================================== */

/* Varian Rasa 1: DEFAULT (Clean, Fungsional, Membumi)[span_0](start_span)[span_0](end_span) */
body.theme-default, body:not(.theme-kakap) {
  --bg-main: #0d1117;
  --bg-card: #161b22;
  --bg-input: #21262d;
  --border-color: #30363d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --accent-blue: #58a6ff;
  --accent-green: #3fb950;
  --accent-neon: #00ff66;
  --accent-red: #ff7b72;
  --shadow-premium: 0 10px 30px rgba(0,0,0,0.5);
}

/* Varian Rasa 2: KAKAP (Ultra Premium, Menyala, Dark Gold Glandular)[span_1](start_span)[span_1](end_span) */
body.theme-kakap {
  --bg-main: #06090e;
  --bg-card: #0d1117;
  --bg-input: #161b22;
  --border-color: #d4af37; /* Sentuhan Emas Berwibawa */
  --text-primary: #ffffff;
  --text-secondary: #8b949e;
  --accent-blue: #d4af37; /* Aksen utama berubah jadi Emas Premium */
  --accent-green: #00ff66;
  --accent-neon: #00ff66;
  --accent-red: #ff7b72;
  --shadow-premium: 0 15px 40px rgba(212, 175, 55, 0.15);
}

/* ==================================================
   CORE STYLING & BASE RESET
   ================================================== */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: 'Inter', sans-serif; 
}

body { 
  background-color: var(--bg-main); 
  color: var(--text-primary); 
  padding-bottom: 60px; 
  min-height: 100vh; 
  transition: background-color 0.3s ease, color 0.3s ease;
}

header { 
  background-color: rgba(18, 24, 36, 0.75); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 5px solid var(--border-color); 
  padding: 16px 20px; 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  border-radius: 12px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.header-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.store-profile-header { display: flex; align-items: center; gap: 15px; width: 100%; }

.store-logo { 
  width: 50px; 
  height: 50px; 
  background-color: var(--accent-blue); 
  border-radius: 14px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 1.5rem; 
  font-weight: 800; 
  color: #0d1117; 
  overflow: hidden; 
  border: 1px solid var(--border-color); 
  flex-shrink: 0; 
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.store-info-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.store-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.slogan-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; width: 100%; }
.store-slogan { font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; background-color: rgba(63, 185, 80, 0.15); color: var(--accent-green); font-size: 0.7rem; font-weight: 600; border: 1px solid rgba(63, 185, 80, 0.3); flex-shrink: 0; }
.status-pill.offline { background-color: rgba(255, 123, 114, 0.15); color: var(--accent-red); border-color: rgba(255, 123, 114, 0.3); }
.status-dot { width: 8px; height: 8px; background-color: var(--accent-green); border-radius: 50%; display: inline-block; }
.status-dot.offline { background-color: var(--accent-red); }

/* ==========================================
   HERO NEURO-PSYCHOLOGY STYLING
   ========================================== */
.hero-neuro-section {
  text-align: center;
  padding: 20px 20px 60px 20px;
  background: radial-gradient(circle at top, rgba(88, 166, 255, 0.1) 0%, transparent 70%);
  border-radius: 24px;
  border: 1px solid rgba(48, 54, 61, 0.6);
  margin-bottom: 40px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background-color: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 30px;
  letter-spacing: 1px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-headline {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(135deg, #ff7b72, #f8e71c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-glow {
  color: var(--accent-neon);
  text-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

.hero-subheadline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 30px auto;
  line-height: 1.7;
  font-weight: 400;
}

.text-highlight {
  color: var(--text-primary);
  border-bottom: 2px dashed var(--accent-blue);
  font-weight: 600;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent-blue), #4364F7);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(67, 100, 247, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(67, 100, 247, 0.6);
}

.cta-scarcity {
  font-size: 0.75rem;
  color: var(--accent-red);
  font-weight: 600;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.premium-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 40px 0;
}

@media (max-width: 768px) {
  .hero-headline { font-size: 2rem; }
  .hero-subheadline { font-size: 0.95rem; }
}

/* ==================================================
   LAYOUT UTAMA & PRODUCT GRID
   ================================================== */
.main-container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background-color: var(--border-color); }

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

/* Product Card Base */
.product-card { 
  background-color: var(--bg-card); 
  border: 1px solid var(--border-color); 
  border-radius: 16px; 
  overflow: hidden; 
  display: flex; 
  flex-direction: column; 
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; 
}

.product-card:hover { 
  transform: translateY(-5px); 
  border-color: var(--accent-blue); 
  box-shadow: var(--shadow-premium);
}

/* ==================================================
   FIXED: PRODUCT IMAGE PATRIOT / PORTRAIT STYLE (3:4)[span_2](start_span)[span_2](end_span)
   ================================================== */
.product-image-container { 
  width: 100%; 
  aspect-ratio: 3 / 4; 
  height: auto; 
  background-color: #000; 
  position: relative; 
  cursor: pointer; 
  overflow: hidden;
}

.product-img { 
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  display: block;
}

.product-tag { position: absolute; top: 12px; left: 12px; background-color: rgba(13, 17, 23, 0.85); border: 1px solid var(--accent-blue); color: var(--accent-blue); font-size: 0.7rem; font-weight: 700; padding: 4px 8px; border-radius: 6px; text-transform: uppercase; }

/* Content Details */
.product-content { padding: 20px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.product-name { font-size: 1.1rem; font-weight: 600; cursor: pointer; }
.product-desc-short { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.product-price-row { display: flex; align-items: center; gap: 10px; margin-top: auto; cursor: pointer; }
.price-real { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.price-strike { font-size: 0.85rem; color: var(--text-secondary); text-decoration: line-through; }

.card-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: 10px; }
button { border: none; border-radius: 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s ease; }
.btn-detail { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-primary); height: 38px; }
.btn-detail:hover { background-color: var(--bg-input); }

/* --- TONE UP TOMBOL BELI (AGAR LEBIH KONTRAS & PREMIUM) --- */
.btn-buy {
  background: linear-gradient(135deg, #ffd700, #ffaa00) !important;
  color: #111111 !important;
  font-weight: 700 !important;
  height: 38px;
  border: none !important;
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.4) !important;
  transition: all 0.3s ease;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 170, 0, 0.6) !important;
  opacity: 0.95;
}

button:disabled { opacity: 0.5; cursor: not-allowed; background-color: var(--bg-input) !important; color: var(--text-secondary) !important; border-color: var(--border-color) !important; box-shadow: none !important; }

/* ==================================================
   EFEK MAKSIMAL KHUSUS: VARIAN RASA KAKAP 🦈[span_3](start_span)[span_3](end_span)
   ================================================== */
body.theme-kakap .product-card {
  background: linear-gradient(145deg, #0d1117, #121824);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
}
body.theme-kakap .product-card:hover {
  border-color: #d4af37;
  transform: translateY(-8px) scale(1.02);
}
body.theme-kakap .btn-buy {
  background: linear-gradient(135deg, #d4af37, #f3e5ab) !important;
  color: #06090e !important;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* ==================================================
   ELEMEN PENDUKUNG (MAP, MODAL, CART, CHAT)
   ================================================== */
.responsive-map-wrapper { 
  position: relative; 
  padding-bottom: 56.25%; 
  height: 0; 
  overflow: hidden; 
  border-radius: 12px; 
  border: 1px solid var(--border-color);
  background-color: #000;
  margin-top: 12px;
}
.responsive-map-wrapper iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; }

.floating-actions { position: fixed; bottom: 25px; right: 25px; display: flex; flex-direction: column; gap: 15px; z-index: 200; }
.btn-floating { width: 56px; height: 56px; border-radius: 50%; position: relative; color: var(--text-primary); }

/* --- TONE UP FLOATING CART (IKON KERANJANG MENGAMBANG) --- */
.btn-floating-cart, .floating-cart-btn, #cartModalToggle {
  background: linear-gradient(135deg, #00ff87, #60efff) !important;
  color: #0d1117 !important;
  box-shadow: 0 6px 25px rgba(0, 255, 135, 0.5) !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  animation: pulseCart 2s infinite;
}

@keyframes pulseCart {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 135, 0.6); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(0, 255, 135, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 135, 0); }
}

.btn-floating-chat { background-color: var(--bg-card); border: 1px solid var(--border-color); }

/* Badge Angka Keranjang agar Lebih Garang & Jelas */
.cart-badge, .badge-count { 
  position: absolute; 
  top: -5px; 
  right: -5px; 
  background-color: #ff3366 !important; 
  color: #ffffff !important; 
  font-size: 0.75rem; 
  font-weight: 800 !important; 
  min-width: 22px; 
  height: 22px; 
  padding: 0 6px; 
  border-radius: 11px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border: 2px solid #0d1117; 
  box-shadow: 0 2px 8px rgba(255, 51, 102, 0.6);
}

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); z-index: 300; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 20px; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box { background-color: var(--bg-card); border: 1px solid var(--border-color); width: 100%; max-width: 500px; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(30px); } to { transform: translateY(0); } }

.modal-header { padding: 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.15rem; font-weight: 700; }
.btn-close-modal { background: none; color: var(--text-secondary); font-size: 1.5rem; }
.modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }

/* MODAL DETAIL PORTRAIT FIX[span_4](start_span)[span_4](end_span) */
.detail-img-view { 
  width: 100%; 
  aspect-ratio: 3 / 4; 
  height: auto; 
  border-radius: 12px; 
  object-fit: contain; 
  background-color: #000; 
}
.detail-section-title { font-size: 0.85rem; font-weight: 700; color: var(--accent-blue); text-transform: uppercase; margin-top: 5px; }
.detail-text { font-size: 0.9rem; color: var(--text-primary); line-height: 1.5; }

.cart-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--border-color); gap: 15px; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-size: 0.95rem; font-weight: 600; }
.cart-item-price { font-size: 0.85rem; color: var(--text-secondary); }
.item-notes { width: 100%; height: 32px; background-color: var(--bg-input); border: 1px solid var(--border-color); border-radius: 6px; padding: 0 10px; color: var(--text-primary); font-size: 0.75rem; margin-top: 5px; }
.quantity-control { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background-color: var(--bg-input); }
.qty-btn { width: 32px; height: 32px; background: none; color: var(--text-primary); font-size: 1.1rem; }
.qty-btn:hover { background-color: var(--border-color); }
.qty-val { width: 32px; text-align: center; font-size: 0.9rem; font-weight: 600; }

.cart-summary { background-color: var(--bg-input); padding: 15px; border-radius: 12px; margin-top: 15px; display: flex; flex-direction: column; gap: 10px; font-size: 0.85rem; }
.summary-row { display: flex; justify-content: space-between; color: var(--text-secondary); }
.summary-row.total { color: var(--text-primary); font-size: 1.05rem; font-weight: 700; border-top: 1px dashed var(--border-color); padding-top: 10px; margin-top: 5px; }
.free-delivery-badge { background-color: rgba(0, 255, 102, 0.15); color: var(--accent-neon); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; }
.btn-checkout { background-color: var(--accent-green); color: #0d1117; width: 100%; height: 46px; border-radius: 12px; font-size: 1rem; margin-top: 10px; }

/* ==================================================
   CHAT WINDOW PREMIUM & AUTO-RESPONSIF
   ================================================== */
.chat-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 85%;          
  max-width: 340px;    
  height: 70vh;        
  max-height: 460px;   
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  border-radius: 20px; 
  border: 1px solid rgba(212, 175, 55, 0.25); 
  background: #ffffff;
  display: none;       
  flex-direction: column;
  overflow: hidden;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #1a1a1a; border-bottom: 1px solid rgba(212, 175, 55, 0.2); }
.chat-header-left { display: flex; align-items: center; gap: 10px; }
.chat-header-title { color: #ffffff; font-size: 13px; font-weight: 600; letter-spacing: 0.3px; }
.chat-header-status { color: #a0a0a0; font-size: 10.5px; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.status-dot { width: 6px; height: 6px; background: #2ecc71; border-radius: 50%; display: inline-block; }

.chat-messages { flex: 1; padding: 14px; overflow-y: auto; background: #fdfbf7; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 80%; padding: 9px 12px; border-radius: 14px; font-size: 12px; line-height: 1.4; word-wrap: break-word; }
.msg.bot { background: #ffffff; color: #333333; align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; }
.msg.user { background: #1a1a1a; color: #ffffff; align-self: flex-end; border-bottom-right-radius: 4px; border: 1px solid rgba(212, 175, 55, 0.3); }

.chat-footer { display: flex; align-items: center; padding: 10px 12px; background: #ffffff; border-top: 1px solid #f0f0f0; gap: 8px; }
.chat-input { flex: 1; border: 1px solid #e0e0e0; padding: 8px 12px; border-radius: 20px; font-size: 12px; outline: none; transition: border-color 0.2s; background: #f9f9f9; }
.chat-input:focus { border-color: #D4AF37; background: #ffffff; }
.btn-send-chat { background: #1a1a1a; border: 1px solid rgba(212, 175, 55, 0.4); color: #D4AF37; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.btn-send-chat:hover { background: #000000; transform: scale(1.05); }

.btn-sosmed { transition: transform 0.2s ease, opacity 0.2s ease !important; }
.btn-sosmed:hover { transform: scale(1.04); opacity: 0.95; }

.premium-footer {
  margin-top: auto; 
  background-color: #161b22; 
  border-top: 1px solid #30363d; 
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #8b949e;
}
