/* ================================================================
   SRENCENG — Stylesheet Utama
   File   : assets/css/style.css
   Author : Srenceng Team
   ================================================================ */

/* ─── RESET & DESIGN TOKENS ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --blue:         #0EA5E9;
  --blue-dark:    #0284C7;
  --blue-light:   #E0F2FE;
  --navy:         #0F172A;
  --green:        #22C55E;
  --green-acc:    #16A34A;
  --wa-green:     #25D366;
  --wa-dark:      #128C7E;
  --gray-50:      #F8FAFC;
  --gray-100:     #F1F5F9;
  --gray-200:     #E2E8F0;
  --gray-400:     #94A3B8;
  --gray-600:     #475569;
  --white:        #FFFFFF;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.14);

  /* Radius */
  --radius:       14px;
  --radius-sm:    8px;

  /* Typography */
  --font-display: 'Nunito', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Layout */
  --bottom-nav-h: 68px;
}

/* ─── BASE ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img   { display: block; max-width: 100%; }
a     { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 99px; }

/* ─── UTILITY ────────────────────────────────────────────────── */
.container {
  width: 100%; max-width: 1200px;
  margin-inline: auto; padding-inline: 20px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 99px;
}
.badge--blue  { background: var(--blue-light); color: var(--blue-dark); }
.badge--green { background: #DCFCE7;           color: var(--green-acc); }

/\* ─── LOGO ─────────────────────────────────────────────────────── *\/
/*
 * Rasio asli logo: 288 x 248 px (w:h = 1.16:1), background transparan
 * Ukuran header  : h=48px → w≈56px   cukup proporsional di navbar
 * Ukuran footer  : h=56px → w≈65px   sedikit lebih besar agar terbaca
 */
.logo-svg-wrap {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.logo-img {
  height: 48px;            /* Desktop header */
  width: auto;             /* Jaga aspek rasio otomatis */
  object-fit: contain;
  display: block;
}
.logo-img--footer {
  height: 56px;            /* Footer sedikit lebih besar */
  width: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 900px) {
  .logo-img         { height: 42px; }
  .logo-img--footer { height: 50px; }
}
@media (max-width: 600px) {
  .logo-img         { height: 36px; }
  .logo-img--footer { height: 44px; }
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 0;
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.header-nav              { display: flex; align-items: center; gap: 24px; }
.header-nav a            { font-size: .9rem; font-weight: 600; color: var(--gray-600); transition: color .2s; }
.header-nav a:hover      { color: var(--blue); }

.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--blue); color: var(--white);
  border: none; border-radius: 99px;
  padding: 10px 18px; font-weight: 700; font-size: .9rem;
  transition: background .2s, transform .15s;
}
.cart-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }

.cart-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--green); color: var(--white);
  font-family: var(--font-display); font-weight: 800; font-size: .7rem;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--white);
  transition: transform .3s;
}
.cart-count.pop { animation: pop .3s ease; }

@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

.nav-toggle {
  display: none; background: none;
  border: none; font-size: 1.5rem;
  color: var(--navy); padding: 4px;
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0F172A 0%, #0C2A4A 50%, #083344 100%);
  color: var(--white);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(14,165,233,.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-label        { margin-bottom: 16px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 em        { font-style: normal; color: var(--blue); }
.hero p            { font-size: 1.05rem; color: rgba(255,255,255,.75); max-width: 440px; margin-bottom: 32px; }
.hero-ctas         { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 99px;
  font-weight: 700; font-size: .95rem;
  border: 2px solid transparent;
  transition: all .2s;
}
.btn-primary         { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover   { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(14,165,233,.4); }
.btn-outline         { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-outline:hover   { background: rgba(255,255,255,.1); border-color: var(--white); }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px; padding: 32px;
  backdrop-filter: blur(16px);
  text-align: center; position: relative; z-index: 1;
}
.hero-emoji   { font-size: 5rem; display: block; line-height: 1; margin-bottom: 16px; }
.hero-stats   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.hero-stat    { background: rgba(255,255,255,.08); border-radius: 12px; padding: 14px 10px; text-align: center; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: var(--blue); }
.hero-stat span   { font-size: .75rem; color: rgba(255,255,255,.65); }

/* Bubble animation */
.bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.4), rgba(14,165,233,.1));
  border: 1px solid rgba(255,255,255,.2);
  animation: float linear infinite;
  pointer-events: none;
}
@keyframes float {
  0%   { transform: translateY(0) scale(1);    opacity: .7; }
  50%  { transform: translateY(-30px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1);    opacity: .7; }
}

/* ─── SECTIONS ───────────────────────────────────────────────── */
.section        { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: 10px; line-height: 1.2;
}
.section-header p { color: var(--gray-600); max-width: 520px; margin: 12px auto 0; }

/* ─── FEATURES / KEUNGGULAN ──────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 28px 24px;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  font-size: 2rem; margin-bottom: 14px;
  width: 52px; height: 52px; background: var(--blue-light);
  border-radius: 12px; display: grid; place-items: center;
}
.feature-card h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p  { font-size: .875rem; color: var(--gray-600); }

/* ─── CATALOG ────────────────────────────────────────────────── */
.catalog { background: var(--gray-50); }

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 20px; border-radius: 99px;
  border: 2px solid var(--gray-200);
  background: var(--white); font-weight: 600; font-size: .875rem;
  color: var(--gray-600); transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.product-img-wrap {
  aspect-ratio: 4/3; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  display: flex; align-items: center; justify-content: center;
}
.product-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
  z-index: 1;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-emoji-placeholder {
  font-size: 5rem; line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.1));
  position: relative; z-index: 0;
}
.product-badge                      { position: absolute; top: 12px; left: 12px; }

