/* ============================================================
   เกี๊ยวบางทราย GYO BANGSAI — Menu App Styles
   Mobile-first · รองรับมือถือ แท็บเล็ต และคอมพิวเตอร์
   ============================================================ */

:root {
  --bg: #fff9f2;
  --surface: #ffffff;
  --surface-2: #fff4e6;
  --surface-3: #fdf0df;
  --ink: #241a12;
  --ink-soft: #4a3a2c;
  --muted: #7d6c5b;
  --line: #f0e2d2;
  --line-strong: #e6d3bf;

  --brand: #14532d;
  --brand-600: #166534;
  --brand-700: #0d3d21;
  --brand-100: #dcfce7;
  --brand-50: #f0fdf4;

  --accent: #f59e0b;
  --accent-strong: #b45309;
  --accent-soft: #fef3c7;

  --danger: #dc2626;
  --line-green: #06c755;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(36, 26, 18, 0.04), 0 10px 24px -16px rgba(36, 26, 18, 0.24);
  --shadow-md: 0 18px 40px -22px rgba(36, 26, 18, 0.32);
  --shadow-lg: 0 32px 80px -32px rgba(36, 26, 18, 0.45);

  --header-h: 68px;
  --font-head: "Prompt", "Noto Sans Thai", "Leelawadee UI", "Tahoma", system-ui, sans-serif;
  --font-body: "Sarabun", "Noto Sans Thai", "Leelawadee UI", "Tahoma", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  width: 100%;
  height: 100%;
  display: block;
}

:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.65);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 249, 242, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(240, 226, 210, 0.8);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 6px 16px -8px rgba(20, 83, 45, 0.6);
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  flex: none;
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.icon-btn:active {
  transform: scale(0.94);
}

.btn-install {
  height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  background: var(--brand-50);
  border: 1px solid #bbf7d0;
  color: var(--brand);
  font-weight: 600;
  font-size: 13.5px;
  transition: background 0.2s;
}

.btn-install:hover {
  background: var(--brand-100);
}

.cart-btn {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(20, 83, 45, 0.75);
  transition: transform 0.15s, background 0.2s;
  flex: none;
}

.cart-btn svg {
  width: 22px;
  height: 22px;
}

.cart-btn:hover {
  background: var(--brand-600);
}

.cart-btn:active {
  transform: scale(0.94);
}

.cart-btn.bump {
  animation: bump 0.35s ease;
}

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #3b2400;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11.5px;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
  line-height: 1;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block: clamp(30px, 5vw, 62px) clamp(34px, 5vw, 56px);
  background:
    radial-gradient(60% 70% at 82% 18%, rgba(245, 158, 11, 0.18), transparent 62%),
    radial-gradient(50% 60% at 8% 84%, rgba(20, 83, 45, 0.1), transparent 60%),
    linear-gradient(180deg, #fff9f2 0%, #fff6ea 100%);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -70% 40%;
  height: 340px;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.1), transparent);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 620px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  background: var(--brand-50);
  border: 1px solid #bbf7d0;
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
  flex: none;
}

.status-pill.closed {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.status-pill.closed .dot {
  background: #f43f5e;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.14);
}

.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 16px;
}

.hero h1 .hl {
  position: relative;
  display: inline-block;
  color: var(--brand);
  z-index: 0;
}

.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.32em;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.5), rgba(245, 158, 11, 0.18));
  border-radius: 4px;
  z-index: -1;
}

.hero-desc {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  max-width: 480px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.search-box:focus-within {
  border-color: #a7d7b9;
  box-shadow: 0 0 0 4px rgba(20, 83, 45, 0.09), var(--shadow-sm);
}

.search-box > svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: none;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  padding: 12px 0;
  outline: none;
}

.search-box input::placeholder {
  color: #a79584;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}

.search-clear svg {
  width: 16px;
  height: 16px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 22px;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px 6px 9px;
}

.hero-facts svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
  flex: none;
}

/* Hero art collage */
.hero-art {
  position: relative;
  height: 430px;
  display: none;
}

.art-blob {
  position: absolute;
  inset: 8% 2% 4% 10%;
  background:
    radial-gradient(circle at 35% 30%, #ffe6bd, #ffd193 55%, #ffc272 100%);
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  filter: blur(0.5px);
  opacity: 0.85;
}

.art-card {
  position: absolute;
  overflow: hidden;
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow-md);
  border: 5px solid rgba(255, 255, 255, 0.9);
}

.art-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-1 {
  width: 268px;
  height: 268px;
  left: 4%;
  top: 20%;
  transform: rotate(-5deg);
}

.art-2 {
  width: 172px;
  height: 172px;
  right: 2%;
  bottom: 8%;
  transform: rotate(6deg);
}

