/* Pharmacy template. Ported from pharma/site. Light theme only; white text on --brand must stay at 4.5:1 or more. */
:root {
  color-scheme: light;
  --bg: #f5f8fc;
  --card: #ffffff;
  --text: #16183a;
  --muted: #5a5f80;
  --line: #d5e3f3;
  --brand: #1557a8;
  --brand-dark: #0e3f7d;
  --brand-soft: #eaf2fb;
  --accent: #f1d417;
  --ok: #15803d;
  --no: #b91c1c;
  --line-green: #06c755;
  --notice: #fff6c7;
  --notice-text: #5c4a00;
  --on-brand-hi: #f1d417;   /* ตัวเลขเน้นบนพื้น brand */
}

/* โทนสีที่เลือกจากหลังร้าน · ไม่มี data-theme หรือ blue = ค่าใน :root ด้านบน (สีโลโก้)
   ตัวอักษรขาวบน brand ต้องต่างกันอย่างน้อย 4.5:1 อย่าทำสีให้สว่างขึ้น · รายชื่อโทนอยู่ที่ THEMES ใน lib/bootstrap.php */
[data-theme="olive"] {
  --bg: #f7f8f1;
  --line: #e0e6cc;
  --brand: #55652a;
  --brand-dark: #3d4a1c;
  --brand-soft: #f1f4e6;
  --on-brand-hi: #ffffff;
}
[data-theme="orange"] {
  --bg: #fdf8f3;
  --line: #f6dcc6;
  --brand: #c2500a;
  --brand-dark: #933c06;
  --brand-soft: #fdf0e6;
  --on-brand-hi: #ffffff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Anuphan", "Noto Sans Thai", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--brand); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* หัวเว็บ */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand h1 { margin: 0; font-size: 18px; line-height: 1.2; }
.hours { margin: 0; font-size: 13px; color: var(--muted); }
.badge { display: inline-block; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; margin-left: 4px; }
.badge.on { background: var(--ok); color: #fff; }
.badge.off { background: var(--line); color: var(--muted); }
.contact-mini { display: flex; gap: 6px; flex: none; }

.btn { display: inline-block; text-decoration: none; text-align: center; border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 15px; border: 1px solid transparent; }
.btn.line { background: var(--line-green); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.full { display: block; width: 100%; margin-top: 8px; }

.notice { background: var(--notice); color: var(--notice-text); font-size: 15px; }
.notice .wrap { padding-top: 10px; padding-bottom: 10px; }

/* การ์ดสินค้า */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.card.out { opacity: .6; }
.pic { aspect-ratio: 1 / 1; background: #fff; }
.pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 44px; background: var(--brand-soft); }
.body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.body h3 { font-size: 14px; font-weight: 500; margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.en { margin: 2px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.price { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.price b { font-size: 18px; color: var(--brand); }
.stock { margin: 2px 0 0; font-size: 13px; margin-bottom: auto; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot.ok { background: var(--ok); }
.dot.no { background: var(--no); }
.empty { text-align: center; color: var(--muted); padding: 24px 0 16px; }
.empty .btn { margin-top: 12px; }

/* ท้ายเว็บ */
.foot { background: var(--card); border-top: 1px solid var(--line); padding: 20px 0 32px; }
.foot h2 { font-size: 17px; margin: 0 0 6px; }
.foot p { margin: 0 0 8px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.small { font-size: 13px; color: var(--muted); }

/* หลังร้าน */
.admin .tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.admin .tabs a { padding: 8px 14px; border-radius: 10px; text-decoration: none; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.admin .tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.form label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
.form input[type=text], .form input[type=tel], .form input[type=password], .form input[type=time], .form input[type=datetime-local], .form select, .form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
}
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
button.btn { cursor: pointer; font: inherit; font-weight: 600; background: var(--brand); color: #fff; }
.msg { padding: 10px 14px; border-radius: 10px; margin: 12px 0; background: var(--brand-soft); }
.msg.err { background: #fde8e8; color: #8a1c1c; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.num { text-align: right; white-space: nowrap; }
.table img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; }
.tablewrap { overflow-x: auto; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* หัวเว็บโทนร้าน */
.top { border-bottom: 3px solid var(--brand); }
.intro strong { color: var(--brand); }
.badge.on { background: var(--accent); color: var(--brand-dark); }

/* ปุ่มหลัก + ตัวปรับจำนวน */
.btn.primary { background: var(--brand); color: #fff; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.btn.primary:active { background: var(--brand-dark); }
.btn.primary:disabled { opacity: .6; }
button.btn.ghost { cursor: pointer; font: inherit; font-weight: 600; background: #fff; }
.btn.danger { color: #d9485f; border-color: #ffd0d8; background: #ffe4e8; }
.btn svg { vertical-align: -3px; }
.buy { margin-top: 8px; }
.add { padding: 9px 10px; }
.step { display: flex; align-items: stretch; border: 1.5px solid var(--brand); border-radius: 10px; overflow: hidden; background: #fff; }
.step button { flex: none; width: 40px; border: 0; background: var(--brand-soft); color: var(--brand); font-size: 20px; font-weight: 700; cursor: pointer; }
.step button:active { background: var(--line); }
.step input { flex: 1; min-width: 0; width: 100%; border: 0; text-align: center; font: inherit; font-weight: 700; font-size: 16px; color: var(--text); padding: 7px 0; -moz-appearance: textfield; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step.sm { width: 112px; }
.step.sm button { width: 34px; font-size: 18px; }

/* แถบตะกร้าติดล่างจอ */
body { padding-bottom: 76px; }
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; max-width: 640px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-size: 15px; text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}
.cartbar b { color: var(--on-brand-hi); }
.cb-go { font-weight: 700; white-space: nowrap; }

/* หน้าตะกร้า (เต็มจอบนมือถือ · กล่องกลางจอบนคอม) */
body.lock { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(10, 12, 50, .45); display: flex; justify-content: center; align-items: flex-end; overflow-y: auto; }
.sheet-in { background: var(--card); width: 100%; max-width: 560px; min-height: 60vh; max-height: 100%; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 0 16px 24px; }
@media (min-width: 640px) { .sheet { align-items: center; padding: 24px; } .sheet-in { border-radius: 18px; min-height: 0; } }
.sheet-head { position: sticky; top: 0; background: var(--card); display: flex; justify-content: space-between; align-items: center; padding: 14px 0 10px; border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-head h2 { margin: 0; font-size: 18px; color: var(--brand); }
.x { border: 0; background: var(--brand-soft); color: var(--brand); width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-list li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name name" "step sum"; gap: 6px 10px; align-items: center; padding: 12px 42px 12px 0; border-bottom: 1px solid var(--line); position: relative; }
.cl-name { grid-area: name; font-weight: 600; font-size: 15px; line-height: 1.35; }
.cl-name small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.cart-list .step { grid-area: step; }
.cl-sum { grid-area: sum; font-weight: 700; text-align: right; }
.cl-del { position: absolute; right: 0; top: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #ffe4e8; color: #d9485f; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cl-del:active { background: #ffd0d8; }
.cart-sum { display: flex; align-items: baseline; gap: 6px; margin: 14px 0; font-size: 15px; }
.cart-sum .sp { flex: 1; }
.big { font-size: 22px; color: var(--brand); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row-btn { display: flex; gap: 8px; margin-top: 10px; }
.row-btn .btn { flex: 1; }
.center { text-align: center; }
.done-box { text-align: center; background: var(--brand-soft); border-radius: 14px; padding: 18px 12px; margin: 16px 0; }
.done-box p { margin: 4px 0; }
.done-ok { font-size: 18px; font-weight: 700; color: var(--ok); }
#done .btn.full { margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 40; background: var(--brand-dark); color: #fff; padding: 8px 16px; border-radius: 99px; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }

/* หลังร้าน */
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }

/* หน้าปิดเว็บ / นอกเวลา */
.closed-body { padding-bottom: 0; background: linear-gradient(180deg, #ffffff 0%, var(--brand-soft) 100%); min-height: 100vh; }
.closed { max-width: 480px; margin: 0 auto; padding: 40px 20px 48px; text-align: center; }
.closed-icon { font-size: 64px; line-height: 1; margin: 28px 0 8px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .closed-icon { animation: none; } }
.closed h1 { color: var(--brand); font-size: 24px; margin: 0 0 10px; }
.closed-text { font-size: 17px; line-height: 1.7; margin: 0 0 24px; }
.closed-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.closed-btns .btn { padding: 12px 16px; font-size: 16px; }

.req { color: #d9485f; }
.linklike { font-weight: 700; color: #06a74a; }
#copied { margin-top: 14px; }

/* ---------- หน้าร้าน: หัวเว็บสีร้าน + ค้นหาบนหัว · หมวดหมู่ ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body.shop { background: #fff; }
.shop .wrap { max-width: 1200px; }
.top.shop-top { background: var(--brand); border-bottom: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.shop-top .wrap { gap: 20px; min-height: 76px; }
.shop-top .btn.ghost { color: #fff; border-color: #fff; }

.top-search { position: relative; display: flex; flex: 1; min-width: 0; padding: 4px; border-radius: 12px; background: #fff; }
.top-search input { flex: 1; min-width: 0; height: 42px; padding: 0 36px 0 12px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; }
.top-search input::-webkit-search-cancel-button { display: none; }
.top-search input:focus { outline: 2px solid var(--brand); outline-offset: 0; }
.q-clear { position: absolute; right: 88px; top: 50%; width: 32px; height: 32px; transform: translateY(-50%); border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.q-clear:hover { background: var(--brand-soft); }
.q-go { flex: none; width: 80px; border: 0; border-radius: 9px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.q-go:hover { background: var(--brand-dark); }

.how-bar { background: var(--brand-soft); color: var(--brand-dark); font-size: 14px; }
.how-bar .wrap { padding-top: 7px; padding-bottom: 7px; display: flex; flex-wrap: wrap; gap: 2px 14px; justify-content: space-between; }
.how-bar p { margin: 0; }

.shop-main { display: grid; gap: 16px; padding-top: 16px; padding-bottom: 24px; }
.shop-main .panel { min-width: 0; margin: 0; padding: 20px; }
.shop-main h2 { margin: 0; font-size: 22px; line-height: 1.3; }

/* หมวดหมู่ */
.cats { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; height: 100%; padding: 12px 4px; border: 1px solid transparent; border-radius: 12px; background: none; color: inherit; font: inherit; font-size: 14px; line-height: 1.3; cursor: pointer; }
.nb { display: inline-block; }   /* ขึ้นบรรทัดใหม่ตรงช่องว่าง ไม่ตัดกลางคำไทย */
.cat:hover { background: var(--brand-soft); }
.cat[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.cat-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); font-size: 26px; }
.cat[aria-pressed="true"] .cat-icon { background: #fff; }

/* Flash Sale */
.flash-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.shop-main .flash-head h2 { color: var(--brand); }
.timer { display: flex; align-items: center; gap: 4px; }
.timer span { margin-right: 4px; color: var(--muted); font-size: 14px; }
.timer b { display: grid; place-items: center; min-width: 32px; height: 30px; padding: 0 4px; border-radius: 6px; background: var(--brand-dark); color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.timer i { font-style: normal; font-weight: 700; }
.flash-nav { display: flex; gap: 8px; margin-left: auto; }
.round { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--brand-dark); font-size: 22px; line-height: 1; cursor: pointer; }
.round:hover { background: var(--brand); color: #fff; }
.flash-track { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 12px; margin: 14px 0 0; padding: 0 0 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.flash-track > li { scroll-snap-align: start; }
.deal { height: 100%; }
.off { position: absolute; z-index: 1; top: 8px; right: 8px; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: var(--brand-dark); font-size: 13px; font-weight: 700; }
.card.out .off { background: var(--line); color: var(--muted); }

/* รายการสินค้า */
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.list-tools { display: flex; align-items: baseline; gap: 14px; color: var(--muted); font-size: 14px; }
.list-tools p { margin: 0; }
.only-stock { display: inline-flex; gap: 6px; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.foot { margin-top: 8px; }

@media (max-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  html { scroll-padding-top: 130px; }
  .shop-top .wrap { flex-wrap: wrap; gap: 6px 8px; min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .top-search { order: 3; flex-basis: 100%; }
}
@media (max-width: 640px) {
  .shop-main .panel { padding: 16px 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .cat { font-size: 13px; padding: 8px 2px; }
  .cat-icon { width: 44px; height: 44px; font-size: 22px; }
  .flash-track { grid-auto-columns: 150px; }
  .flash-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* หลังร้าน: เลือกสีร้าน */
.theme-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 14px 0; }
.theme-choice { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600; }
.theme-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.theme-swatch { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; }

/* buyjaiweb */
.shop-name { color: #fff; font-size: 20px; font-weight: 700; text-decoration: none; flex: 0 1 auto; overflow-wrap: anywhere; }
.plain-main { max-width: 520px; margin: 0 auto; padding: 32px 16px; }
body.plain, body.admin { padding-bottom: 0; }
.login-box h1 { margin: 0; font-size: 24px; color: var(--brand); }
.msg-line { margin: 2px 0; }
.admin .top .wrap { flex-wrap: wrap; }
.admin main { padding-bottom: 32px; }
.admin h2 { margin-top: 0; font-size: 20px; }
.form input[type=email], .form input[type=url], .form input[type=file] {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
}
.product-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; align-items: end; }
.product-form .btn { margin-bottom: 12px; min-height: 44px; }
.admin-products { list-style: none; margin: 0; padding: 0; }
.admin-product { padding: 14px 0; border-top: 1px solid var(--line); }
.theme-field { border: 0; margin: 0 0 12px; padding: 0; font-weight: 600; font-size: 14px; }
.theme-choice--blue .theme-swatch { background: #1557a8; }
.theme-choice--olive .theme-swatch { background: #55652a; }
.theme-choice--orange .theme-swatch { background: #c2500a; }
.plans { border: 0; margin: 0 0 14px; padding: 0; }
.plans legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.form .plan-choice { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.form .plan-choice input { width: auto; margin: 0; }
.plan-choice span { flex: 1; }
.closed-owner { margin-top: 32px; font-size: 14px; }
.tab-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--no); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.6; vertical-align: middle; }
td .tab-badge { margin: 0 4px 0 0; }
.data tr.row-new td { background: var(--brand-soft); }
.pay-box h2 { font-size: 18px; margin: 20px 0 8px; text-align: left; }
.welcome-links { text-align: left; margin: 16px 0 8px; }
.welcome-links div { padding: 10px 0; border-top: 1px solid var(--line); }
.welcome-links dt { font-size: 14px; color: var(--muted); }
.welcome-links dd { margin: 2px 0 0; overflow-wrap: anywhere; font-weight: 600; }
.welcome-steps { text-align: left; padding-left: 22px; margin: 0 0 20px; line-height: 1.7; }
.signup-kinds { display: grid; gap: 10px; margin-top: 12px; }
.signup-kind { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.signup-kind:hover, .signup-kind:focus-visible { border-color: var(--brand); }
.signup-kind .signup-icon { grid-row: span 2; font-size: 28px; }
.plan-list { padding-left: 20px; margin-bottom: 20px; }
.pay-box { text-align: center; }
.pay-box .form { text-align: left; margin-top: 16px; }
.pay-amount { font-size: 34px; font-weight: 700; color: var(--brand); margin: 8px 0 4px; }
.pay-amount small { font-size: 16px; font-weight: 400; }
.pay-qr { display: inline-block; padding: 12px; margin: 12px 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pay-qr img, .pay-qr canvas { display: block; max-width: 100%; height: auto; }
.form .theme-choice { display: flex; margin-bottom: 0; }
.form select { min-width: 0; }
.admin-product { padding: 0; }
.admin-product summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 12px 4px; cursor: pointer; }
.admin-product summary:hover { background: var(--brand-soft); }
.ap-name { font-weight: 600; overflow-wrap: anywhere; }
.ap-meta { color: var(--muted); font-size: 14px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; margin-bottom: 14px; }
.ap-actions .btn { margin: 0; }
@media (max-width: 760px) { .product-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .product-form, .form .row2 { grid-template-columns: 1fr; } }

.is-hidden { display: none; }
.form .remember, .form .check-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 400; cursor: pointer; }
.form .remember input, .form .check-row input { width: auto; margin: 0; }
.product-form .image-field { grid-column: 1 / -1; }
.ap-thumb { display: inline-block; width: 40px; height: 40px; margin-right: 10px; vertical-align: middle; object-fit: cover; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 18px; }
.admin-content { min-width: 0; }
.admin-content > .panel:first-child, .admin-content > .msg:first-child { margin-top: 0; }
.admin-content .admin-search input { flex-basis: 100%; }
.qr-maker { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.qr-preview img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 3px 12px rgba(20, 40, 80, .08); }
.qr-options .ap-actions { margin-bottom: 8px; }
@media (max-width: 760px) { .qr-maker { grid-template-columns: minmax(0, 1fr); } .qr-preview { max-width: 340px; margin: 0 auto; } }
.qr-sheet { display: none; }
.owner-bar { margin: 0; padding: 10px 16px; text-align: center; font-weight: 600; color: #fff; background: #8a2a0a; }
.owner-bar a { color: #fff; }
.closed-note { overflow-wrap: anywhere; }
@media print {
  @page { size: A4; margin: 10mm; }
  html.qr-printing .top, html.qr-printing .side-nav, html.qr-printing .admin-content > :not(.qr-sheet) { display: none !important; }
  html.qr-printing body { background: #fff; }
  html.qr-printing .admin-layout { display: block; max-width: none; margin: 0; padding: 0; }
  html.qr-printing .qr-sheet { display: grid; gap: 4mm; height: 270mm; justify-items: center; align-items: center; }
  .qr-sheet img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
  .qr-sheet.qr-n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .qr-sheet.qr-n6 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
  .qr-sheet.qr-n12 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); }
  .qr-sheet.qr-n24 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(6, 1fr); }
}
.side-nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 3px 12px rgba(20, 40, 80, .05); }
.side-nav a { display: flex; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 600; text-decoration: none; }
.side-nav a:hover { background: var(--brand-soft); }
.side-nav a:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.side-nav a.on { background: var(--brand); color: #fff; }
.side-group { margin: 10px 12px 2px; color: var(--muted); font-size: 13px; font-weight: 600; }
.side-group:first-child { margin-top: 2px; }
.side-store { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px !important; padding-top: 14px !important; }
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
  .side-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 16px; }
  .side-nav a { padding: 7px 10px; font-size: 14px; }
  .side-group { display: none; }
  .side-store { margin-top: 0; border-top: 0; border-radius: 12px !important; padding-top: 7px !important; }
}
/* หลังร้าน on phones: a bar of four pages at the bottom, and its menu button slides the whole menu in from the left.
   The menu opens through #admin-menu (:target), so it needs no JS. Hidden on bigger screens. */
.tab-bar, .side-head, .menu-shade { display: none; }
@media (max-width: 760px) {
  .admin .top .wrap { flex-wrap: nowrap; }
  .admin .admin-brand { min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .admin .admin-brand .brand-bubble { display: none; }
  .admin .top form { flex: none; }
  .admin .top .btn.ghost { padding: 6px 10px; }
  .admin .top .btn.ghost .ui-icon { margin-right: 0; }
  .admin .out-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .admin .admin-layout { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .admin .side-nav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(86vw, 330px); flex-direction: column; flex-wrap: nowrap; gap: 4px;
    margin: 0; padding: 0 12px 24px; border: 0; border-radius: 0 18px 18px 0; overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; transform: translateX(-104%); transition: transform .25s ease, visibility 0s linear .25s; box-shadow: 8px 0 30px -10px rgba(0, 0, 0, .45); }
  .admin .side-nav:target { visibility: visible; transform: none; transition: transform .25s ease; }
  .admin .side-nav a { padding: 10px 12px; font-size: 16px; }
  .admin .side-group { display: block; }
  .admin .side-store { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px !important; padding-top: 14px !important; }
  .side-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; margin: 0 -12px 4px;
    padding: 12px 12px 12px 22px; background: var(--card, #fff); border-bottom: 1px solid var(--line); font-size: 20px; font-weight: 700; }
  .admin .side-nav a.side-close { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border-radius: 50%;
    background: var(--brand-soft); color: var(--text); }
  .menu-shade { position: fixed; inset: 0; z-index: 55; background: rgba(15, 20, 30, .45); }
  .side-nav:target ~ .menu-shade { display: block; }
  .tab-bar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--card, #fff); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px -12px rgba(0, 0, 0, .4); }
  .tab-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 4px 2px; color: var(--muted);
    font-size: 12px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center; }
  .tab-ic { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 30px; border-radius: 999px; }
  .tab-ic .ui-svg { width: 24px; height: 24px; }
  .tab-word { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab-bar a.on { color: var(--brand); }
  .tab-bar a.on .tab-ic { background: var(--brand); color: #fff; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .admin .side-nav, .admin .side-nav:target { transition: none; } }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 30; padding: 10px 14px; background: #fff; color: var(--brand); border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 8px; }
.top-cart { position: relative; }
.shop-top button.btn.top-cart { background: transparent; }
.top-cart-n { position: absolute; top: -7px; right: -7px; min-width: 20px; padding: 0 5px; border-radius: 999px; background: #fff; color: var(--brand); box-shadow: 0 0 0 2px var(--brand); font-size: 12px; line-height: 20px; text-align: center; }
.top-cart-n[hidden] { display: none; }
.cats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); overflow-x: auto; scroll-snap-type: x proximity; }
.cats li { scroll-snap-align: start; }
.list-head { padding-bottom: 10px; border-bottom: 2px solid var(--brand); }
.card.out { opacity: 1; }
.pic { position: relative; overflow: hidden; }
.card.out .pic img, .card.out .noimg { opacity: .45; }
.out-tag { position: absolute; top: 8px; right: 8px; padding: 2px 10px; border-radius: 999px; background: rgba(20, 30, 50, .8); color: #fff; font-size: 13px; font-weight: 600; }
.body h3 { display: -webkit-box; min-height: 2.7em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.price { margin-bottom: auto; padding-bottom: 2px; }
.more-row { margin: 18px 0 4px; text-align: center; }
.more-row:has(#more[hidden]) { display: none; }
@media (max-width: 760px) { .cats { grid-template-columns: none; grid-auto-columns: 84px; } }
.no-price .price-only { display: none; }
.no-cart #top-cart, .no-cart #cartbar, .no-cart #cart { display: none !important; }
.price-ask { color: var(--muted); font-size: 14px; }
.shop-top button.btn.top-pickup { background: #fff; border-color: #fff; color: var(--brand-dark); white-space: nowrap; }
.pickup-in { min-height: 0; }
.pickup-in > .small { margin: 12px 0 8px; }
.pickup-text { margin: 0 0 12px; padding: 12px; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--brand-soft); border-radius: 12px; }
.pickup-in .done-ok { margin: 10px 0 0; }
.pickup-in .linklike { display: inline-block; margin-top: 10px; }
.shop-map { display: block; width: 100%; height: 320px; margin: 10px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); }
.off { left: 8px; right: auto; }
.was { margin-right: 2px; color: var(--text); font-size: 15px; font-weight: 700; text-decoration: line-through; text-decoration-color: #e02424; text-decoration-thickness: 2px; }
.shop-banner { position: relative; margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-track img { flex: 0 0 100%; width: 100%; aspect-ratio: 3 / 1; object-fit: contain; display: block; scroll-snap-align: start; }
.banner-prev, .banner-next { position: absolute; top: 50%; transform: translateY(-50%); }
.banner-prev { left: 10px; }
.banner-next { right: 10px; }
@media (max-width: 760px) { .banner-track img { aspect-ratio: 2 / 1; } .banner-prev, .banner-next { display: none; } }
.banner-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.banner-admin img { width: 100%; aspect-ratio: 3 / 1; object-fit: contain; display: block; background: var(--brand-soft); border: 1px solid var(--line); border-radius: 12px; }
.banner-admin .is-off img { opacity: .45; }
.banner-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.banner-actions .btn { margin: 0; }
.banner-actions .ap-delete > summary { display: inline-flex; padding: 8px 16px; list-style: none; cursor: pointer; }
.banner-actions .ap-delete > summary::-webkit-details-marker { display: none; }
/* Round show/hide buttons, the same as หลังร้านครู (owner chose 2026-11-23): the icon shows how it is now, an open eye in
   green while it is on the หน้าร้าน and a shut eye in grey while hidden, and a bubble says what a press does. */
.ib { width: 44px; height: 44px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; padding: 0; margin: 0; cursor: pointer;
  font: inherit; transition: transform .15s, box-shadow .15s; flex: none; }
.ib:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.ib:active { transform: scale(.94); }
.ib .ui-svg { width: 20px; height: 20px; }
.ib.is-shown { background: #dcf3e4; color: #13693a; }
.ib.is-hidden { background: #eef0f3; color: #6b7280; }
.ib[data-tip] { position: relative; }
.ib[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translate(-50%, 4px);
  background: #1f2a2c; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; padding: 5px 10px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 30; }
.ib[data-tip]::before { content: ''; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #1f2a2c; border-bottom: 0; opacity: 0; transition: opacity .15s; z-index: 30; }
.ib[data-tip]:hover::after, .ib[data-tip]:focus-visible::after, .ib[data-tip]:active::after { opacity: 1; transform: translate(-50%, 0); }
.ib[data-tip]:hover::before, .ib[data-tip]:focus-visible::before, .ib[data-tip]:active::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ib { transition: none; } }
.flash-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 12px; }
.flash-add select { width: 100%; }
.flash-add label { margin-bottom: 0; }
.flash-add .btn { margin: 0; }
@media (max-width: 760px) { .flash-add { grid-template-columns: minmax(0, 1fr); } }
.flash-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.flash-item form .btn { margin: 0; }
.panel input[type=datetime-local] { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.status-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.status-tabs a { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.status-tabs a:hover { background: var(--brand-soft); }
.status-tabs a.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.status-tabs .count { margin-left: 5px; font-weight: 400; }
.admin-search select { padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); max-width: 100%; }
.admin-product.is-off .ap-thumb, .admin-product.is-off .ap-icon { opacity: .45; }
.ap-badge { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.admin-product .ap-delete > summary { display: inline-flex; padding: 8px 16px; list-style: none; }
.admin-product .ap-delete > summary:hover { background: transparent; }
.admin-product .ap-delete > summary::-webkit-details-marker { display: none; }
.ap-delete { display: contents; }
.ap-delete-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pager .btn { margin: 0; text-decoration: none; }
.pager .is-disabled { opacity: .4; cursor: default; }
.pager-text { font-weight: 600; }

/* Shop back office */
.panel.narrow { max-width: 560px; }
.form input[type=password], .form input[type=date] {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
}
.admin-search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-search input { flex: 1 1 200px; min-width: 0; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.fold > summary { cursor: pointer; }
.fold > summary h2 { display: inline; margin: 0; }
.fold[open] > summary { margin-bottom: 12px; }

/* Owner back office */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.stat strong { display: block; font-size: 28px; color: var(--brand); }
.stat span { color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: 15px; }
.data th, .data td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.data thead th { border-top: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.data .num { text-align: right; }
.state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #e8edf3; color: #39465a; }
.state-open { background: #dff3e6; color: #17603a; }
.state-expiring, .state-grace, .state-pending { background: #fdf0cf; color: #6d4c00; }
.state-expired, .state-suspended { background: #fde4e4; color: #96201f; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.confirm > summary { display: inline-block; cursor: pointer; list-style: none; }
.confirm form { margin-top: 10px; }
.reset-box { border-color: var(--brand); }
.reset-password code { display: inline-block; padding: 8px 12px; font-size: 18px; background: var(--brand-soft); border-radius: 8px; overflow-wrap: anywhere; }
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
a.stat { display: block; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(20, 40, 80, .12); }
a.stat:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.admin-search input[type=search] { -webkit-appearance: none; appearance: none; }
.admin-search .btn { margin: 0; text-decoration: none; }
.data td a { overflow-wrap: anywhere; }
.staff-note { margin: 14px 0 0; padding: 12px 14px; background: var(--brand-soft); border-radius: 12px; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { a.stat { transition: none; } a.stat:hover { transform: none; } }

/* Friendly back office look, shared by shop owners and the site owner. Colors follow the shop's theme. */
.ui-icon { display: inline-block; margin-right: 8px; font-style: normal; font-weight: 400; line-height: 1; }
.ui-svg { display: block; width: 1.15em; height: 1.15em; flex: none; }
.ui-icon .ui-svg { display: inline-block; vertical-align: -.2em; }
.admin h2 .ui-icon { color: var(--brand); }
.admin h2 .ui-icon .ui-svg, .brand-bubble .ui-svg { width: 22px; height: 22px; vertical-align: 0; }
.brand-bubble { color: var(--brand); }
/* The colour dots of หลังร้าน of the teacher project: each line icon has a soft dot of its own colour behind its corner,
   and on hover the icon tilts like a sticker and the dot grows. Headings keep their round badge without a dot. */
.ui-ic-image, .ui-ic-chart, .ui-ic-pill { --chip: #ff6bb5; }
.ui-ic-share, .ui-ic-plus, .ui-ic-eye { --chip: #12b5a6; }
.ui-ic-bag, .ui-ic-store, .ui-ic-search, .ui-ic-copy { --chip: #3aa0ff; }
.ui-ic-lock, .ui-ic-eye-off, .ui-ic-empty, .ui-ic-x-circle { --chip: #ff5f7e; }
.ui-ic-external, .ui-ic-cap, .ui-ic-play, .ui-ic-qr { --chip: #9b6bff; }
.ui-ic-clock, .ui-ic-sparkle, .ui-ic-tag, .ui-ic-zap, .ui-ic-hourglass { --chip: #ffad1f; }
.ui-ic-table, .ui-ic-card, .ui-ic-cash, .ui-ic-check, .ui-ic-coins { --chip: #2fbf71; }
.ui-ic-box, .ui-ic-folder, .ui-ic-pin, .ui-ic-scooter, .ui-ic-download, .ui-ic-print, .ui-ic-gift { --chip: #ff8a3d; }
.ui-ic-thermometer, .ui-ic-bandage { --chip: #ff5f7e; }
.ui-ic-jar { --chip: #ffad1f; }
.ui-ic-cup, .ui-ic-patch { --chip: #ff8a3d; }
.ui-ic-droplet { --chip: #3aa0ff; }
.ui-ic-leaf, .ui-ic-bottle { --chip: #12b5a6; }
.ui-ic-flower { --chip: #ff6bb5; }
.ui-ic-key, .ui-ic-tool, .ui-ic-logout, .ui-ic-pencil, .ui-ic-link, .ui-ic-idcard, .ui-ic-calendar, .ui-ic-pause, .ui-ic-menu { --chip: #6c7a99; }
.admin .ui-icon, .tab-ic { position: relative; }
.admin .ui-icon .ui-svg, .tab-ic .ui-svg { position: relative; z-index: 1; transition: transform .14s; }
.admin .ui-icon[class*="ui-ic-"]::before { content: ""; position: absolute; right: -.3em; bottom: -.25em; width: .7em; height: .7em; border-radius: 50%;
  background: var(--chip, transparent); opacity: .55; pointer-events: none; transition: transform .18s, opacity .18s; }
.tab-ic[class*="ui-ic-"]::before { content: ""; position: absolute; left: 50%; top: 50%; margin: 1px 0 0 2px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--chip, transparent); opacity: .55; pointer-events: none; transition: transform .18s, opacity .18s; }
.admin h2 .ui-icon::before { display: none; }
.admin .side-nav .ui-icon, .admin .tabs .ui-icon, .admin .status-tabs .ui-icon { color: var(--text); }
.admin .side-nav a.on .ui-icon, .admin .tabs a.on .ui-icon { color: inherit; }
.admin :is(a, button, summary):hover > .ui-icon .ui-svg, .tab-bar a:hover .tab-ic .ui-svg { transform: rotate(-8deg) scale(1.12); }
.admin :is(a, button, summary):hover > .ui-icon::before, .tab-bar a:hover .tab-ic::before { transform: scale(1.35); opacity: .45; }
@media (prefers-reduced-motion: reduce) {
  .admin .ui-icon .ui-svg, .admin .ui-icon::before, .tab-ic .ui-svg, .tab-ic::before { transition: none; }
  .admin :is(a, button, summary):hover > .ui-icon .ui-svg, .tab-bar a:hover .tab-ic .ui-svg { transform: none; }
}
.empty-icon .ui-svg { width: 44px; height: 44px; margin: 0 auto; color: var(--muted); stroke-width: 1.6; }
.stat-icon .ui-svg { width: 26px; height: 26px; color: var(--brand); }
.admin-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; overflow-wrap: anywhere; }
.brand-bubble { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 21px; font-weight: 400; background: var(--brand-soft); border-radius: 50%; }
.admin .tabs { gap: 8px; }
.admin .tabs a { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px; font-weight: 600; box-shadow: 0 2px 6px rgba(20, 40, 80, .06); transition: transform .15s ease, box-shadow .15s ease; }
.admin .tabs a:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(20, 40, 80, .12); }
.admin .tabs a:focus-visible, .admin .btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.admin .panel { border-radius: 20px; box-shadow: 0 3px 12px rgba(20, 40, 80, .05); }
.admin .btn { border-radius: 999px; }
.admin h2 { display: flex; align-items: center; flex-wrap: wrap; }
.admin h2 .ui-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-right: 10px; font-size: 20px; background: var(--brand-soft); border-radius: 50%; }
.admin .fold > summary { list-style: none; }
.admin .fold > summary::-webkit-details-marker { display: none; }
.admin .fold > summary h2 { display: flex; }
.admin .fold > summary h2::after { content: "▾"; margin-left: auto; color: var(--brand); transition: transform .15s ease; }
.admin .fold[open] > summary h2::after { transform: rotate(180deg); }
.ap-icon { display: inline-block; margin-right: 10px; font-size: 19px; font-weight: 400; }
.admin .ap-icon { margin-right: 14px; color: var(--text); font-size: 18px; }
.noimg .ui-svg { width: 36%; height: 36%; color: var(--brand); stroke-width: 1.5; }
.cat-icon .ui-svg { width: 26px; height: 26px; color: var(--brand); }
@media (max-width: 760px) { .cat-icon .ui-svg { width: 22px; height: 22px; } }
/* หน้าร้าน: the same colour dots as หลังร้าน on the category circles and on the picture of a product without a photo,
   and the icon tilts on hover. */
.cat-icon, .noimg { position: relative; }
.cat-icon .ui-svg, .noimg .ui-svg { position: relative; z-index: 1; transition: transform .16s; }
.cat-icon[class*="ui-ic-"]::before, .noimg[class*="ui-ic-"]::before { content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%;
  background: var(--chip, transparent); opacity: .55; pointer-events: none; transition: transform .2s, opacity .2s; }
.cat-icon[class*="ui-ic-"]::before { width: 13px; height: 13px; margin: 2px 0 0 3px; }
.noimg[class*="ui-ic-"]::before { width: 15%; aspect-ratio: 1; margin: 2% 0 0 3%; }
.cat:hover .cat-icon .ui-svg, .card:hover .noimg .ui-svg { transform: rotate(-8deg) scale(1.12); }
.cat:hover .cat-icon::before, .card:hover .noimg::before { transform: scale(1.35); opacity: .45; }
@media (prefers-reduced-motion: reduce) {
  .cat-icon .ui-svg, .noimg .ui-svg, .cat-icon::before, .noimg::before { transition: none; }
  .cat:hover .cat-icon .ui-svg, .card:hover .noimg .ui-svg { transform: none; }
}
.admin-product summary { border-radius: 12px; }
.empty-icon { display: block; margin-bottom: 6px; font-size: 38px; }
.login-box { text-align: center; border-radius: 24px; }
.login-box .form { text-align: left; }
.login-mascot { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 10px; font-size: 38px; background: var(--brand-soft); border-radius: 50%; }
.stat { position: relative; border-radius: 18px; box-shadow: 0 3px 12px rgba(20, 40, 80, .05); }
.stat-icon { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 19px; background: var(--brand-soft); border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .admin .tabs a, .admin .fold > summary h2::after { transition: none; } .admin .tabs a:hover { transform: none; } }

/* Sales page */
.sales { background: #fff; }
/* Thai has no spaces between words, so a heading can leave one word alone on its last line. Even out the lines. */
.sales h1, .sales h2, .sales h3, .sales-type p, .sales-tier li, .show-card span { text-wrap: balance; }
.sales p, .sales li { text-wrap: pretty; }
.sales-top { border-bottom: 1px solid var(--line); }
.sales-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.sales-top strong { font-size: 20px; color: var(--brand); }
.sales-brand { font-size: 20px; font-weight: 700; color: var(--brand); text-decoration: none; }
.sales-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; }
.sales-nav a { color: inherit; text-decoration: none; font-size: 15px; }
.sales-nav a:hover, .sales-nav a:focus-visible { color: var(--brand); text-decoration: underline; }
.sales-compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.sales-compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.sales-compare th, .sales-compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.sales-compare tbody tr:last-child th, .sales-compare tbody tr:last-child td { border-bottom: 0; }
.sales-compare thead th { background: var(--brand-soft); font-size: 15px; }
.sales-compare thead a { color: var(--brand-dark); text-decoration: none; }
.sales-compare tbody th { min-width: 170px; text-align: left; font-weight: 400; }
.sales-compare thead th, .sales-compare td { white-space: nowrap; }
.sales-compare b { color: var(--brand); }
.sales-compare .yes { color: #1e7a4f; font-weight: 700; }
.sales-compare .no { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) { .sales-nav a { font-size: 14px; } .sales-top .wrap { flex-wrap: wrap; } }
.sales-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.sales-type { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 16px; color: inherit; text-decoration: none; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.sales-type:hover, a.sales-type:focus-visible { border-color: var(--brand); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.sales-type h3 { margin: 10px 0 6px; font-size: 20px; }
.sales-type p { margin: 0 0 10px; color: var(--muted); }
.sales-type .sales-from { margin-top: auto; color: inherit; }
.sales-from b { font-size: 26px; color: var(--brand); }
.sales-more { font-weight: 600; color: var(--brand); }
.sales-type.soon { background: #f6f7f9; border-style: dashed; }
.sales-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 12px; }
.sales-tier { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 16px; }
.sales-tier-pro { border: 2px solid var(--brand); }
.sales-tier h3 { margin: 0 0 12px; font-size: 22px; color: var(--brand-dark); }
.sales-includes { margin: 0 0 16px; padding-left: 20px; }
.sales-includes li { margin-bottom: 6px; }
.sales-prices { margin: auto 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sales-prices li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sales-prices b { font-size: 22px; color: var(--brand); }
.sales-prices small { flex-basis: 100%; text-align: right; color: var(--muted); }
.sales-hero { position: relative; overflow: hidden; padding: 56px 0; background: var(--brand-soft); }
/* Two soft colour clouds drift behind the hero text. */
.sales-hero::before, .sales-hero::after { content: ""; position: absolute; z-index: 0; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; animation: sales-drift 14s ease-in-out infinite alternate; }
.sales-hero::before { top: -120px; right: -80px; width: 380px; height: 380px; background: color-mix(in srgb, var(--brand) 35%, #fff); }
.sales-hero::after { bottom: -160px; left: -120px; width: 420px; height: 420px; background: color-mix(in srgb, var(--brand) 18%, #fff); animation-delay: -7s; }
.sales-hero > .wrap { position: relative; z-index: 1; }
.sales-hero h1, .sales-hero p, .sales-hero .sales-actions, .sales-hero .show-groups, .sales-hero-shot { animation: sales-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.sales-hero p { animation-delay: .1s; }
.sales-hero .sales-actions, .sales-hero .show-groups { animation-delay: .2s; }
.sales-hero-shot { animation-delay: .3s; }
@keyframes sales-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sales-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 30px) scale(1.12); } }
/* sales.js marks parts below the first screen. They slide up when scrolled into view. */
.fx.fx { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.fx.fx.in { opacity: 1; transform: none; }
.sales-top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: box-shadow .2s; }
.sales-top.scrolled { box-shadow: 0 6px 20px rgba(15, 30, 60, .08); }
.show-card { will-change: transform; }
.show-card img { transition: transform .5s ease; }
a.show-card:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .sales-hero::before, .sales-hero::after, .sales-hero h1, .sales-hero p, .sales-hero .sales-actions, .sales-hero .show-groups, .sales-hero-shot { animation: none; } .fx.fx { opacity: 1; transform: none; } a.show-card:hover img, .sales-card:hover, .sales-card:hover .sales-icon { transform: none; } }
.sales-hero h1 { margin: 0 0 12px; font-size: clamp(30px, 6vw, 46px); line-height: 1.25; color: var(--brand-dark); }
.sales-hero p { max-width: 620px; margin: 0 0 20px; font-size: 18px; }
.sales-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.sales-hero .sales-status { margin: 0; font-size: 15px; color: var(--muted); }
.sales-section { padding-top: 40px; }
.sales-section h2 { margin: 0 0 16px; font-size: 26px; }
.sales-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.sales-card, .sales-plan { padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.sales-card { background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.sales-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: 0 12px 28px rgba(15, 30, 60, .08); transform: translateY(-3px); }
.sales-card h3 { margin-top: 14px; }
.sales-card h3, .sales-plan h3 { margin: 8px 0 6px; font-size: 18px; }
.sales-card p { margin: 0; color: var(--muted); }
.sales-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; font-size: 26px; line-height: 1; color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), #fff); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); border-radius: 16px; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 16%, transparent); transition: transform .25s, background .25s, color .25s; }
.sales-icon svg { display: block; }
.sales-card:hover .sales-icon, a.sales-type:hover .sales-icon { transform: translateY(-2px) rotate(-6deg); color: #fff; background: var(--brand); }
.sales-steps, .sales-limits { margin: 0; padding-left: 22px; }
.sales-steps li, .sales-limits li { margin-bottom: 8px; }
.sales-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 12px; }
.sales-plan h3 { margin-top: 0; }
.sales-plan p { margin: 0; }
.sales-price b { font-size: 34px; color: var(--brand); }
.sales-ticks { margin: 0; padding: 0; list-style: none; }
.sales-ticks li { position: relative; margin-bottom: 8px; padding-left: 26px; }
.sales-ticks li::before { content: "✓"; position: absolute; left: 2px; top: 0; font-weight: 700; color: var(--brand); }
.sales-feature { display: grid; gap: 20px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); }
.sales-feature:first-of-type { border-top: 0; padding-top: 4px; }
.sales-feature h3 { margin: 0 0 8px; font-size: 22px; color: var(--brand-dark); }
.sales-feature p { margin: 0 0 14px; color: var(--muted); }
@media (min-width: 860px) { .sales-feature { grid-template-columns: 5fr 7fr; gap: 44px; } .sales-feature.flip > div { order: 2; } }
.sales-shot { margin: 0; min-width: 0; }
.sales-shot img { display: block; width: 100%; height: auto; background: #eef0f3; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 30, 60, .12); }
.sales-shot.phone { justify-self: center; width: 100%; max-width: 280px; }
.sales-shot.phone img { border-radius: 26px; border: 6px solid #1f2329; }
.sales-hero-shot { max-width: 960px; margin-top: 30px; }
.sales-tier .sales-price { margin: 0 0 14px; }
.sales-examples { min-width: 0; }
.sales-examples th, .sales-examples td { text-align: left; white-space: normal; }
.sales-end { padding-bottom: 48px; }
.sales-end p { margin: 0 0 16px; }
.show-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.show-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.show-card:hover, a.show-card:focus-visible { border-color: var(--brand); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.show-card img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top; background: #eef0f3; border-bottom: 1px solid var(--line); }
.show-card div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.show-card b { font-size: 17px; }
.show-card span { color: var(--muted); font-size: 14px; }
.show-card small { margin-top: 6px; color: var(--brand); font-size: 14px; }
.show-more { margin: 16px 0 0; }
.show-slide { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.show-slide .show-card { scroll-snap-align: start; }
.show-rail { position: relative; }
.show-arrow { position: absolute; top: calc(50% - 30px); z-index: 1; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0 0 4px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--brand-dark); font: 700 30px/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .14); transition: opacity .15s, border-color .15s; }
.show-arrow:hover, .show-arrow:focus-visible { border-color: var(--brand); color: var(--brand); }
.show-arrow:disabled { opacity: 0; pointer-events: none; }
.show-arrow.prev { left: -8px; }
.show-arrow.next { right: -8px; }
@media (max-width: 560px) { .show-arrow { width: 38px; height: 38px; font-size: 26px; } .show-arrow.prev { left: 0; } .show-arrow.next { right: 0; } }
.show-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.show-groups span { color: var(--muted); }
/* "candy": a bright, friendly look for a sales page only (/teacher). Not a shop colour, so it is not in PHARMACY_THEMES.
   White text on --brand is 5.7:1. Pink and sky are only for decoration, never for text. */
[data-theme="candy"] { --bg: #fcf9ff; --line: #ebe3fa; --brand: #7c3aed; --brand-dark: #4c1d95; --brand-soft: #f4eefe; --on-brand-hi: #ffffff; --pink: #f472b6; --sky: #38bdf8; --sun: #fbbf24; --mint: #34d399; }
[data-theme="candy"] .sales { background: var(--bg); }
[data-theme="candy"] .sales-top { background: rgba(252, 249, 255, .86); border-bottom-color: var(--line); }
[data-theme="candy"] .sales-hero { background: linear-gradient(135deg, #f4eefe 0%, #fde7f3 55%, #e3f4fe 100%); }
[data-theme="candy"] .sales-hero::before { background: var(--pink); opacity: .35; }
[data-theme="candy"] .sales-hero::after { background: var(--sky); opacity: .3; }
[data-theme="candy"] .sales-hero h1 { color: var(--brand-dark); }
[data-theme="candy"] .btn { border-radius: 999px; }
[data-theme="candy"] .btn.primary { background: linear-gradient(135deg, var(--brand), #c026d3); border-color: transparent; box-shadow: 0 8px 20px rgba(124, 58, 237, .28); }
[data-theme="candy"] .sales-card, [data-theme="candy"] .sales-tier, [data-theme="candy"] .show-card { border-radius: 22px; background: #fff; border-color: var(--line); }
[data-theme="candy"] .sales-card:hover, [data-theme="candy"] a.show-card:hover { border-color: #d8c7fb; box-shadow: 0 16px 32px rgba(124, 58, 237, .12); }
[data-theme="candy"] .sales-grid > :nth-child(5n+1) .sales-icon { --tile: var(--brand); }
[data-theme="candy"] .sales-grid > :nth-child(5n+2) .sales-icon { --tile: #db2777; }
[data-theme="candy"] .sales-grid > :nth-child(5n+3) .sales-icon { --tile: #0284c7; }
[data-theme="candy"] .sales-grid > :nth-child(5n+4) .sales-icon { --tile: #d97706; }
[data-theme="candy"] .sales-grid > :nth-child(5n+5) .sales-icon { --tile: #059669; }
[data-theme="candy"] .sales-icon { color: var(--tile); border: 0; border-radius: 18px; background: color-mix(in srgb, var(--tile) 13%, #fff); box-shadow: 0 8px 18px color-mix(in srgb, var(--tile) 22%, transparent); }
[data-theme="candy"] .sales-card:hover .sales-icon { color: #fff; background: var(--tile); }
[data-theme="candy"] .sales-section h2 { display: inline-block; padding: 0 4px; color: var(--brand-dark); background: linear-gradient(90deg, rgba(244, 114, 182, .35), rgba(251, 191, 36, .35)) no-repeat 0 88% / 100% 32%; }
[data-theme="candy"] .sales-tier-pro { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--brand), var(--pink), var(--sky)) border-box; box-shadow: 0 18px 40px rgba(124, 58, 237, .14); }
[data-theme="candy"] .sales-tier h3 { color: var(--brand-dark); }
[data-theme="candy"] .sales-foot { background: transparent; }
/* Social buttons on a pharmacy หน้าร้าน. The default look uses the shop's colour. */
.t-socials { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.t-social { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: #fff; text-decoration: none; transition: filter .15s, opacity .15s; }
.t-social:hover { filter: brightness(1.15); }
/* Social icon looks a shop picks in หลังร้าน (src/social.php). Classes repeat so they outrank each theme's own rule. */
.t-social.s-line { --soc: #06c755; --soc-ink: #04a847; }
.t-social.s-facebook { --soc: #1877f2; --soc-ink: #1877f2; }
.t-social.s-youtube { --soc: #ff0000; --soc-ink: #e00000; }
.t-social.s-instagram { --soc: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); --soc-ink: #d6246e; }
.t-social.s-tiktok { --soc: #111111; --soc-ink: #ee1d52; }
.t-social.soc-brand.soc-brand.soc-brand.soc-brand, .t-social.soc-square.soc-square.soc-square.soc-square { background: var(--soc); color: #fff; box-shadow: none; }
.t-social.s-tiktok.soc-brand.soc-brand.soc-brand.soc-brand, .t-social.s-tiktok.soc-square.soc-square.soc-square.soc-square { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.t-social.soc-square.soc-square.soc-square.soc-square { border-radius: 10px; }
.t-social.soc-brand.soc-brand.soc-brand.soc-brand:hover, .t-social.soc-square.soc-square.soc-square.soc-square:hover { background: var(--soc); color: #fff; filter: brightness(1.12); }
.t-social.soc-outline.soc-outline.soc-outline.soc-outline { background: transparent; color: var(--soc-ink); box-shadow: inset 0 0 0 2px currentColor; }
.t-social.soc-outline.soc-outline.soc-outline.soc-outline:hover { background: var(--soc-ink); color: #fff; box-shadow: none; }
.t-social.soc-plain.soc-plain.soc-plain.soc-plain { width: 32px; background: transparent; color: var(--soc-ink); border-radius: 6px; box-shadow: none; }
.t-social.soc-plain.soc-plain.soc-plain.soc-plain svg { width: 24px; height: 24px; }
.t-social.soc-plain.soc-plain.soc-plain.soc-plain:hover { background: transparent; color: var(--soc-ink); opacity: .75; }
.soc-picker { display: grid; gap: 8px; }
.soc-picker .soc-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 10px 12px; border: 1px solid #d9dee5; border-radius: 12px; background: #fff; font-weight: 500; cursor: pointer; }
.soc-picker .soc-choice:has(input:checked) { border-color: #1f2937; box-shadow: 0 0 0 1px #1f2937; }
.soc-choice-name { flex: 1 1 150px; }
.soc-picker .soc-sample { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 6px 8px; border-radius: 10px; background: #f3f5f8; }
.vids { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.vids.is-one { grid-template-columns: minmax(0, 760px); justify-content: center; }
.vid { margin: 0; min-width: 0; }
.vid-play, .vid-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; overflow: hidden; background: #111; }
.vid-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.vid-play:hover img { transform: scale(1.03); }
.vid-play:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.vid-btn { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: rgba(0, 0, 0, .72); transition: background .2s; }
.vid-btn::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.vid-play:hover .vid-btn, .vid-play:focus-visible .vid-btn { background: #e00; }
.vid-title { margin: 8px 2px 0; font-weight: 600; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .vid-play img, .vid-btn { transition: none; } .vid-play:hover img { transform: none; } }
.video-row { margin: 0 0 12px; padding: 10px 14px 4px; border: 1px solid var(--line); border-radius: 12px; }
.video-row legend { padding: 0 6px; font-weight: 600; }
.sales-foot { margin-top: 48px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
