* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
button,
input,
select,
textarea,
.shop-hero h1,
.sidebar-head h2,
.sidebar-card h3,
.product-page-card h3 {
  font-family: "Anuphan", sans-serif;
}

:root {
  --bg: #FAF9F6;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 253, 249, 0.96);
  --text: #2f241d;
  --muted: #7b6a5c;
  --line: #eadfce;
  --accent: #8c5a3c;
  --accent-dark: #6d4129;
  --accent-soft: #f4e8db;
  --hero: #f7efe6;
  --sage: #707a58;
  --sale: #8f6d3f;
  --shadow: 0 20px 45px rgba(47, 36, 29, 0.08);
}

html,
body {
  scrollbar-width: none;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  min-height: 100vh;
  font-family: "Anuphan", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(231, 160, 137, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(140, 90, 60, 0.08), transparent 20%),
    var(--bg);
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.product-announcement {
  background: linear-gradient(90deg, #7d5339 0%, #8c5a3c 100%);
  color: #fff8f2;
}

.product-announcement-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.9rem;
}

.product-announcement-bar p {
  color: rgba(255, 248, 242, 0.86);
}

.product-announcement-bar a {
  font-weight: 600;
}

.product-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(250, 249, 246, 0.92);
}

.product-nav {
  min-height: 84px;
}

.product-nav-links a.is-active {
  color: var(--accent-dark);
}

.product-cart-link {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.product-cart-link span:empty {
  display: none;
}

.product-account-link {
  text-decoration: none;
}

.product-order-button.auth-hidden {
  display: none;
}

.product-cart-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
}

.product-cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 36, 29, 0.26);
  backdrop-filter: blur(4px);
}

.product-cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(440px, 100%);
  height: 100%;
  padding: 24px 22px;
  background: rgba(255, 249, 242, 0.98);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(47, 36, 29, 0.12);
}

.product-cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.product-cart-kicker {
  color: var(--accent);
  font-size: 0.88rem;
}

.product-cart-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.product-cart-items {
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 4px;
}

.product-cart-empty,
.product-cart-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.product-cart-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
}

.product-cart-item img {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  object-fit: cover;
}

.product-cart-item h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.product-cart-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

.product-cart-meta {
  display: grid;
  gap: 10px;
}

.product-cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-cart-qty {
  color: var(--accent-dark);
  font-size: 0.92rem;
}

.product-cart-remove {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.product-cart-footer {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.product-cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-cart-checkout {
  display: inline-flex;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.shop-hero {
  display: none;
  padding: 72px 0 52px;
}

.shop-benefits {
  display: none;
}

.site-footer .footer-grid > div:first-child p,
.site-footer .footer-grid > div:nth-child(2) h4,
.site-footer .footer-grid > div:nth-child(3) h4,
.site-footer .footer-grid > div:nth-child(3) p {
  font-size: 0;
}

.site-footer .footer-grid > div:first-child p::after {
  content: "ขนมพื้นเมืองสตูลในรูปแบบร่วมสมัย อบอุ่น และโฮมเมด";
  display: block;
  font-size: 1rem;
  line-height: 1.7;
}

.site-footer .footer-grid > div:nth-child(2) h4::after {
  content: "ติดต่อ";
  display: block;
  font-size: 1rem;
}

.site-footer .footer-grid > div:nth-child(3) h4::after {
  content: "ที่อยู่";
  display: block;
  font-size: 1rem;
}

.site-footer .footer-grid > div:nth-child(3) p:first-of-type::after {
  content: "120 หมู่ 10 ตำบลกำแพง";
  display: block;
  font-size: 1rem;
  line-height: 1.7;
}

.site-footer .footer-grid > div:nth-child(3) p:last-of-type::after {
  content: "อำเภอละงู จังหวัดสตูล 91110";
  display: block;
  font-size: 1rem;
  line-height: 1.7;
}

.shop-hero-inner {
  padding: 56px 48px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(244, 232, 219, 0.92), transparent 26%),
    radial-gradient(circle at bottom left, rgba(231, 160, 137, 0.12), transparent 22%),
    var(--hero);
  text-align: center;
}

.shop-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shop-hero h1,
.sidebar-card h2,
.filter-group h3,
.product-page-card h3 {
  font-family: "Mitr", sans-serif;
  font-weight: 400;
}

.shop-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
}

.shop-hero p:last-child {
  width: min(620px, 100%);
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.04rem;
}

.shop-section {
  padding-top: 22px;
  padding-bottom: 76px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.shop-sidebar {
  position: sticky;
  top: 102px;
  display: grid;
  gap: 18px;
}

.sidebar-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.sidebar-head h2 {
  font-size: 1.45rem;
}

.clear-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.filter-group + .filter-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.filter-group h3 {
  margin-bottom: 14px;
  font-size: 1.12rem;
}

.filter-list {
  display: grid;
  gap: 10px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.filter-check input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid #bda996;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.category-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.category-option label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.category-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid #bda996;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.filter-check input:checked,
.category-option input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.filter-check input:checked::after,
.category-option input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 1px;
  background: #fff;
}

.category-option small {
  color: var(--accent);
  font-weight: 700;
}

.range-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.sidebar-note h3 {
  margin-bottom: 8px;
  font-family: "Mitr", sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
}

.sidebar-note p:last-child {
  color: var(--muted);
}

.shop-content {
  display: grid;
  gap: 20px;
  overflow: visible;
}

.shop-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-strong);
  overflow: visible;
}