.art-3 {
  width: 146px;
  height: 146px;
  right: 12%;
  top: 4%;
  transform: rotate(9deg);
  border-radius: 22px;
}

.art-pill {
  position: absolute;
  left: 2%;
  bottom: 6%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.art-pill svg {
  width: 16px;
  height: 16px;
  color: var(--accent-strong);
}

/* ============================================================
   Menu section
   ============================================================ */
.menu-section {
  padding-block: clamp(28px, 4vw, 44px) clamp(32px, 4vw, 48px);
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.menu-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 6px;
}

.menu-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
}

.result-count {
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 4px;
}

.category-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  margin: 0 -4px 20px;
  padding: 10px 4px;
  background: linear-gradient(180deg, rgba(255, 249, 242, 0.96) 65%, rgba(255, 249, 242, 0));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  padding: 9px 17px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.chip:hover {
  border-color: #cfe8d8;
  background: #fffdf9;
}

.chip:active {
  transform: scale(0.97);
}

.chip[aria-selected="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 18px -10px rgba(20, 83, 45, 0.7);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  animation: cardIn 0.4s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.045);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px -6px rgba(36, 26, 18, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.in-cart {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 6px 14px -6px rgba(20, 83, 45, 0.8);
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 14px 14px;
  flex: 1;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.product-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.price {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}

.add-btn {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--accent);
  color: #3b2400;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px -10px rgba(217, 119, 6, 0.9);
  transition: transform 0.15s, background 0.2s;
  flex: none;
}

.add-btn svg {
  width: 20px;
  height: 20px;
}

.add-btn:hover {
  background: #fbbf24;
}

.add-btn:active {
  transform: scale(0.9);
}

.product-card.sold-out .product-media {
  filter: grayscale(0.7);
  opacity: 0.6;
}

.product-card.sold-out .add-btn {
  background: #e7ddd2;
  color: #9c8b7a;
  box-shadow: none;
  cursor: not-allowed;
}

.sold-out-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(36, 26, 18, 0.28);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 18px;
}

/* ============================================================
   Steps
   ============================================================ */
.steps-section {
  padding-block: clamp(38px, 5vw, 60px);
  background:
    radial-gradient(70% 100% at 100% 0%, rgba(245, 158, 11, 0.1), transparent 60%),
    #fff4e6;
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 26px;
}

.section-head.center {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 8px;
}

.section-head p {
  color: var(--muted);
  font-size: 15px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 17.5px;
  margin-bottom: 5px;
}

.step p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-section {
  padding-block: clamp(44px, 6vw, 72px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-card strong {
  display: block;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-text {
  display: block;
  min-width: 0;
}

.contact-card .contact-value {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.contact-card .contact-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
}

.contact-card .contact-go svg {
  width: 13px;
  height: 13px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background:
    radial-gradient(60% 90% at 90% 0%, rgba(245, 158, 11, 0.14), transparent 60%),
    #0b2e1b;
  color: #e9f3ec;
  padding-top: 44px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 34px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex: none;
}

.footer-brand strong {
  font-family: var(--font-head);
  font-size: 19px;
  display: block;
  margin-bottom: 4px;
}

.footer-brand p {
  font-size: 13.5px;
  color: #a9c6b4;
  max-width: 32ch;
}

.footer-col h3 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.footer-col p {
  font-size: 13.5px;
  color: #a9c6b4;
  line-height: 1.65;
  margin-bottom: 6px;
}

.footer-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #f6c46a;
  margin-top: 2px;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(233, 243, 236, 0.12);
  padding-block: 18px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #86a893;
}

.footer-admin {
  color: #a9c9b5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-admin:hover {
  color: #d7ecdf;
}

/* ============================================================
   Mobile cart bar
   ============================================================ */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 249, 242, 0), rgba(255, 249, 242, 0.94) 34%);
  pointer-events: none;
}

.cart-bar-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 34px -16px rgba(13, 61, 33, 0.8);
  transition: transform 0.15s, background 0.2s;
}

.cart-bar-inner:active {
  transform: scale(0.985);
}

.cart-bar-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  flex: none;
}

.cart-bar-icon svg {
  width: 20px;
  height: 20px;
}

.cart-bar-icon span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #3b2400;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--brand);
}

.cart-bar-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}

.cart-bar-text strong {
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 600;
}

.cart-bar-text small {
  font-size: 11.5px;
  color: #b7d8c3;
}

.cart-bar-total {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  flex: none;
}

body.cart-open .cart-bar {
  display: none;
}

