:root {
  --bg: #f3f6fb;
  --ink: #0f172a;
  --muted: #64748b;
  --primary: #0369a1;
  --accent: #f97316;
  --line: #d9e2ef;
  --glass: rgba(255, 255, 255, 0.82);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Manrope, sans-serif; color: var(--ink); background: var(--bg); }
body { position: relative; }
.ambient-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(70rem 70rem at -10% -20%, rgba(14,165,233,.2), transparent),
    radial-gradient(60rem 60rem at 120% -10%, rgba(249,115,22,.18), transparent),
    linear-gradient(180deg, #f8fbff 0%, #eff4fb 60%, #eef3f9 100%);
}
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.5);
}
.topbar {
  position: sticky; top: 0; z-index: 90;
  display: grid; grid-template-columns: 280px 1fr 260px;
  gap: 14px; align-items: center;
  margin: 12px; padding: 10px 14px; border-radius: 20px;
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
}
.brand-wrap { display: flex; gap: 10px; align-items: center; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font: 800 24px/1 "Plus Jakarta Sans", sans-serif;
  color: #fff; background: linear-gradient(135deg,#0891b2,#1d4ed8,#f97316);
}
.brand-title { margin: 0; font: 800 18px/1.1 "Plus Jakarta Sans", sans-serif; }
.brand-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.search-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.search-wrap input {
  width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 12px 14px;
  font-size: 15px; outline: none; background: #fff;
}
.top-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn {
  border: 0; border-radius: 12px; padding: 10px 14px; font: 700 14px/1 Manrope, sans-serif;
  cursor: pointer; transition: .2s transform, .2s filter; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.02); }
