/* ===================================================================
   Flowerista Thailand — Shared Stylesheet
   Every page links this one file. Change a color/spacing here and it
   updates everywhere at once.
=================================================================== */

:root{
  --brand: #550e17;
  --bg: #f3f1f0;
  --divider: #898989;
  --preorder: #c9702f;
  --gray-panel: #adacac;
  --footer-gray: #7e7e7e;
  --font-en: 'PT Serif', serif;
  --font-th: 'Anakotmai', 'Noto Sans Thai', sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background: var(--bg);
  font-family: var(--font-th);
  color:#2a2a2a;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; }

.container{ max-width:480px; margin:0 auto; position:relative; background:var(--bg); min-height:100vh; }
@media (min-width:481px){
  .container{ box-shadow:0 0 40px rgba(0,0,0,.06); }
}

/* ---------- Reusable: Page Header (non-hero pages) ---------- */
.pageheader{
  background: var(--gray-panel);
  color:#fff;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px;
}
.pageheader .logo-sm{
  display:flex;
  align-items:center;
  justify-content:center;
}
.pageheader .logo-sm .logo-icon{
  height:30px; width:auto;
  flex:none;
}
.icon-btn{ width:24px; height:24px; color:#fff; }
.icon-btn svg{ width:100%; height:100%; }
.cart-wrap{ position:relative; }
.cart-badge{
  position:absolute; top:-6px; right:-8px;
  background:#fff; color:var(--brand);
  font-size:.6rem; font-weight:700;
  width:16px; height:16px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.back-btn{
  width:36px; height:36px; border-radius:50%;
  border:1px solid var(--divider);
  display:flex; align-items:center; justify-content:center;
  color:#5a5a5a;
  flex:none;
}
.back-btn svg{ width:18px; height:18px; }

/* ---------- Reusable: Section Divider / Page Title ---------- */
.section-heading{
  display:flex;
  align-items:center;
  gap:10px;
  padding:30px 15px 20px;
  font-family: var(--font-en);
  font-size:1.5rem;
  color:#3a3a3a;
}
.section-heading::before,
.section-heading::after{
  content:"";
  flex:1;
  height:1px;
  background: var(--divider);
}
.section-heading.on-dark{ color:#fff; }
.section-heading.on-dark::before,
.section-heading.on-dark::after{ background: rgba(255,255,255,.6); }
.section-heading.tight{ padding-top:0; }

/* ---------- Reusable: Title Row (back button + section heading) ---------- */
.title-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 15px;
}
.title-row .back-btn{ flex:none; }
.title-row .section-heading{
  flex:1;
  padding:30px 0 20px;
}
.title-row .section-heading.tight{ padding-top:0; }

/* ---------- Reusable: Tabs (Chrome-style, overlapping) ---------- */
.tabs{ display:flex; padding:14px 15px 18px; position:relative; }
.tab{
  position:relative;
  flex:1;
  text-align:center;
  padding:13px 8px 13px;
  font-size:.85rem;
  font-weight:700;
  color:#8a8580;
  background:#e0dcd6;
  border-radius:12px 12px 0 0;
  z-index:1;
  transition:background .15s, color .15s;
}
.tab.active{
  background:var(--bg);
  color:var(--brand);
  z-index:3;
  box-shadow:0 -3px 6px rgba(0,0,0,.05);
}
/* concave connector curves — makes the active tab look like it "flows into"
   its neighbor, the classic Chrome-browser-tab overlap look */
.tab.active::before,
.tab.active::after{
  content:"";
  position:absolute;
  bottom:0;
  width:14px; height:14px;
  z-index:2;
}
.tab.active::before{
  left:-14px;
  background: radial-gradient(circle at top left, transparent 14px, var(--bg) 14.5px);
}
.tab.active::after{
  right:-14px;
  background: radial-gradient(circle at top right, transparent 14px, var(--bg) 14.5px);
}
.tab:first-child.active::before,
.tab:last-child.active::after{ display:none; }

/* ---------- Reusable: Badge ---------- */
.badge{
  position:absolute; top:6%; left:6%;
  font-size:.6rem;
  font-family: var(--font-th);
  font-weight:700;
  padding:.3em .7em;
  border-radius:999px;
  color:#fff;
  white-space:nowrap;
  z-index:2;
}
.badge.ready{ background:var(--brand); }
.badge.preorder{ background:var(--preorder); }

/* ---------- Reusable: Product Grid / Cards ---------- */
.product-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 10px;
  padding:0 15px 30px;
}
.product-thumb{
  width:100%; aspect-ratio:1/1;
  background:#e4e1dd;
  position:relative;
  border-radius:2px;
  overflow:hidden;
}
.product-thumb img{ width:100%; height:100%; object-fit:cover; }
.product-name{ font-size:.78rem; margin-top:8px; color:#3a3a3a; }
.product-price{ font-size:.9rem; font-weight:700; margin-top:2px; color:#2a2a2a; }
.btn-detail{
  display:block; width:100%; margin-top:8px; padding:9px 0;
  text-align:center; background:#c9c7c4; color:#4a4a4a;
  font-size:.72rem; border-radius:2px;
}

.card-scroll{
  display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory;
  padding:0 15px 10px; -webkit-overflow-scrolling:touch;
}
.card-scroll .product-card{ flex:none; width:150px; scroll-snap-align:start; }
.card-scroll .product-thumb{ width:150px; height:150px; }

/* ---------- Reusable: Buttons ---------- */
.btn-primary{
  display:block; width:100%;
  padding:14px 0; text-align:center;
  background: var(--gray-panel); color:#fff;
  font-size:.85rem; font-weight:700;
  border-radius:2px;
}
.btn-primary:active{ opacity:.85; }

/* ---------- Reusable: Footer ---------- */
footer{
  background: var(--footer-gray);
  color:#f0efee;
  text-align:center;
  padding:40px 20px;
  font-size:.75rem;
  line-height:2;
}
footer a{ text-decoration:underline; }
.footer-badge{
  margin-top:16px;
  display:flex;
  justify-content:center;
}
.footer-badge img{
  max-width:110px;
  height:auto;
  display:block;
}

/* ---------- Reusable: Floating Contact ---------- */
.floating-contact{
  position:fixed; bottom:20px; right:16px;
  display:flex; flex-direction:column; gap:10px; z-index:50;
}
.fab{
  width:56px; height:56px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
}
.fab svg{ width:24px; height:24px; }
.fab.whatsapp{ background:#25D366; color:#fff; }
.fab.line{ background:#06C755; color:#fff; }

/* ---------- Reusable: Mobile Menu ---------- */
.menu-panel{ position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:60; display:none; }
.menu-panel.open{ display:block; }
.menu-sheet{ position:absolute; top:0; left:0; width:78%; max-width:320px; height:100%; background:var(--bg); padding:24px 20px; }
.menu-sheet a{ display:block; font-family: var(--font-en); font-size:1.1rem; color:var(--brand); padding:14px 4px; border-bottom:1px solid rgba(85,14,23,.12); }
.menu-close{ font-size:1.4rem; color:var(--brand); margin-bottom:20px; }

/* ---------- Reusable: Quantity Stepper ---------- */
.qty-stepper{
  display:inline-flex; align-items:center; gap:10px;
  border:1px solid #c9c7c4; border-radius:3px; padding:4px 8px;
}
.qty-stepper button{ font-size:1.1rem; color:#5a5a5a; width:20px; }
.qty-stepper input{
  width:36px; text-align:center; border:none; font-size:.9rem;
  font-family:inherit; background:transparent;
}

/* ---------- Reusable: Checkbox row ---------- */
.check-row{ display:flex; align-items:flex-start; gap:10px; }
.check-row input[type="checkbox"]{
  width:18px; height:18px; margin-top:2px; accent-color: var(--brand); flex:none;
}

/* ---------- Reusable: Form fields (Address etc.) ---------- */
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:.8rem; color:#4a4a4a; margin-bottom:6px; }
.field input, .field textarea{
  width:100%; border:1px solid #c9c7c4; border-radius:3px;
  padding:10px 12px; font-size:.85rem; font-family:inherit; background:#fff;
}
.field textarea{ min-height:80px; resize:vertical; }
.field-link{ font-size:.75rem; color:var(--brand); text-decoration:underline; }

/* ---------- Placeholder image tag ---------- */
.placeholder-tag{
  position:absolute; bottom:6px; right:6px;
  background:rgba(0,0,0,.55); color:#fff;
  font-size:.55rem; padding:2px 6px; border-radius:3px;
}