/* ============================================================
   Overlay + Drawer
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(25, 17, 10, 0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(105%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  visibility: hidden;
}

.cart-drawer.open {
  transform: none;
  visibility: visible;
}

.drawer-handle {
  display: none;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.drawer-head h2 {
  font-size: 20px;
  font-weight: 700;
}

.drawer-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 8px;
  -webkit-overflow-scrolling: touch;
}

.drawer-foot {
  flex: none;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.drawer-foot:empty {
  display: none;
}

/* Cart empty */
.cart-empty {
  text-align: center;
  padding: 42px 10px 30px;
}

.cart-empty .emoji {
  font-size: 42px;
  margin-bottom: 12px;
}

.cart-empty h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.cart-empty p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Cart lines */
.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.cart-line {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 28px;
  gap: 11px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  animation: cardIn 0.25s ease both;
}

.cart-line:last-child {
  border-bottom: 0;
}

.cl-thumb {
  width: 62px;
  height: 62px;
  border-radius: 13px;
  object-fit: cover;
  background: var(--surface-2);
}

.cl-name {
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 2px;
}

.cl-opts {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 7px;
}

.cl-bulk {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.4;
  margin-bottom: 7px;
}

.cl-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cl-price {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}

.cl-remove {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #b9a897;
  transition: background 0.2s, color 0.2s;
}

.cl-remove:hover {
  background: #fef2f2;
  color: var(--danger);
}

.cl-remove svg {
  width: 16px;
  height: 16px;
}

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
}

.stepper button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(36, 26, 18, 0.08);
  transition: background 0.15s, transform 0.1s;
}

.stepper button:hover {
  background: var(--brand-50);
}

.stepper button:active {
  transform: scale(0.9);
}

.stepper button svg {
  width: 14px;
  height: 14px;
}

.stepper .qty {
  min-width: 30px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
}

.stepper.lg button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.stepper.lg .qty {
  min-width: 40px;
  font-size: 16px;
}

/* Order form */
.order-form {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 6px;
}

.form-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.form-title span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 12px;
}

.field {
  margin-bottom: 13px;
}

.field label,
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field .req {
  color: var(--danger);
  margin-left: 2px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 16px;
  background: #fffdfa;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 74px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-color: #6fbf8c;
  box-shadow: 0 0 0 4px rgba(20, 83, 45, 0.09);
  background: #fff;
}

.field input.invalid,
.field textarea.invalid {
  border-color: #fca5a5;
  background: #fff7f7;
}

.field-error {
  font-size: 12px;
  color: var(--danger);
  min-height: 0;
  margin-top: 4px;
}

.field-error:empty {
  display: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Segmented control */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface-2);
  padding: 5px;
  border-radius: 13px;
}

.seg {
  position: relative;
  display: block;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.seg input:checked + span {
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 2px 8px -3px rgba(36, 26, 18, 0.25);
}

.seg input:focus-visible + span {
  outline: 3px solid rgba(245, 158, 11, 0.65);
  outline-offset: 1px;
}

/* Summary */
.cart-summary {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 14px 15px;
  margin-top: 6px;
  font-size: 13.5px;
}

.sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  color: var(--muted);
}

.sum-row.total {
  border-top: 1px dashed var(--line-strong);
  margin-top: 7px;
  padding-top: 9px;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
}

.sum-row.total .val {
  color: var(--brand);
  font-size: 19px;
}

.sum-note {
  font-size: 11.5px;
  color: #9a7a4a;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 8px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 600;
  box-shadow: 0 12px 24px -14px rgba(20, 83, 45, 0.9);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--brand-600);
}