.btn-primary { color: #fff; background: linear-gradient(135deg,#0ea5e9,#1d4ed8); }
.btn-accent { color: #fff; background: linear-gradient(135deg,#f97316,#ea580c); }
.btn-ghost { color: #0f172a; background: #fff; border: 1px solid var(--line); }
.btn-block { width: 100%; }
.pill {
  margin-left: 8px; min-width: 24px; height: 24px; border-radius: 999px;
  display: inline-grid; place-items: center; background: rgba(255,255,255,.2); font-size: 12px;
}
.layout {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  padding: 0 12px 18px;
}
.hero-zone {
  padding: 2px 12px 10px;
  display: grid;
  gap: 10px;
}
.hero-main {
  border-radius: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}
.hero-copy h2 {
  margin: 8px 0 8px;
  font: 800 34px/1.07 "Plus Jakarta Sans", sans-serif;
}
.hero-copy p {
  margin: 0;
  color: #334155;
  font-size: 15px;
  max-width: 50ch;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde68a, #fdba74);
  color: #7c2d12;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .2px;
}
.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.hero-cards {
  display: grid;
  gap: 10px;
}
.promo-tile {
  border-radius: 16px;
  color: #fff;
  padding: 12px;
  display: grid;
  gap: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.promo-tile strong { font-size: 16px; font-weight: 800; }
.promo-tile span { font-size: 13px; opacity: .95; }
.promo-tile.t1 { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.promo-tile.t2 { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.promo-tile.t3 { background: linear-gradient(135deg, #f97316, #ea580c); }
.quick-rail {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
}
.quick-chip {
  border: 1px solid #dbe8f5;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.quick-chip-img {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}
.quick-chip-dot {
  width: 58px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.quick-chip.active {
  border-color: #0284c7;
  color: #0369a1;
  background: #e0f2fe;
}
.catalog { border-radius: var(--radius); }
.section-head {
  padding: 2px 6px 10px;
  display: grid; grid-template-columns: 1fr 210px; gap: 12px; align-items: end;
}
.section-head h2 { margin: 0; font: 800 30px/1.1 "Plus Jakarta Sans", sans-serif; }
.section-head p { margin: 6px 0 0; color: #475569; }
.section-head select {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 10px; background: #fff;
}
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.product-card {
  border-radius: 18px; background: #fff; border: 1px solid #e8edf5;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
  display: flex; flex-direction: column; overflow: hidden;
}
.product-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg,#f8fafc,#f1f5f9);
  display: grid; place-items: center;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-no-image {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    -45deg,
    #edf2f7,
    #edf2f7 10px,
    #e2e8f0 10px,
    #e2e8f0 20px
  );
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.product-body { padding: 12px; display: grid; gap: 6px; }
.product-name { margin: 0; font-size: 16px; font-weight: 800; min-height: 44px; }
.product-cat { color: #6366f1; font-size: 12px; font-weight: 700; }
.stock-alert {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: #fee2e2;
  color: #991b1b;
  width: fit-content;
}
.product-meta { display: flex; justify-content: space-between; color: #475569; font-size: 12px; }
.product-price { font: 800 20px/1 "Plus Jakarta Sans", sans-serif; color: #0f172a; }
.product-actions { padding: 0 12px 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.qty-input {
  width: 68px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-weight: 700;
}
.pagination-wrap { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0 8px; }
.drawer {
  position: fixed; top: 0; right: -430px; width: min(420px, 96vw); height: 100dvh;
  background: #fff; box-shadow: -20px 0 45px rgba(15,23,42,.2); z-index: 110;
  display: grid; grid-template-rows: auto 1fr auto; transition: right .25s ease;
}
.drawer.open { right: 0; }
.drawer-header, .drawer-footer { padding: 14px; border-bottom: 1px solid #e2e8f0; }
.drawer-header {
  background: linear-gradient(135deg,#0ea5e9,#1d4ed8);
  color: #fff;
}
.drawer-footer { border-top: 1px solid #e2e8f0; border-bottom: 0; }
.drawer-body { overflow: auto; padding: 10px 14px; display: grid; gap: 10px; }
.cart-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #f8fafc;
}
.cart-item-top { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: start; }
.cart-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dbe5f2;
  background: #fff;
}
.cart-thumb img { width:100%; height:100%; object-fit:cover; }
.cart-thumb-no {
  width:100%; height:100%;
  display:grid; place-items:center;
  background:#e2e8f0; color:#64748b; font-size:9px; font-weight:800; text-transform:uppercase;
}
.cart-row { display: flex; justify-content: space-between; gap: 8px; }
.icon-btn {
  border: 0; background: #eef2f7; width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  font-size: 20px; line-height: 1;
}
.drawer-header .icon-btn {
  background: rgba(255,255,255,.2);
  color: #fff;
}
.total-line { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 16px; }
.modal { border: 0; padding: 0; border-radius: 18px; width: min(680px, 95vw); box-shadow: 0 22px 60px rgba(15,23,42,.22); }
.modal::backdrop { background: rgba(15,23,42,.5); backdrop-filter: blur(3px); }
.modal-card { padding: 0; margin: 0; }
.modal-card > header {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0; background: #f8fafc;
}
.modal-card section, .modal-card .checkout-grid { padding: 14px; }
.modal-card label { display: grid; gap: 6px; color: #334155; font-size: 13px; margin-bottom: 10px; }
.modal-card input, .modal-card textarea, .modal-card select {
  border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px 12px; font-size: 14px;
}
.tab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 14px 0; }
.tab { border: 1px solid #cbd5e1; background: #fff; border-radius: 10px; padding: 9px; font-weight: 700; cursor: pointer; }
.tab.active { border-color: #0284c7; background: #e0f2fe; color: #0369a1; }
.hidden { display: none !important; }
.form-message { padding: 0 14px 14px; margin: 0; color: #b91c1c; font-weight: 600; min-height: 24px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkout-grid .full { grid-column: 1 / -1; }
.payment-info-box {
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
}
.payment-method-info h4 {
  margin: 0 0 8px;
  font-size: 14px;
}
.payment-method-info img {
  width: 100%;
  max-width: 240px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
}
.payment-method-info p { margin: 8px 0 0; font-size: 13px; color: #334155; }
.transfer-line {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  margin-bottom: 6px;
}
.transfer-line span { font-size: 13px; color: #475569; }
.site-footer {
  margin: 18px 12px 14px;
  border-radius: 20px;
  background: #0f172a;
  color: #cbd5e1;
  padding: 18px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
}
.site-footer h4 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 15px;
}
.site-footer p,
.site-footer li {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
}
.site-footer ul { padding-left: 18px; margin: 0; }
.footer-bottom {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148,163,184,.22);
  font-size: 12px;
  color: #94a3b8;
}
.footer-socials {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(148,163,184,.16);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}
.footer-map-wrap {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.24);
}
.footer-map-wrap iframe {
  width: 100%;
  height: 240px;
  border: 0;
}
.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(14px);
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 250;
}
.cart-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cart-bump {
  animation: cartBump .35s ease;
}
@keyframes cartBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr; }
  .hero-main { grid-template-columns: 1fr; }
  .hero-copy h2 { font-size: 28px; }
  .layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .topbar { margin: 8px; padding: 10px; border-radius: 16px; }
  .hero-zone { padding: 2px 8px 8px; }
  .hero-main { padding: 14px; border-radius: 16px; }
  .hero-copy h2 { font-size: 24px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .brand-sub { display: none; }
  .search-wrap { grid-template-columns: 1fr; }
  .top-actions { justify-content: stretch; }
  .top-actions .btn { flex: 1; }
  .section-head { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 24px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .product-name { font-size: 14px; min-height: 38px; }
  .product-price { font-size: 16px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { margin: 14px 8px 12px; border-radius: 16px; }
}
