/* Passion Poplin — shared styles (no build step, plain CSS) */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #ccfbf1;
  --amber-bg: #fffbeb;
  --amber-line: #fde68a;
  --amber-text: #92400e;
  --green-bg: #ecfdf5;
  --green-line: #a7f3d0;
  --green-text: #065f46;
  --red-bg: #fef2f2;
  --red-line: #fecaca;
  --red-text: #b91c1c;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --max: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.main { flex: 1; }

/* ---------- Header ---------- */
.announce {
  background: var(--brand);
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 7px 12px;
}
.announce strong { font-weight: 700; }

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 18px;
}
.nav { display: none; gap: 24px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--brand); }
.header-right { display: flex; align-items: center; gap: 12px; }
.link-sm { font-size: 14px; font-weight: 500; color: var(--muted); }
.link-sm:hover { color: var(--brand); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: #0f172a; color: #fff; border-radius: 9px;
  padding: 9px 16px; font-size: 14px; font-weight: 600;
}
.cart-btn:hover { background: #1e293b; }
.cart-count {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
@media (min-width: 640px) { .nav { display: flex; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font: inherit; font-weight: 600;
  padding: 12px 24px; border-radius: 9px; transition: .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(to bottom, #fff, var(--bg)); border-bottom: 1px solid var(--line-soft); }
.hero-in { padding: 56px 16px; text-align: center; }
.pill {
  display: inline-block; background: var(--brand-soft); color: var(--brand-dark);
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin: 0 auto; max-width: 760px; line-height: 1.12; }
.lede { color: var(--muted); font-size: 17px; max-width: 620px; margin: 16px auto 0; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
@media (min-width: 640px) { .hero-in { padding: 80px 16px; } .h1 { font-size: 48px; } }

/* ---------- Trust bar ---------- */
.trust { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.trust-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 24px 16px; text-align: center; }
.trust-item span { display: block; }
.trust-ico { font-size: 22px; }
.trust-lbl { color: var(--muted); font-weight: 500; font-size: 14px; margin-top: 4px; }
@media (min-width: 640px) { .trust-in { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.h2 { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.count { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; font: inherit;
}
.chip:hover { border-color: var(--brand); }
.chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s; display: block;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { aspect-ratio: 1/1; background: var(--line-soft); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: .25s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 14px; }
.tags { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.tag { background: var(--line-soft); border-radius: 5px; padding: 2px 8px; }
.card-title { font-weight: 600; font-size: 15px; margin: 0; line-height: 1.35; min-height: 41px; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 12px; gap: 8px; }
.price-ws { font-size: 18px; font-weight: 700; color: var(--brand); }
.price-unit { font-size: 11px; font-weight: 500; color: var(--muted); }
.price-rt { font-size: 12px; color: var(--muted); }
.view { font-size: 14px; font-weight: 600; white-space: nowrap; }
.card:hover .view { color: var(--brand); }

/* ---------- Notices ---------- */
.notice { border-radius: 9px; padding: 12px 14px; font-size: 14px; border: 1px solid; }
.notice-amber { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-text); }
.notice-green { background: var(--green-bg); border-color: var(--green-line); color: var(--green-text); }
.notice-red { background: var(--red-bg); border-color: var(--red-line); color: var(--red-text); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Panels / forms ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 4px; }
.input {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px;
  font: inherit; background: #fff; color: var(--text);
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.field + .field { margin-top: 14px; }
.row { display: grid; gap: 14px; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Layout split ---------- */
.split { display: grid; gap: 24px; }
@media (min-width: 1000px) { .split { grid-template-columns: 2fr 1fr; align-items: start; } .split-even { grid-template-columns: 1fr 1fr; } }
.sticky { position: sticky; top: 88px; }

/* ---------- Tables ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: 9px; overflow-x: auto; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px; text-align: left; }
thead tr { background: #f8fafc; }
th { font-weight: 600; }
tbody tr { border-top: 1px solid var(--line-soft); }

/* qty grid */
.qty-grid th, .qty-grid td { text-align: center; }
.qty-grid th:first-child, .qty-grid td:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; background: #fff; }
.qty-grid thead th:first-child { background: #f8fafc; }
.qty-input {
  width: 58px; padding: 6px; text-align: center; border: 1px solid #cbd5e1;
  border-radius: 6px; font: inherit;
}
.qty-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* price table */
.ptable { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; font-size: 14px; margin-bottom: 16px; }
.ptable-row { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.ptable-row > div { padding: 10px; }
.ptable-head { background: #f8fafc; font-weight: 600; }
.ptable-row + .ptable-row { border-top: 1px solid var(--line); }
.ptable-row > div + div { border-left: 1px solid var(--line); text-align: center; }
.ws { color: var(--brand); font-weight: 700; }

/* ---------- Summary rows ---------- */
.sum { display: flex; justify-content: space-between; font-size: 14px; }
.sum + .sum { margin-top: 6px; }
.sum-total {
  display: flex; justify-content: space-between; font-size: 17px; font-weight: 700;
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px;
}

/* ---------- Cart lines ---------- */
.line { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.line + .line { margin-top: 12px; }
.line-img { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 9px; overflow: hidden; background: var(--line-soft); }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-body { flex: 1; min-width: 0; }
.line-name { font-weight: 600; font-size: 15px; }
.line-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.line-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.stepper { display: flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.stepper button { background: none; border: 0; padding: 4px 10px; font-size: 17px; cursor: pointer; line-height: 1.2; }
.stepper button:hover { background: var(--line-soft); }
.stepper input { width: 46px; text-align: center; border: 0; padding: 5px 0; font: inherit; }
.stepper input:focus { outline: none; }
.x-btn { background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 15px; padding: 0; }
.x-btn:hover { color: #dc2626; }
.strike { text-decoration: line-through; color: var(--muted-2); font-size: 12px; margin-left: 4px; }

/* ---------- Product page ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding: 20px 0; }
.crumbs a:hover { color: var(--brand); }
.gallery { aspect-ratio: 1/1; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.h1-prod { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
@media (min-width: 640px) { .h1-prod { font-size: 32px; } }

/* ---------- FAQ ---------- */
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 16px; }
.faq + .faq { margin-top: 12px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 20px; transition: .15s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 24px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { text-align: center; }
.step-n { width: 40px; height: 40px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; margin: 0 auto 12px; }
.step-t { font-weight: 600; }
.step-d { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 64px; }
.footer-in { display: grid; gap: 28px; padding: 40px 16px; font-size: 14px; }
@media (min-width: 640px) { .footer-in { grid-template-columns: repeat(3, 1fr); } }
.footer h4 { font-weight: 600; margin: 0 0 8px; font-size: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.footer li + li { margin-top: 4px; }
.footer a:hover { color: var(--brand); }
.footer-bar { border-top: 1px solid var(--line-soft); padding: 16px; text-align: center; font-size: 12px; color: var(--muted-2); }

/* ---------- Invoice ---------- */
.inv { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.inv-title { font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; border: 1px solid; }
.badge-paid { background: var(--green-bg); border-color: var(--green-line); color: var(--green-text); }
.badge-pending { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-text); }
.inv-grid { display: grid; gap: 16px; padding: 20px 0; font-size: 14px; }
@media (min-width: 640px) { .inv-grid { grid-template-columns: 1fr 1fr; } }
.inv-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media print {
  .no-print, .header, .footer, .announce { display: none !important; }
  body { background: #fff; }
  .inv { border: 0; padding: 0; }
}

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.spinner { text-align: center; color: var(--muted); padding: 40px 0; }
.stack > * + * { margin-top: 12px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.empty { text-align: center; padding: 72px 16px; }
.empty-ico { font-size: 44px; margin-bottom: 12px; }