.shop-toolbar > :first-child {
  min-width: 0;
}

.shop-toolbar-label {
  margin-bottom: 2px;
  color: var(--muted);
  letter-spacing: 0.02em;
  font-size: 0.88rem;
}

.shop-toolbar strong {
  display: block;
  line-height: 1.25;
  font-size: 1.02rem;
}

.shop-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  min-height: 42px;
}

.active-filters:empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
}

.filter-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
}

.sort-box {
  position: relative;
  display: block;
  min-width: 172px;
  margin-left: auto;
  z-index: 30;
}

.sort-box > span {
  display: none;
}

.sort-box select {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  outline: none;
  font-size: 0.96rem;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(47, 36, 29, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.sort-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.sort-trigger {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(47, 36, 29, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.sort-trigger:hover {
  background: #fff;
  border-color: #dfcfbf;
}

.custom-sort-box.is-open .sort-trigger {
  border-color: #cfb297;
  box-shadow: 0 0 0 4px rgba(140, 90, 60, 0.08);
}

.sort-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  transition: transform 0.24s cubic-bezier(0.25, 1, 0.5, 1);
}

.custom-sort-box.is-open .sort-trigger svg {
  transform: rotate(180deg);
}

.sort-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 12;
  min-width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 40px rgba(47, 36, 29, 0.12);
  display: grid;
  gap: 4px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.24s cubic-bezier(0.25, 1, 0.5, 1);
}

.custom-sort-box.is-open .sort-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sort-option {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.sort-option:hover {
  background: rgba(244, 232, 219, 0.8);
}

.sort-option.is-selected {
  background: var(--accent);
  color: #fff;
}

.sort-box select:hover {
  background: #fff;
  border-color: #dfcfbf;
}

.sort-box select:focus {
  border-color: #cfb297;
  box-shadow: 0 0 0 4px rgba(140, 90, 60, 0.08);
}

.product-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product-page-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.product-page-media {
  position: relative;
  flex: 0 0 280px;
  height: 280px;
  padding: 14px;
}

.product-favorite-button {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.product-favorite-button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.product-page-media img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
}

.product-badge {
  position: absolute;
  top: 28px;
  left: 28px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(112, 122, 88, 0.94);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.product-badge.sold-out {
  background: rgba(143, 109, 63, 0.92);
}

.product-page-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 16px 16px;
}

.product-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-category-tag {
  color: var(--accent);
  font-weight: 600;
}

.product-rating {
  color: #b88b2e;
  font-weight: 700;
}

.product-page-card h3 {
  min-height: 2.7em;
  margin-bottom: 6px;
  font-size: 1.18rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-page-card p {
  min-height: 4.8em;
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.product-price {
  color: var(--accent-dark);
  font-size: 1.18rem;
  font-weight: 800;
}

.product-compare {
  color: #b9aa9b;
  text-decoration: line-through;
}

.product-page-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.product-page-actions button,
.product-page-actions a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: center;
  line-height: 1.35;
}

.product-page-actions .product-order-now {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-color: transparent;
}

.product-page-actions button,
.product-page-actions a {
  background: #fff;
  color: var(--text);
}

.product-page-actions .product-order-now:disabled {
  background: #c9b7a6;
  color: rgba(255, 255, 255, 0.95);
  cursor: not-allowed;
}

.product-empty {
  padding: 56px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  text-align: center;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 8px;
}

.page-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.page-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.shop-benefits {
  padding: 0 0 82px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.benefit-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.88);
}

.benefit-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Mitr", sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
}

.benefit-card p {
  color: var(--muted);
}

@media (max-width: 1080px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: static;
  }

  .product-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-toolbar {
    flex-direction: column;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .shop-toolbar-actions {
    width: 100%;
    justify-content: space-between;
    align-items: flex-end;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .product-nav,
  .shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-hero {
    padding-top: 42px;
  }

  .shop-hero-inner,
  .sidebar-card,
  .shop-toolbar {
    padding: 22px 18px;
  }

  .product-page-grid {
    grid-template-columns: 1fr;
  }

  .shop-toolbar-actions,
  .active-filters {
    width: 100%;
    justify-content: flex-start;
  }

  .sort-box {
    width: 100%;
  }

  .sort-box select {
    width: 100%;
  }
}

body,
button,
input,
select,
textarea,
p,
span,
a,
label,
small,
li {
  font-family: "Kanit", sans-serif !important;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Kanit", sans-serif !important;
  font-weight: 600 !important;
}

.product-cart-empty,
.product-cart-item,
.product-cart-item img,
.shop-hero-inner,
.sidebar-card,
.shop-toolbar,
.sort-dropdown,
.sort-option,
.product-page-card,
.product-page-media img,
.product-empty,
.benefit-card {
  border-radius: 8px;
}

/* Reduce shop page font weight by one level. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500 !important;
}

strong,
b {
  font-weight: 600;
}

.product-announcement-bar a,
.shop-kicker,
.filter-chip,
.sort-trigger,
.product-category-tag,
.product-page-actions .product-order-now {
  font-weight: 500;
}

.category-option small,
.product-badge,
.product-rating,
.product-price {
  font-weight: 600;
}