.product-body   { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-cat    { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); margin-bottom: 6px; }
.product-name   { font-family: var(--font-display); font-weight: 800; font-size: 1rem; margin-bottom: 6px; line-height: 1.3; }
.product-desc   { font-size: .82rem; color: var(--gray-600); margin-bottom: 14px; flex: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-price  { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--navy); }
.product-price small { font-size: .7rem; font-weight: 600; color: var(--gray-400); display: block; }

.add-btn {
  background: var(--blue); color: var(--white);
  border: none; border-radius: 99px;
  padding: 9px 16px; font-weight: 700; font-size: .82rem;
  display: flex; align-items: center; gap: 6px;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.add-btn:hover  { background: var(--blue-dark); transform: translateY(-1px); }
.add-btn:active { transform: scale(.96); }

/* ─── TESTIMONI ──────────────────────────────────────────────── */
.testimonials      { background: var(--white); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.testi-card   { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px; }
.stars        { color: #F59E0B; font-size: 1rem; letter-spacing: 2px; margin-bottom: 12px; }
.testi-text   { font-size: .9rem; color: var(--gray-600); line-height: 1.7; margin-bottom: 18px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue-light); display: grid; place-items: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.testi-name { font-weight: 700; font-size: .875rem; }
.testi-loc  { font-size: .75rem; color: var(--gray-400); }

/* ─── CTA BANNER ─────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-dark), #0F172A);
  color: var(--white); text-align: center; padding: 80px 20px;
}
.cta-banner h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 12px; }
.cta-banner p  { color: rgba(255,255,255,.7); max-width: 480px; margin: 0 auto 28px; }

.btn-wa {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--wa-green); color: var(--white);
  padding: 16px 32px; border-radius: 99px;
  font-weight: 700; font-size: 1rem;
  border: none; transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-wa:hover { background: var(--wa-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.4); }

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: var(--navy); color: rgba(255,255,255,.6);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand p         { font-size: .875rem; line-height: 1.7; max-width: 280px; margin-top: 12px; }
.footer-col h4          { color: var(--white); font-weight: 700; margin-bottom: 16px; font-size: .9rem; }
.footer-col ul          { list-style: none; }
.footer-col ul li       { margin-bottom: 8px; }
.footer-col ul li a     { font-size: .875rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: .8rem;
}

/* ─── CART DRAWER ────────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--white); z-index: 201;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--gray-200);
}
.cart-header h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }

.close-btn {
  background: var(--gray-100); border: none; border-radius: 50%;
  width: 36px; height: 36px; display: grid; place-items: center;
  font-size: 1.1rem; transition: background .2s;
}
.close-btn:hover { background: var(--gray-200); }

.cart-body            { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cart-empty           { text-align: center; padding: 60px 20px; }
.cart-empty .empty-icon { font-size: 4rem; margin-bottom: 16px; }
.cart-empty p         { color: var(--gray-600); font-size: .9rem; }

.cart-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 0; border-bottom: 1px solid var(--gray-100);
}
.cart-item-img {
  width: 64px; height: 64px; border-radius: 10px;
  background: var(--blue-light);
  display: grid; place-items: center;
  font-size: 2rem; flex-shrink: 0; overflow: hidden;
}
.cart-item-img img  { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info     { flex: 1; min-width: 0; }
.cart-item-name     { font-weight: 700; font-size: .9rem; margin-bottom: 2px; }
.cart-item-price    { color: var(--blue); font-weight: 700; font-size: .875rem; }

.qty-ctrl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--gray-200); background: var(--white);
  font-weight: 700; font-size: .9rem; display: grid; place-items: center;
  transition: all .15s;
}
.qty-btn:hover  { border-color: var(--blue); color: var(--blue); }
.qty-val        { font-weight: 700; min-width: 24px; text-align: center; font-size: .9rem; }

.remove-btn {
  background: none; border: none; color: var(--gray-400);
  font-size: 1.1rem; padding: 4px; transition: color .2s;
}
.remove-btn:hover { color: #EF4444; }

.cart-footer    { padding: 20px 24px; border-top: 1px solid var(--gray-200); }
.cart-subtotal  {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.cart-subtotal span   { font-size: .9rem; color: var(--gray-600); }
.cart-subtotal strong { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--navy); }

.checkout-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--wa-green); color: var(--white);
  border: none; border-radius: 14px;
  padding: 16px; font-weight: 700; font-size: 1rem;
  transition: background .2s, transform .15s;
}
.checkout-btn:hover { background: var(--wa-dark); transform: translateY(-1px); }
.checkout-note      { text-align: center; font-size: .75rem; color: var(--gray-400); margin-top: 10px; }

/* ─── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);  /* ✅ geser sedikit ke bawah saat hidden */
  background: var(--navy); color: var(--white);
  padding: 12px 24px; border-radius: 99px;
  font-weight: 600; font-size: .875rem;
  z-index: 300;
  white-space: nowrap;
  pointer-events: none;

  /* ✅ Gabung opacity + visibility + transform — toast BENAR-BENAR hilang */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity    .3s ease,
    visibility .3s ease,
    transform  .3s cubic-bezier(.22,.61,.36,1);
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);     /* ✅ naik ke posisi normal */
}

/* Di desktop tidak ada bottom-nav, pastikan toast tetap muncul di bawah */
@media (min-width: 901px) {
  .toast { bottom: 24px; }
}

/* ─── MOBILE HAMBURGER NAV ───────────────────────────────────── */
.mobile-nav {
  display: none; position: fixed; inset: 0; top: 65px;
  background: var(--white); z-index: 99;
  flex-direction: column; padding: 20px;
  border-top: 1px solid var(--gray-200);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1.1rem; font-weight: 700; padding: 14px 0;
  border-bottom: 1px solid var(--gray-100); color: var(--navy);
}

/* ─── BOTTOM NAV BAR (mobile only) ──────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--gray-200);
  z-index: 150;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-inner {
  display: flex; align-items: stretch; height: 100%;
}
.bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  background: none; border: none; padding: 6px 4px;
  color: var(--gray-400); font-size: .68rem; font-weight: 600;
  font-family: var(--font-body);
  transition: color .2s; position: relative;
  text-decoration: none; cursor: pointer;
}
.bn-item:hover,
.bn-item.active          { color: var(--blue); }
.bn-item.active .bn-icon { background: var(--blue-light); }

.bn-icon {
  width: 36px; height: 28px; border-radius: 99px;
  display: grid; place-items: center;
  transition: background .2s;
}
.bn-icon svg { width: 22px; height: 22px; stroke-width: 2; }

.bn-cart-badge {
  position: absolute; top: 4px; left: 50%; margin-left: 4px;
  background: var(--green); color: var(--white);
  font-size: .6rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 99px; padding: 0 4px;
  display: grid; place-items: center;
  border: 2px solid var(--white);
}
.bn-cart-badge.hidden { display: none; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner            { grid-template-columns: 1fr; text-align: center; }
  .hero p                { max-width: 100%; }
  .hero-ctas             { justify-content: center; }
  .hero-visual           { display: none; }
  .footer-grid           { grid-template-columns: 1fr 1fr; }
  .footer-brand          { grid-column: 1 / -1; }
  .header-nav            { display: none; }
  .nav-toggle            { display: block; }
  .cart-btn              { display: none; }
  .bottom-nav            { display: block; }
  body                   { padding-bottom: var(--bottom-nav-h); }
}

@media (max-width: 600px) {
  .section               { padding: 56px 0; }
  .footer-grid           { grid-template-columns: 1fr; }
  .footer-bottom         { flex-direction: column; text-align: center; }
  .products-grid         { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .product-body          { padding: 14px; }
  .product-price         { font-size: 1rem; }
}
