:root {
  --mall-orange: #ee4d2d;
  --mall-orange-dark: #d73211;
  --mall-ink: #222;
  --mall-muted: #666;
  --mall-line: #ececec;
  --mall-paper: #f5f5f5;
  --mall-card: #fff;
  --mall-dock: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.shopdeck {
  font-family: "Prompt", "Sarabun", "Noto Sans Thai", sans-serif;
  color: var(--mall-ink);
  background: var(--mall-paper);
  line-height: 1.65;
  padding-bottom: calc(var(--mall-dock) + 12px);
}

a { color: var(--mall-orange); }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }

.shopdeck-ticker {
  background: #fff7f5;
  color: var(--mall-orange-dark);
  font-size: 13px;
  padding: 8px 16px;
  border-bottom: 1px solid #ffd8cf;
}

.shopdeck-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 16px;
  background: var(--mall-orange);
}
.shopdeck-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
}
.shopdeck-brand img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #1a1208; }
.shopdeck-brand span { color: #fff; }
.shopdeck-search {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.shopdeck-search input {
  flex: 1;
  border: 0;
  padding: 10px 12px;
  min-width: 0;
}
.shopdeck-search button {
  border: 0;
  background: #fff;
  color: var(--mall-orange);
  padding: 0 12px;
  font-weight: 700;
}
.shopdeck-auth { display: flex; gap: 8px; }
.shopdeck-auth a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  background: #fff;
  color: var(--mall-orange-dark);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
  min-height: 44px;
  display: grid;
  place-items: center;
}

.shopdeck-depts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--mall-line);
  list-style: none;
  margin: 0;
}
.shopdeck-depts > li { flex: none; }
.shopdeck-depts a {
  flex: none;
  text-decoration: none;
  color: var(--mall-ink);
  background: var(--mall-paper);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}
.shopdeck-depts a[aria-current="page"] {
  background: #ffe8e3;
  color: var(--mall-orange-dark);
}

.shopdeck-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  max-width: 1180px;
  margin: 0 auto;
}
.shopdeck-facet {
  display: none;
  background: var(--mall-card);
  border: 1px solid var(--mall-line);
  border-radius: 12px;
  padding: 16px;
}
.shopdeck-facet h2 { margin: 0 0 12px; font-size: 16px; }
.shopdeck-facet label { display: block; margin: 8px 0; color: var(--mall-muted); font-size: 14px; }
.shopdeck-canvas { min-width: 0; }

.shopdeck-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 13px;
  color: var(--mall-muted);
}
.shopdeck-crumb li::after { content: "/"; margin-left: 6px; color: #bbb; }
.shopdeck-crumb li:last-child::after { content: ""; }

.shopdeck-hero-card {
  background: var(--mall-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--mall-line);
}
.shopdeck-hero-card h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.3; }
.shopdeck-byline { margin: 0; color: var(--mall-muted); font-size: 14px; }
.shopdeck-price-row { display: flex; gap: 10px; align-items: baseline; }
.shopdeck-price { color: var(--mall-orange); font-size: 28px; font-weight: 700; }
.shopdeck-sold { color: var(--mall-muted); font-size: 13px; }

.shopdeck-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.shopdeck-rail article,
.shopdeck-sku {
  background: var(--mall-card);
  border: 1px solid var(--mall-line);
  border-radius: 12px;
  overflow: hidden;
}
.shopdeck-sku a { color: inherit; text-decoration: none; display: block; }
.shopdeck-sku img { width: 100%; height: 120px; object-fit: cover; background: #ffe8e3; }
.shopdeck-sku h3 { margin: 8px 10px 0; font-size: 15px; }
.shopdeck-sku p { margin: 4px 10px 12px; color: var(--mall-muted); font-size: 13px; }
.shopdeck-sku .shopdeck-sku-meta {
  margin: 0 10px 12px;
  color: var(--mall-orange);
  font-weight: 700;
  font-size: 14px;
}

.shopdeck-story {
  background: var(--mall-card);
  border: 1px solid var(--mall-line);
  border-radius: 12px;
  padding: 20px;
}
.shopdeck-story h2, .shopdeck-story h3 { line-height: 1.35; }
.shopdeck-story table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.shopdeck-story th, .shopdeck-story td { border: 1px solid var(--mall-line); padding: 8px; text-align: left; }
.shopdeck-story dt { font-weight: 700; margin-top: 10px; }
.shopdeck-story figure {
  margin: 16px 0;
  background: #fff7f5;
  border-radius: 12px;
  overflow: hidden;
}
.shopdeck-story figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 420px;
}
.shopdeck-story figcaption {
  font-size: 13px;
  color: var(--mall-muted);
  padding: 8px 12px 12px;
}
.shopdeck-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shopdeck-gallery figure { margin: 0; }

