/* Changeko.net — "flash sale" theme, light: white shelves, orange-red brand, sunny-yellow deal tags, mint-green "verified";
   punchy Prompt display + Anuphan body. Signature bits: price-tag badges, corner ribbons, coupon boxes, shopping-bag marks. */
:root {
  color-scheme: light;
  --bg: #fff8f3;            /* warm paper white */
  --surface: #ffffff;
  --surface-2: #fff0e6;
  --text: #1c1917;
  --muted: #655a60;
  --line: #f1e2d8;
  --brand: #ff5a1f;         /* decorative orange-red (fills with dark ink, borders, glows) */
  --brand-fill: #d23a0b;    /* fills that carry white text */
  --brand-text: #c2330a;    /* orange-red as text on white */
  --sun: #ffd23f;           /* deal / sale yellow, always with dark ink */
  --sun-soft: #fff4cc;
  --safe: #047857;          /* verified / safe shopping */
  --safe-soft: #dcf7ea;
  --ink: #1c1917;
  --news: #d23a0b;
  --article: #047857;
  --review: #ffd23f;
  --night: #1c1410;         /* only behind photos */
  --radius: 18px;
  --shadow: 0 1px 2px rgb(120 40 10 / .06), 0 10px 28px rgb(120 40 10 / .08);
  --display: "Prompt", "Anuphan", "Noto Sans Thai", system-ui, sans-serif;
  --body: "Anuphan", "Noto Sans Thai", "Leelawadee UI", "Thonburi", system-ui, sans-serif;
  --bag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 8V6.5a4 4 0 0 1 8 0V8' fill='none' stroke='%231c1917' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M4.5 8h15l-1.2 11.6A2.6 2.6 0 0 1 15.7 22H8.3a2.6 2.6 0 0 1-2.6-2.4z' fill='%23ff5a1f'/%3E%3Ccircle cx='9' cy='11' r='1.2' fill='%23fff'/%3E%3Ccircle cx='15' cy='11' r='1.2' fill='%23fff'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--body);
  font-size: 17px; line-height: 1.7; overflow-wrap: break-word;
}
::selection { background: var(--sun); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-text); }
a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); overflow-wrap: anywhere; }
.wrap { max-width: 1240px; margin-inline: auto; padding: 0 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--sun); color: var(--ink); padding: 8px 12px; z-index: 50; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- header: logo + big search-bar-style category nav ---------- */
.site-header { background: var(--surface); color: var(--text); position: relative; box-shadow: 0 2px 0 var(--line), 0 8px 24px rgb(120 40 10 / .06); }
.topbar { background: var(--brand-fill); color: #fff; font-size: .8rem; }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 34px; }
.tagline { font-weight: 500; }
.topbar-promo { flex: none; white-space: nowrap; }
.topbar-promo b { background: var(--sun); color: var(--ink); padding: 1px 8px; border-radius: 4px; margin-right: 2px; font-family: var(--display); font-weight: 700; }
.header-main { display: flex; align-items: center; gap: 28px; padding-top: 22px; padding-bottom: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo:hover { color: inherit; }
.logo img { border-radius: 12px; box-shadow: 0 4px 12px rgb(255 90 31 / .35); }
.logo-text {
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1;
  color: var(--text); display: inline-flex; align-items: center;
}
.logo-text b {
  font-weight: 800; margin-left: 4px; padding: 3px 10px 4px 14px; color: #fff; background: var(--brand-fill);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); border-radius: 0 6px 6px 0;
}
.searchbar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 6px 0 16px;
  background: var(--surface); border: 3px solid var(--brand-fill); border-radius: 999px;
  box-shadow: 0 6px 18px rgb(210 58 11 / .14);
}
.search-ico {
  flex: none; width: 22px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2330a' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center/contain no-repeat;
}
.search-pills {
  flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0 4px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.search-pills::-webkit-scrollbar { display: none; }
.search-pills a {
  display: flex; align-items: center; gap: 5px; white-space: nowrap; padding: 5px 12px; min-height: 32px;
  font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--text);
  background: var(--surface-2); border-radius: 999px; border: 2px solid transparent; transition: background .15s, border-color .15s;
}
.search-pills a:hover { background: var(--sun-soft); border-color: var(--sun); color: var(--text); }
.search-pills a[aria-current="page"] { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.search-btn {
  flex: none; display: grid; place-items: center; height: 42px; padding: 0 22px; border-radius: 999px;
  background: var(--brand-fill); color: #fff; font-family: var(--display); font-weight: 700; font-size: .95rem;
}
.search-btn:hover { background: #b0300a; color: #fff; }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 18px auto 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--brand); font-weight: 700; }
.crumbs a:hover { color: var(--brand-text); }
.crumbs [aria-current] { color: var(--text); }
.crumbs li:last-child span { display: inline-block; max-width: 60ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- shared bits ---------- */
section { margin-top: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.55rem; line-height: 1.25; margin: 0 0 18px; letter-spacing: -.01em;
}
.section-head .section-title { margin: 0; }
.section-title::before { content: ""; flex: none; width: 1.15em; height: 1.15em; background: var(--bag) center/contain no-repeat; }
.more {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; font-family: var(--display); font-weight: 600; font-size: .9rem;
  padding: 4px 16px; border-radius: 999px; background: var(--surface); border: 2px solid var(--brand-fill); color: var(--brand-text);
}
.more:hover { background: var(--brand-fill); color: #fff; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 22px; border-radius: 999px;
  background: var(--brand-fill); color: #fff; font-family: var(--display); font-weight: 700;
  box-shadow: 0 6px 16px rgb(210 58 11 / .28);
}
.btn:hover { background: #b0300a; color: #fff; }

/* price-tag badge (section link) */
.badge {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 1px 12px 1px 18px;
  background: var(--sun); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: .78rem; line-height: 1.6;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); border-radius: 0 6px 6px 0;
}
.badge::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--surface); }
.badge:hover { color: var(--ink); background: #ffc400; }
.badge[href*="/safe-shopping/"] { background: var(--safe); color: #fff; }
.badge[href*="/safe-shopping/"]:hover { background: #035f45; color: #fff; }
.badge[href*="/deals/"] { background: var(--brand-fill); color: #fff; }
.badge[href*="/deals/"]:hover { background: #b0300a; color: #fff; }

/* type pill and corner ribbon: news = red, review = yellow, article = green */
.pill { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .74rem; line-height: 1.7; padding: 0 10px; border-radius: 999px; background: var(--brand-fill); color: #fff; }
.pill.type-review { background: var(--sun); color: var(--ink); }
.pill.type-article { background: var(--safe); color: #fff; }
.ribbon {
  position: absolute; left: -38px; top: 16px; width: 140px; padding: 3px 0; text-align: center; transform: rotate(-45deg);
  background: var(--brand-fill); color: #fff; font-family: var(--display); font-weight: 700; font-size: .74rem; box-shadow: 0 3px 8px rgb(0 0 0 / .2);
}
.ribbon.type-review { background: var(--sun); color: var(--ink); }
.ribbon.type-article { background: var(--safe); color: #fff; }
.sub { color: var(--muted); margin: 0 0 8px; font-size: .95rem; line-height: 1.55; }
.meta { margin: 0; font-size: .82rem; color: var(--muted); }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.feature-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.clamp2, .pcard h3 a, .rail h3 a, .shop-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- home: round category icons ---------- */
.cats { margin-top: 26px; }
.cat-circles { list-style: none; margin: 0; padding: 4px 2px 8px; display: flex; justify-content: space-around; gap: 12px; overflow-x: auto; }
.cat-circles a { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 104px; text-align: center; }
.cat-circles a:hover { color: var(--brand-text); }
.circle {
  width: 76px; height: 76px; display: grid; place-items: center; font-size: 2rem; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, var(--sun-soft) 70%); border: 3px solid var(--sun);
  box-shadow: 0 6px 16px rgb(255 160 40 / .25); transition: transform .15s, border-color .15s;
}
.cat-circles a:hover .circle { transform: translateY(-3px) rotate(-6deg); border-color: var(--brand); }
.cat-circles a[href*="/safe-shopping/"] .circle { background: radial-gradient(circle at 30% 25%, #fff, var(--safe-soft) 70%); border-color: #34c38f; }
.cat-name { font-family: var(--display); font-weight: 600; font-size: .9rem; line-height: 1.35; }

/* ---------- home: promo banners (one big carousel-like + two stacked) ---------- */
.promo { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 22px; }
.banner {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--night); color: #fff;
  isolation: isolate; display: flex; align-items: flex-end; box-shadow: var(--shadow);
}
.banner img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(28 20 16 / 0) 30%, rgb(28 20 16 / .62) 58%, rgb(28 20 16 / .95) 100%);
}
.banner:hover img { transform: scale(1.04); }
.banner h3 a:hover { color: var(--sun); }
.banner-main { min-height: 440px; }
.banner-main .banner-body { padding: 28px 30px 34px; max-width: 760px; }
.banner-main h3 { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 800; line-height: 1.22; margin: 0 0 10px; }
.banner-main .sub { color: #ece2dc; font-size: 1.02rem; }
.banner .meta { color: #d7cbc4; }
.dots { position: absolute; right: 22px; bottom: 18px; display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 999px; background: rgb(255 255 255 / .55); }
.dots i.on { width: 24px; background: var(--sun); }
.promo-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.banner-sm { min-height: 212px; }
.banner-sm .banner-body { padding: 16px 18px; }
.banner-sm h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.38; margin: 0; }
.banner-sm .feature-tags { margin-bottom: 6px; }

/* HOT starburst sticker */
.hot-burst {
  position: absolute; top: 18px; right: 18px; z-index: 2; width: 92px; height: 92px;
  display: grid; place-content: center; text-align: center; line-height: 1;
  background: var(--sun); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.45rem;
  clip-path: polygon(50% 0, 61% 14%, 79% 8%, 80% 26%, 98% 32%, 88% 48%, 98% 66%, 80% 72%, 79% 91%, 61% 85%, 50% 100%, 39% 85%, 21% 91%, 20% 72%, 2% 66%, 12% 48%, 2% 32%, 20% 26%, 21% 8%, 39% 14%);
  transform: rotate(10deg); animation: wobble 3s ease-in-out infinite;
}
.hot-burst small { display: block; font-size: max(.5em, 11px); font-weight: 700; margin-top: 3px; color: var(--brand-text); }
@keyframes wobble { 50% { transform: rotate(-4deg) scale(1.06); } }

/* ---------- home: flash deals rail ---------- */
.flash {
  padding: 18px 20px 20px; border-radius: var(--radius); background: var(--surface);
  border: 2px solid var(--line); box-shadow: var(--shadow);
}
.flash-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 14px; }
.flash-head h2 {
  display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.6rem; font-weight: 800; font-style: italic;
  color: var(--brand-text); letter-spacing: -.01em; text-transform: uppercase;
}
.bolt {
  width: 18px; height: 26px; flex: none; background: var(--brand-fill);
  clip-path: polygon(55% 0, 0 58%, 45% 58%, 30% 100%, 100% 38%, 55% 38%, 75% 0);
  animation: zap 1.2s ease-in-out infinite;
}
@keyframes zap { 50% { transform: scale(1.2) rotate(-8deg); } }
.countdown { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.countdown time { display: inline-flex; align-items: center; gap: 3px; }
.countdown b {
  display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 4px; border-radius: 6px;
  background: var(--ink); color: #fff; font-family: var(--display); font-size: .95rem;
}
.countdown i { font-style: normal; font-weight: 800; color: var(--ink); }
.rail {
  list-style: none; margin: 0; padding: 2px 2px 10px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--brand) transparent;
}
.rail-item { scroll-snap-align: start; position: relative; display: flex; flex-direction: column; }
.rail-img { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.rail-img img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .4s; }
.rail-item:hover img { transform: scale(1.06); }
.flash-tag {
  position: absolute; left: 0; bottom: 10px; padding: 1px 12px 1px 8px; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--sun); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: .76rem;
  border-radius: 0 999px 999px 0;
}
.rail h3 { font-size: .96rem; font-weight: 600; line-height: 1.45; margin: 8px 0 4px; }
.rail h3 a:hover { color: var(--brand-text); }
.rail .meta { font-size: .76rem; }

/* ---------- product-style cards ---------- */
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pcard {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px;
  overflow: hidden; border: 1px solid var(--line); box-shadow: 0 1px 2px rgb(120 40 10 / .05);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 14px 30px rgb(210 58 11 / .14); }
.pcard-img { position: relative; display: block; overflow: hidden; background: var(--surface-2); }
.pcard-img img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.pcard h3 { font-size: 1rem; font-weight: 600; line-height: 1.45; margin: 0 0 8px; min-height: 2.9em; }
.pcard h3 a:hover { color: var(--brand-text); }
.pcard-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; }
.read { font-family: var(--display); font-weight: 700; font-size: .85rem; color: var(--brand-text); }
.pcard .meta { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .76rem; }

/* ---------- home: review strip ---------- */
.review-strip {
  margin-top: 52px; padding: 36px 0 40px;
  background: linear-gradient(120deg, var(--sun-soft), #ffe2cf);
  border-block: 2px dashed #f4c96a;
}
.stamp {
  flex: none; padding: 4px 14px; border: 3px solid var(--safe); border-radius: 8px; color: var(--safe);
  font-family: var(--display); font-weight: 800; font-size: .9rem; transform: rotate(-4deg); background: rgb(255 255 255 / .7);
}
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rcard {
  position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 2px solid transparent;
  transition: border-color .15s, transform .15s;
}
.rcard:hover { border-color: var(--brand); transform: translateY(-2px); }
.rcard img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; width: 100%; }
.verified { margin: 0; font-size: .78rem; font-weight: 700; color: var(--safe); }
.rcard h3 { font-size: 1.06rem; font-weight: 700; line-height: 1.42; margin: 2px 0 4px; }
.rcard h3 a:hover { color: var(--brand-text); }
.rcard .sub { font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }

/* ---------- home: shop by category (mini shop blocks) ---------- */
.shops { margin-top: 52px; }
.shop {
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; padding: 16px; margin-top: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.shop-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px;
  border-radius: 14px; background: var(--surface-2); border: 2px dashed #f3a47f;
}
.shop-ava {
  width: 58px; height: 58px; display: grid; place-items: center; font-size: 1.7rem; border-radius: 50%;
  background: var(--surface); box-shadow: 0 0 0 3px var(--sun);
}
.shop-info h3 { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.3; }
.shop-info h3 a:hover { color: var(--brand-text); }
.shop-info p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.shop-info .shop-count { font-weight: 700; color: var(--brand-text); }
.shop-card .more { margin-top: auto; }
.shop-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shop-items a { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; }
.shop-items img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 12px; transition: transform .2s; }
.shop-items a:hover img { transform: translateY(-3px); }
.shop-items a:hover .shop-title { color: var(--brand-text); }
.shop-items .pill { position: absolute; top: 8px; left: 8px; }
.shop-title { font-family: var(--display); font-weight: 500; font-size: .92rem; line-height: 1.45; }

/* ---------- category page: filter sidebar + product grid ---------- */
.cat-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; margin-top: 18px; align-items: start; }
.filters {
  position: sticky; top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.filter-title { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 2px solid var(--line); font-family: var(--display); font-weight: 800; color: var(--brand-text); }
.filters ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.filters a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px; border-radius: 10px;
  font-family: var(--display); font-weight: 500; font-size: .95rem;
}
.filters a::after { content: "›"; margin-left: auto; color: var(--muted); }
.filters a:hover { background: var(--surface-2); color: var(--text); }
.filters a[aria-current="page"] { background: var(--brand-fill); color: #fff; font-weight: 700; }
.filters a[aria-current="page"]::after { color: #fff; }
.filter-promo {
  margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--sun-soft); border: 2px dashed #f4c96a;
  font-size: .85rem; color: var(--muted); display: grid; gap: 2px;
}
.filter-promo b { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.cat-head {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--radius); position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--sun-soft), #ffe2cf);
}
.cat-head::after {
  content: "%"; position: absolute; right: 3%; top: 50%; transform: translateY(-50%) rotate(-12deg);
  font-family: var(--display); font-weight: 800; font-size: 9rem; line-height: 1; color: var(--brand); opacity: .12;
}
.cat-head > div { position: relative; z-index: 1; min-width: 0; }
.cat-head h1 { font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.2; margin: 0 0 4px; }
.cat-head h1 small, .page-band h1 small { font-size: .45em; color: #fff; background: var(--brand-fill); padding: 2px 10px; border-radius: 999px; vertical-align: middle; font-weight: 700; }
.cat-head p { margin: 0; color: #4f4449; max-width: 64ch; }
.band-ico {
  flex: none; font-size: 2rem; margin: 0; line-height: 1; width: 64px; height: 64px; display: grid; place-items: center;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); transform: rotate(-6deg);
}
.sortbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; color: var(--muted);
}
.sort-on { padding: 2px 14px; border-radius: 8px; background: var(--brand-fill); color: #fff; font-family: var(--display); font-weight: 700; }
.sort-count { margin-left: auto; }
.cat-main .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 36px; font-family: var(--display); }
.pager a { border: 2px solid var(--brand-fill); color: var(--brand-text); padding: 6px 18px; border-radius: 999px; font-weight: 600; background: var(--surface); }
.pager a:hover { background: var(--brand-fill); color: #fff; }

/* 404 band */
.page-band {
  position: relative; overflow: hidden; color: var(--text); padding: 40px 0 50px; margin-top: 16px;
  background:
    radial-gradient(circle at 10px 100%, var(--bg) 9px, transparent 10px) 0 100% / 24px 12px repeat-x,
    linear-gradient(120deg, var(--sun-soft), #ffe2cf);
}
.page-band .wrap { position: relative; }
.page-band h1 { font-weight: 800; font-size: clamp(1.8rem, 4.4vw, 2.8rem); line-height: 1.2; margin: 16px 0 8px; }
.page-band p { margin: 0; color: #4f4449; max-width: 60ch; }
.page-band a { color: var(--brand-text); text-decoration: underline; font-weight: 600; }
.soldout {
  position: absolute; right: 16px; top: 4px; padding: 6px 18px; border: 4px solid var(--brand-fill); border-radius: 10px;
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: .08em; color: var(--brand-fill);
  transform: rotate(10deg); opacity: .85; background: rgb(255 255 255 / .6);
}

/* ---------- article: product-review page ---------- */
.post { margin-top: 18px; }
.pdp {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: start;
  padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.pdp-cover { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.pdp-cover img { width: 100%; aspect-ratio: 1200/630; object-fit: cover; }
.pdp-cover .ribbon { left: -34px; top: 20px; font-size: .82rem; }
.pdp-info { padding: 4px 6px 4px 0; }
.pdp-info h1 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); font-weight: 800; line-height: 1.28; margin: 4px 0 12px; letter-spacing: -.01em; }
.cat { font-size: .85rem; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brand-fill); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  box-shadow: 0 0 0 3px var(--sun);
}
.byline .meta { line-height: 1.6; }
.byline a { font-weight: 700; color: var(--text); display: inline-block; padding: 2px 0; }
.byline a:hover { color: var(--brand-text); }
.verdict {
  position: relative; margin: 16px 0; padding: 14px 16px 14px 18px; border-radius: 14px;
  background: var(--sun-soft); border: 2px dashed #f4c96a;
}
.verdict-label {
  margin: 0 0 4px; display: inline-block; padding: 0 10px; border-radius: 6px; background: var(--ink); color: var(--sun);
  font-family: var(--display); font-weight: 700; font-size: .78rem;
}
.post-sub { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--text); font-weight: 500; }
.quick-facts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quick-facts li {
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 6px; border-radius: 12px;
  border: 1px solid var(--line); font-size: .78rem; color: var(--muted); line-height: 1.4;
}
.quick-facts b { font-family: var(--display); font-size: 1.05rem; color: var(--brand-text); }
.pdp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.pdp-actions .more { min-height: 44px; }
.pdp-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; margin-top: 28px; align-items: start; }
.post-body { max-width: 72ch; font-size: 1.1rem; scroll-margin-top: 16px; }
.post-body > :first-child { margin-top: 0; }
.post-body .lead {
  font-size: 1.18rem; padding: 16px 20px; background: var(--sun-soft); border-radius: 14px; border: 2px dashed #f4c96a;
}
.post-body h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.35; margin: 36px 0 8px; display: flex; gap: 10px; align-items: baseline; }
.post-body h2::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--brand); transform: rotate(45deg) translateY(-2px); }
.post-body img { border-radius: var(--radius); margin: 24px 0; width: 100%; }
.post-body a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul { list-style: none; padding: 18px 20px; background: var(--safe-soft); border: 2px solid #a7e8cb; border-radius: var(--radius); display: grid; gap: 8px; }
.post-body li { display: flex; gap: 10px; font-weight: 500; }
.post-body li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 4px; border-radius: 50%;
  background: var(--safe) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.post-body blockquote { margin: 24px 0; padding: 14px 20px; border-left: 6px solid var(--brand); background: var(--surface-2); border-radius: 0 14px 14px 0; }
.spec { position: sticky; top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.spec h2 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 800; color: var(--brand-text); }
.spec dl { margin: 0; }
.spec dl div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: .9rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; }
.spec a { color: var(--brand-text); display: inline-block; padding: 1px 0; }
.related { margin-top: 52px; }

/* ---------- footer: trust strip + receipt edge ---------- */
.site-footer { margin-top: 80px; background: #fff1e6; color: #5c4f55; font-size: .92rem; position: relative; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
  background: linear-gradient(-45deg, #fff1e6 6px, transparent 0) 0 0 / 16px 12px repeat-x,
              linear-gradient(45deg, #fff1e6 6px, transparent 0) 0 0 / 16px 12px repeat-x;
}
.trust { border-bottom: 2px dashed #efcdb9; }
.trust-row { list-style: none; margin-block: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.trust-row li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; font-size: .85rem; }
.trust-row span { grid-row: span 2; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface); border-radius: 50%; box-shadow: 0 0 0 2px var(--sun); }
.trust-row b { font-family: var(--display); color: var(--text); font-size: 1rem; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--brand-text); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 56px; padding-top: 40px; padding-bottom: 44px; }
.footer-brand p { margin: 16px 0 0; line-height: 1.7; max-width: 38ch; }
.footer-title { margin: 4px 0 16px; color: var(--brand-text); font-family: var(--display); font-weight: 800; font-size: 1.05rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.footer-sections a { display: inline-block; padding: 2px 0; }
.footer-latest li + li { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #efcdb9; }
.footer-latest a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; font-weight: 500; }
.footer-latest time { display: block; margin-top: 4px; font-size: .78rem; }
.footer-bottom { background: var(--brand-fill); color: #fff; }
.footer-bottom-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; font-size: .85rem; }
.footer-bottom p { margin: 0; }
.site-footer .to-top { display: inline-block; padding: 6px 0; color: #fff; font-weight: 600; }
.site-footer .to-top:hover { color: var(--sun); }

/* ad slots: code comes from the admin app (zone ads) */
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 24px auto; max-width: 1280px; padding: 0 16px; text-align: center; overflow: hidden; }
.ad-unit { width: 100%; max-width: 100%; overflow: hidden; }
.post .ad-slot, .cat-main .ad-slot { padding: 0; }

/* broken image: replaced by the site logo (script in layout.html), centred on the logo's own background */
img.img-fallback { object-fit: contain !important; background: #ff5a1f; filter: none !important; }
.post-body img.img-fallback, .pdp-cover img.img-fallback { aspect-ratio: 16/9; max-height: 420px; }

/* mobile: the last breadcrumb (article title) shrinks to the screen instead of pushing the page wider */
.crumbs li:last-child { display: flex; min-width: 0; max-width: 100%; }
.crumbs li:last-child span { min-width: 0; max-width: 60ch; }

/* empty state: no posts yet — an empty shopping basket */
.empty {
  text-align: center; padding: 64px 24px; background: var(--surface); border: 2px dashed #f3a47f; border-radius: var(--radius);
}
.empty-ico {
  font-size: 2.6rem; margin: 0 auto; line-height: 1; width: 88px; height: 88px; display: grid; place-items: center;
  background: var(--sun-soft); border-radius: 50%; box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px var(--sun);
}
.empty h2 { font-size: 1.8rem; margin: 20px 0 6px; }
.empty p { margin: 0; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  }
@media (max-width: 1080px) {
  .pgrid, .cat-main .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop { grid-template-columns: minmax(0, 1fr); }
  .shop-card { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .shop-info { flex: 1; min-width: 180px; }
  .shop-card .more { margin-top: 0; }
  .pdp, .pdp-detail { grid-template-columns: minmax(0, 1fr); }
  .spec { position: static; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .header-main { flex-wrap: wrap; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
  .searchbar { flex: 1 1 100%; height: 50px; }
  .promo { grid-template-columns: minmax(0, 1fr); }
  .promo-side { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters { position: static; padding: 10px; }
  .filter-title, .filter-promo { display: none; }
  .filters ul { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .filters li { flex: none; }
  .filters a { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; }
  .filters a::after { content: none; }
  .review-grid { grid-template-columns: minmax(0, 1fr); }
  .trust-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .tagline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .topbar-promo { display: none; }
  .searchbar { padding-left: 12px; }
  .search-btn { padding: 0 14px; font-size: .88rem; }
  .cat-circles { justify-content: flex-start; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
  .cat-circles a { width: 76px; }
  .circle { width: 62px; height: 62px; font-size: 1.6rem; }
  .cat-name { font-size: .8rem; }
  .banner-main { min-height: 380px; }
  .banner-main .banner-body { padding: 20px 20px 30px; }
  .hot-burst { width: 72px; height: 72px; font-size: 1.1rem; top: 12px; right: 12px; }
  .promo-side { grid-template-columns: minmax(0, 1fr); }
  .banner-sm { min-height: 190px; }
  .flash { padding: 14px 12px 14px; }
  .flash-head h2 { font-size: 1.35rem; }
  .rail { grid-auto-columns: 150px; gap: 10px; }
  .pgrid, .cat-main .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard h3 { font-size: .94rem; }
  .pcard-body { padding: 8px 10px 10px; }
  .pcard .meta { display: none; }
  .ribbon { left: -42px; top: 12px; font-size: .75rem; }
  .rcard { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .rcard .sub { display: none; }
  .shop { padding: 12px; }
  .shop-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-head { padding: 16px; gap: 14px; }
  .cat-head::after { font-size: 6rem; }
  .band-ico { width: 52px; height: 52px; font-size: 1.6rem; }
  .sort-count { margin-left: 0; width: 100%; }
  .pdp { padding: 10px; gap: 16px; }
  .pdp-info { padding: 0 4px 6px; }
  .soldout { font-size: 1.1rem; padding: 4px 12px; top: 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; }
  .footer-bottom-row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* sidebar ad zone: fits the column it sits in */
.ad-slot.ad-sidebar { margin: 0 0 16px; padding: 0; max-width: 100%; }
/* an ad never widens the page: the slot takes its parent's width and clips anything wider */
.ad-slot { width: 100%; min-width: 0; box-sizing: border-box; }
.ad-unit > * { max-width: 100%; }