.btn-primary:active {
  transform: scale(0.985);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-text {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 2px;
}

.btn-text:hover {
  color: var(--brand);
}

.btn-block {
  width: 100%;
}

/* Confirm view */
.confirm {
  text-align: center;
  padding-bottom: 6px;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  margin: 6px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  color: var(--brand);
  border: 2px solid #bbf7d0;
}

.confirm-icon svg {
  width: 30px;
  height: 30px;
}

.confirm h3 {
  font-size: 21px;
  margin-bottom: 5px;
}

.confirm > p {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.order-preview {
  text-align: left;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  margin: 0 0 16px;
  max-height: 210px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.channel {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.channel:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.channel:active {
  transform: scale(0.985);
}

.channel .ch-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

.channel .ch-icon svg {
  width: 19px;
  height: 19px;
}

.channel .ch-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.channel .ch-text small {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}

.channel .ch-arrow {
  width: 16px;
  height: 16px;
  color: #b9a897;
  flex: none;
}

.channel-line { background: #f0fff7; border-color: #b9f5d4; }
.channel-line .ch-icon { background: var(--line-green); }
.channel-phone .ch-icon { background: var(--brand); }
.channel-whatsapp .ch-icon { background: #25d366; }
.channel-facebook .ch-icon { background: #1877f2; }
.channel-copy .ch-icon { background: #8b7355; }

.confirm .btn-ghost {
  margin-top: 2px;
}

.confirm-note {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 10px;
}

/* ============================================================
   Product modal
   ============================================================ */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-wrap.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 17, 10, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: min(88vh, 780px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-overflow-scrolling: touch;
}

.modal-wrap.show .modal-card {
  transform: none;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  border-color: transparent;
  box-shadow: 0 4px 14px -6px rgba(36, 26, 18, 0.5);
}

.pm-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}

.pm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-body {
  padding: 18px 22px 22px;
}

.pm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.pm-head h2 {
  font-size: 22px;
  font-weight: 700;
}

.pm-head .price {
  font-size: 22px;
  white-space: nowrap;
}

.pm-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.pm-bulk {
  display: inline-block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--accent-strong);
  background: var(--accent-soft, #fdf1e3);
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 10px;
  padding: 6px 10px;
  margin: -6px 0 16px;
}

.pm-bulk.is-active {
  color: var(--brand);
  background: var(--brand-soft, #e9f5ec);
  border-color: rgba(20, 83, 45, 0.25);
  font-weight: 600;
}

.option-group {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
}

.option-group legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
  padding: 0;
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-radio {
  position: relative;
  display: block;
}

.chip-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-radio span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fffdfa;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.chip-radio input:checked + span {
  background: var(--brand-50);
  border-color: #6fbf8c;
  color: var(--brand);
  font-weight: 600;
}

.chip-radio input:focus-visible + span {
  outline: 3px solid rgba(245, 158, 11, 0.65);
  outline-offset: 1px;
}

.pm-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.pm-foot .btn-primary {
  width: auto;
  flex: 1;
  padding-inline: 16px;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 100;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(28, 20, 14, 0.94);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   Responsive
   ============================================================ */
body.has-cart {
  padding-bottom: 74px;
}

@media (min-width: 900px) {
  .hero-art {
    display: block;
  }
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 62px;
  }

  .brand-sub {
    display: none;
  }

  .btn-install {
    display: none !important;
  }

  .header-actions .icon-btn {
    width: 40px;
    height: 40px;
  }

  .cart-btn {
    width: 42px;
    height: 42px;
  }

  /* Drawer becomes bottom sheet */
  .cart-drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    transform: translateY(105%);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .cart-drawer.open {
    transform: none;
  }

  .drawer-handle {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: var(--line-strong);
    margin: 9px auto 0;
    flex: none;
  }

  .drawer-head {
    padding: 12px 18px 12px;
  }

  .drawer-body {
    padding: 14px 18px 6px;
  }

  .drawer-foot {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .modal-wrap {
    padding: 0;
    align-items: end;
  }

  .modal-card {
    width: 100%;
    max-height: 94dvh;
    border-radius: 24px 24px 0 0;
    transform: translateY(40px);
  }

  .pm-media {
    aspect-ratio: 16 / 9;
  }

  .pm-body {
    padding: 16px 18px calc(20px + env(safe-area-inset-bottom));
  }

  .pm-head h2 {
    font-size: 20px;
  }

  .pm-head .price {
    font-size: 20px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(34px, 9.5vw, 44px);
  }

  .hero-facts li:nth-child(4) {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card {
    border-radius: 16px;
  }

  .product-body {
    padding: 10px 11px 11px;
    gap: 3px;
  }

  .product-name {
    font-size: 14.5px;
  }

  .product-desc {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .price {
    font-size: 17px;
  }

  .add-btn {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .add-btn svg {
    width: 18px;
    height: 18px;
  }

  .badge {
    font-size: 10.5px;
    padding: 3px 8px;
    top: 8px;
    left: 8px;
  }

  .in-cart {
    font-size: 10px;
    padding: 3px 8px;
    right: 8px;
    bottom: 8px;
  }

  .menu-head {
    align-items: center;
  }

  .result-count {
    font-size: 12.5px;
  }

  .steps-section {
    padding-block: 34px;
  }

  .step {
    padding: 20px;
  }

  .contact-section {
    padding-block: 40px;
  }
}

@media (max-width: 380px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-desc {
    -webkit-line-clamp: 3;
  }

  .brand-name {
    font-size: 16px;
  }

  .hero-facts {
    gap: 6px;
  }

  .hero-facts li {
    font-size: 12px;
  }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print */
@media print {
  .site-header,
  .hero-art,
  .cart-bar,
  .overlay,
  .cart-drawer,
  .modal-wrap,
  .toast,
  .steps-section {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

