/* KlikMart — Mini Market App Loyalty style
   PAGE_ARCHETYPE: Social/App Landing Bento
   Palette "Digital Grocer": indigo #4f46e5, violet #7c3aed, lime #a3e635, pink #f472b6 */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #7c3aed;
  --accent: #a3e635;
  --accent-pink: #f472b6;
  --bg: #f7f7fb;
  --surface: #ffffff;
  --border: #e5e5f0;
  --text: #1e1b3a;
  --text-muted: #6b6b85;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --radius: 20px;
  --shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

[data-theme="dark"] {
  --bg: #0f0e1f;
  --surface: #191733;
  --border: #2b2850;
  --text: #f2f2fb;
  --text-muted: #a8a6c8;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(79,70,229,0.25); }
.btn-outline { border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff;
  padding: 10px 16px; z-index: 10000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Header — minimal sticky, NOT mega-menu */
header.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}
[data-theme="dark"] header.site-header { background: rgba(15,14,31,0.85); }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.92rem; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.hamburger { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); align-items: center; justify-content: center; }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 10px 4px; font-weight: 600; border-bottom: 1px solid var(--border); }

/* Hero — split with phone mockup */
.hero {
  padding: 60px 0 40px;
  background: radial-gradient(circle at 80% 10%, rgba(124,58,237,0.12), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 18px; }
.hero .highlight { color: var(--primary); }
.hero p.lead { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 28px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 12px; font-size: 0.82rem; font-weight: 700; color: var(--text);
  background: var(--surface);
}
.store-badge i { color: var(--primary); font-size: 1.1rem; }
.hero-media { position: relative; }
.hero-media img { border-radius: 28px; }
.hero-stats {
  display: flex; gap: 18px; margin-top: 28px; flex-wrap: wrap;
}
.hero-stat { text-align: left; }
.hero-stat .num { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.hero-stat .lbl { font-size: 0.78rem; color: var(--text-muted); }

/* Trust marquee */
.marquee-wrap { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; background: var(--surface); }
.marquee-track { display: flex; gap: 48px; white-space: nowrap; animation: marquee 22s linear infinite; width: max-content; }
.marquee-track span { font-weight: 700; color: var(--text-muted); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; }
.marquee-track span i { color: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Bento feature grid — signature structural component of this archetype */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 20px;
}
.bento-card {
  border-radius: var(--radius);
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bento-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.bento-card .icon-badge {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #fff; margin-bottom: 14px;
}
.bento-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.bento-card p { font-size: 0.85rem; color: var(--text-muted); }
.bento-1 { grid-column: span 2; grid-row: span 2; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.bento-1 h3, .bento-1 p { color: #fff; }
.bento-1 .icon-badge { background: rgba(255,255,255,0.2); }
.bento-2 { grid-column: span 2; grid-row: span 1; }
.bento-3 { grid-column: span 1; grid-row: span 1; }
.bento-4 { grid-column: span 1; grid-row: span 1; }
.bento-5 { grid-column: span 2; grid-row: span 1; }
.bento-6 { grid-column: span 2; grid-row: span 1; }

/* Loyalty simulator — signature interactive feature */
.simulator {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  border-radius: 28px;
  padding: 48px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.simulator h2 { font-size: 1.8rem; margin-bottom: 12px; }
.simulator p { opacity: 0.88; margin-bottom: 22px; }
.sim-form { display: flex; flex-direction: column; gap: 14px; }
.sim-form label { font-size: 0.85rem; font-weight: 700; }
.sim-form input, .sim-form select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: none;
  font-family: inherit; font-size: 0.95rem;
}
.sim-result {
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(6px);
}
.sim-result .big-num { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 800; }
.sim-result .row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.18); }

/* Katalog / Produk — app content grid, NOT retail catalog storefront */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.tab-btn {
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border);
  font-weight: 700; font-size: 0.85rem; color: var(--text-muted);
}
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; cursor: pointer;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card img { width: 100%; height: 150px; object-fit: cover; }
.product-body { padding: 16px; }
.product-body .cat { font-size: 0.72rem; color: var(--primary); font-weight: 700; text-transform: uppercase; }
.product-body h4 { font-size: 0.98rem; margin: 6px 0; }
.product-body .price { font-weight: 800; color: var(--text); }
.product-body .old-price { text-decoration: line-through; color: var(--text-muted); font-size: 0.82rem; margin-left: 6px; }
.badge { display: inline-block; font-size: 0.68rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; margin-bottom: 6px; }
.badge-poin { background: rgba(163,230,53,0.25); color: #4d7c0f; }
.badge-baru { background: rgba(244,114,182,0.2); color: #be185d; }

/* Membership pricing — replaces flash-sale of Fresh Hub */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; text-align: center; position: relative;
}
.price-card.featured { border: 2px solid var(--primary); transform: scale(1.03); box-shadow: var(--shadow); }
.price-card .ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-pink); color: #fff; font-size: 0.72rem; font-weight: 800;
  padding: 4px 14px; border-radius: 999px;
}
.price-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.price-card .amount { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; margin: 12px 0; }
.price-card .amount span { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.price-card ul { text-align: left; margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.price-card ul li { font-size: 0.88rem; display: flex; gap: 8px; align-items: flex-start; }
.price-card ul li i { color: var(--success); margin-top: 3px; }

/* About split */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-grid img { border-radius: var(--radius); }
.checklist { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.checklist li i { color: var(--success); margin-top: 3px; }

/* Stat counter */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.stat-card .num { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .lbl { color: var(--text-muted); font-size: 0.85rem; margin-top: 6px; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; }
.gallery-item img { transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 14px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.65)); font-weight: 700; font-size: 0.85rem;
}

/* Articles */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.article-card img { height: 160px; object-fit: cover; width: 100%; }
.article-body { padding: 18px; }
.article-body .date { font-size: 0.75rem; color: var(--text-muted); }
.article-body h4 { margin: 8px 0; font-size: 1rem; }
.article-body a.read-more { color: var(--primary); font-weight: 700; font-size: 0.85rem; }

/* Testimonial — single rotating big quote (not grid of cards) */
.testi-wrap { max-width: 720px; margin: 0 auto; text-align: center; position: relative; }
.testi-slide { display: none; }
.testi-slide.active { display: block; animation: fadeIn 0.5s ease; }
.testi-slide p.quote { font-size: 1.35rem; font-family: var(--font-heading); font-weight: 600; margin-bottom: 20px; }
.testi-slide .who { display: flex; align-items: center; justify-content: center; gap: 12px; }
.testi-slide .who img { width: 48px; height: 48px; border-radius: 50%; }
.testi-slide .stars { color: #facc15; margin-bottom: 16px; }
.testi-dots { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.testi-dots button { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.testi-dots button.active { background: var(--primary); width: 26px; border-radius: 6px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 22px; color: var(--text-muted); font-size: 0.9rem; }
.faq-item.open .faq-a { max-height: 220px; padding-bottom: 18px; }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-q i { transition: transform 0.3s ease; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info .item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info .item i { color: var(--primary); font-size: 1.2rem; margin-top: 3px; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit;
}

/* Footer */
footer.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--text-muted); font-size: 0.88rem; }
.footer-grid a:hover { color: var(--primary); }
.social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: 0.8rem; color: var(--text-muted); }

/* Floating elements */
.fab-wa {
  position: fixed; bottom: 26px; right: 26px; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; box-shadow: 0 10px 24px rgba(37,211,102,0.4); z-index: 800;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.back-to-top {
  position: fixed; bottom: 26px; right: 96px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; z-index: 800;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,14,31,0.55); display: none; align-items: center;
  justify-content: center; z-index: 1000; padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border-radius: var(--radius); max-width: 560px; width: 100%;
  max-height: 88vh; overflow-y: auto; position: relative; animation: fadeIn 0.3s ease;
}
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 30px; }
.modal-body img { border-radius: 16px; margin-bottom: 18px; width: 100%; height: 220px; object-fit: cover; }
.modal-body .price-row { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; }
.modal-body .meta-row { display: flex; gap: 20px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.modal-body .stock-ok { color: var(--success); font-weight: 700; }

/* Toast */
.toast-wrap { position: fixed; top: 90px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 1100; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); font-size: 0.88rem;
  min-width: 260px; animation: slideIn 0.3s ease;
}
.toast.success { border-left-color: var(--success); }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Skeleton (used briefly on product grid load) */
.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); height: 260px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Responsive */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .bento-1 { grid-column: span 2; }
  .bento-5, .bento-6 { grid-column: span 2; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid, .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .simulator, .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-1, .bento-2, .bento-5, .bento-6 { grid-column: span 1; }
  .bento-card { min-height: 160px; }
  .product-grid, .gallery-grid, .article-grid, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
  .simulator { padding: 28px; }
}