.shopdeck-related { margin-top: 16px; }
.shopdeck-related h2 { font-size: 18px; }

.shopdeck-foot {
  background: #fff;
  border-top: 1px solid var(--mall-line);
  padding: 24px 16px 32px;
  margin-top: 12px;
}
.shopdeck-foot-grid {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}
.shopdeck-foot a { color: var(--mall-ink); text-decoration: none; display: inline-block; min-height: 32px; }
.shopdeck-foot small { color: var(--mall-muted); }

.shopdeck-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--mall-dock);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--mall-line);
  z-index: 20;
  padding: 0;
  margin: 0;
  list-style: none;
}
.shopdeck-dock a {
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--mall-muted);
  font-size: 12px;
  font-weight: 600;
}
.shopdeck-dock a[aria-current="page"],
.shopdeck-dock a.cta { color: var(--mall-orange); }

.shopdeck-pdpa {
  position: sticky;
  bottom: var(--mall-dock);
  z-index: 15;
  background: #1f1f1f;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.shopdeck-pdpa[hidden] { display: none; }
.shopdeck-pdpa p { margin: 0; font-size: 13px; }
.shopdeck-pdpa a { color: #ffd2c8; }
.shopdeck-pdpa button {
  background: var(--mall-orange);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  min-height: 44px;
}

.shopdeck-facet > summary { cursor: pointer; font-weight: 700; }
.shopdeck-promo { background: #fff; border: 1px solid var(--mall-line); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.shopdeck-announce {
  border: 0;
  padding: 0;
  max-width: min(92vw, 420px);
  border-radius: 16px;
  overflow: hidden;
}
aside.shopdeck-announce {
  position: fixed;
  inset: 0;
  z-index: 40;
  max-width: none;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
}
aside.shopdeck-announce[hidden] { display: none; }
aside.shopdeck-announce .shopdeck-announce__panel {
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
.shopdeck-announce::backdrop { background: rgba(0, 0, 0, 0.55); }
.shopdeck-announce img { display: block; width: 100%; }
.shopdeck-announce__bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: #fff;
}
.shopdeck-announce__bar a,
.shopdeck-announce__bar button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}
.shopdeck-announce__close { background: #f2f2f2; }
.shopdeck-announce__go {
  background: var(--mall-orange);
  color: #fff;
  text-decoration: none;
  display: grid;
  place-items: center;
}

@media (min-width: 960px) {
  body.shopdeck { padding-bottom: 0; }
  .shopdeck-head {
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    padding: 14px 24px;
  }
  .shopdeck-auth a { min-width: 120px; flex: none; }
  .shopdeck-layout { grid-template-columns: 220px 1fr; padding: 20px; }
  .shopdeck-facet { display: block; height: fit-content; }
  .shopdeck-rail { grid-template-columns: repeat(4, 1fr); }
  .shopdeck-dock { display: none; }
  .pdpa-sheet { bottom: 0; }
  .shopdeck-foot-grid { grid-template-columns: 2fr 1fr 1fr; }
  .shopdeck-hero-card h1 { font-size: 36px; }
  .shopdeck-gallery { grid-template-columns: repeat(3, 1fr); }
}
