﻿/* ==========================================================================
   tec-stockV2 โ€” Design System
   Cloned from shoop.v3-tecstock.com (yuedpao-style)
   ========================================================================== */

/* โ”€โ”€ Google Fonts โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@500;700&display=swap');

/* โ”€โ”€ CSS Variables โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
:root {
  --shop-header-sticky-offset: calc(7rem + env(safe-area-inset-top, 0px));
  --content-max: 1288px;
  --color-footer: #F7F7F7;
  --color-muted: #4D4D4D;
  --color-copyright: #ACACAC;
  --shop-free-frame: #F2C200;
  --shop-free-burst: #FFE566;
}

@media (min-width: 1025px) {
  :root {
    --shop-header-sticky-offset: calc(8.5rem + env(safe-area-inset-top, 0px));
  }
}

/* โ”€โ”€ Base โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: var(--shop-header-sticky-offset);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  background: #fff;
  font-family: 'Noto Sans Thai', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.55;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  body { font-size: 14px; line-height: 1.6; }
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: normal;
  color: #000;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button {
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
input, button, select, textarea { font-family: inherit; }
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

/* โ”€โ”€ Layout Containers โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.tec-container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: var(--content-max);
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .tec-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 767px) {
  .tec-container { padding-left: 1.25rem; padding-right: 1.25rem; }
}

.tec-hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tec-hide-scrollbar::-webkit-scrollbar { display: none; }

/* โ”€โ”€ Header โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.shop-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding-top: env(safe-area-inset-top, 0px);
}

/* Mobile top bar โ€” hamburger | logo | actions */
.shop-header__mobile {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem;
  height: 3rem;
}

.shop-header__mobile-start {
  display: flex;
  justify-content: flex-start;
}

.shop-header__mobile-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.125rem;
}

/* Desktop top bar */
.shop-header__desktop {
  display: none;
}

.shop-header__desktop-start {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 1.25rem;
}

.shop-header__desktop-end {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 1025px) {
  .shop-header__mobile {
    display: none;
  }

  .shop-header__desktop {
    display: flex;
    height: 4.5rem;
    width: 100%;
    align-items: center;
    justify-content: space-between;
  }
}

.shop-header-brand-link {
  display: flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  justify-self: center;
}

.shop-header-brand-link__text {
  display: block;
  max-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
}

.shop-header__icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Brand / Logo */
.shop-brand-logo {
  font-family: 'Noto Sans Thai', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #000;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (min-width: 1025px) {
  .shop-brand-logo {
    font-size: 1.5rem;
    letter-spacing: 0.08em;
  }
}

/* Mobile utility toolbar */
.header-mobile-toolbar {
  padding-bottom: 0.5rem;
}

@media (min-width: 1025px) {
  .header-mobile-toolbar {
    display: none;
  }
}

/* Desktop utility tabs */
.shop-header__utility-desktop {
  display: none;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
}

.shop-header__utility-inner {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 1025px) {
  .shop-header__utility-desktop {
    display: block;
  }
}

/* Category bar โ€” horizontal pills below utility tabs (shoop) */
.header-category-bar {
  display: none;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 0.5rem;
}

.header-category-bar.is-open {
  display: block;
}

.header-category-bar__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.header-category-bar__nav {
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: 0.5rem;
  padding-right: 0.25rem;
}

@media (min-width: 1025px) {
  .header-category-bar__nav {
    gap: 1.5rem;
  }
}

.header-utility-nav--mobile-bar .category-bar-toggle {
  width: 100%;
}

/* Search */
.header-search { position: relative; flex: 1; min-width: 0; }

.shop-header-search {
  display: block;
  height: 2.5rem;
  width: 100%;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #F2F2F2;
  padding-left: 2.5rem;
  padding-right: 1rem;
  font-size: 15px;
  font-weight: 500;
  color: #000;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.shop-header-search::placeholder {
  font-weight: 400;
  color: rgba(0,0,0,0.45);
}

.shop-header-search:focus {
  border-color: rgba(0,0,0,0.15);
  background: #EBEBEB;
}

@media (max-width: 767px) {
  .shop-header-search { height: 2.25rem; font-size: 0.875rem; }
}

.header-search__icon {
  pointer-events: none;
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(0,0,0,0.4);
}

/* Search results panel */
.header-search__panel {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  z-index: 80;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  display: none;
}

.header-search__panel.is-open { display: block; }

.header-search__panel-title {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #000;
}

.header-search__list {
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

.header-search__option {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  background: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.35;
  color: rgba(0,0,0,0.85);
  transition: background 0.1s;
  text-decoration: none;
  cursor: pointer;
}

.header-search__option:last-child { border-bottom: 0; }
.header-search__option:hover { background: rgba(0,0,0,0.03); }

.header-search__empty {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: rgba(0,0,0,0.45);
}

/* Icon buttons */
.shop-icon-btn {
  position: relative;
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  min-height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: rgba(0,0,0,0.55);
  border: 0;
  background: transparent;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.shop-icon-btn:hover { background: rgba(0,0,0,0.04); }
.shop-icon-btn:active { background: rgba(0,0,0,0.08); }

.shop-icon-btn svg { width: 1.5rem; height: 1.5rem; }

.shop-icon-btn--favorites-active {
  color: #dc2626;
}

.shop-icon-btn--favorites-active:hover {
  background: rgba(220, 38, 38, 0.08);
}

.shop-favorites-badge {
  position: absolute;
  top: 0.125rem;
  right: 0.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
}

.shop-logout-form {
  margin: 0;
  display: inline-flex;
}

.shop-login-btn--logged-in {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Login button */
.shop-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.2);
  background: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #000;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-login-btn:hover { background: rgba(0,0,0,0.03); }

/* Utility nav โ€” matches shoop header tabs */
.header-utility-nav {
  display: flex;
  width: max-content;
  min-width: 100%;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 1025px) {
  .header-utility-nav {
    gap: 1.25rem;
  }
}

.header-utility-nav.header-utility-nav--mobile-bar {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 0 0.125rem;
}

.header-utility-nav--mobile-bar .header-utility-nav__link {
  display: flex;
  min-height: 2.75rem;
  min-width: 0;
  align-items: center;
  justify-content: center;
  white-space: normal;
  overflow-wrap: break-word;
  padding: 0.25rem 0.125rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.375;
  color: rgba(0,0,0,0.85);
}

.header-utility-nav--mobile-bar .header-utility-nav__link--active {
  font-weight: 700;
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.header-utility-nav__link {
  font-size: 12px;
}

@media (min-width: 1025px) {
  .header-utility-nav__link {
    font-size: 13px;
  }
}

.shop-nav-link {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  color: #333;
  transition: color 0.15s;
  border: 0;
  background: transparent;
  padding: 0;
}

@media (min-width: 1025px) {
  .shop-nav-link {
    font-size: 0.875rem;
    line-height: 22px;
  }
}

.shop-nav-link:hover { color: #000; }

.shop-nav-link--btn {
  cursor: pointer;
}

.shop-nav-link--pill {
  border-radius: 9999px;
  padding: 0.5rem 0.875rem;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .shop-nav-link--pill:not(.shop-nav-link--active) {
    background: #f3f3f3;
    color: rgba(0,0,0,0.75);
    text-decoration: none;
  }

  .shop-nav-link--pill.shop-nav-link--active {
    background: #000;
    color: #fff;
    text-decoration: none;
  }
}

@media (min-width: 1025px) {
  .shop-nav-link--pill {
    border-radius: 0;
    background: transparent;
    padding: 0;
    font-size: 13px;
    line-height: 20px;
  }
}

.shop-nav-link--active,
.header-utility-nav__link--active {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Category button */
.shop-category-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  transition: color 0.15s;
  border: 0;
  background: transparent;
  padding: 0;
}

/* โ”€โ”€ Category Drawer (mobile) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.category-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  height: 100%;
  min-height: -webkit-fill-available;
}

.category-drawer-root.is-open {
  display: block;
  -webkit-overflow-scrolling: touch;
}

.category-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 100%;
}

.category-drawer {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  height: -webkit-fill-available;
  width: min(100%, 300px);
  max-width: 85vw;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  -webkit-transform: translate3d(-100%, 0, 0);
  transform: translate3d(-100%, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: -webkit-transform 0.25s ease, transform 0.25s ease;
}

.category-drawer-root.is-open .category-drawer {
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.category-drawer__header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0.75rem 1rem;
}

.category-drawer__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
}

.category-drawer__close {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: rgba(0,0,0,0.7);
  border: 0;
  background: transparent;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.category-drawer__close:hover { background: rgba(0,0,0,0.05); }

.category-drawer__list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.category-drawer__row-wrap {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.category-drawer__row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: #000;
  transition: background 0.1s;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.category-drawer__row:hover { background: rgba(0,0,0,0.03); }
.category-drawer__row--active { background: rgba(0,0,0,0.04); }

.category-drawer__chevron {
  flex-shrink: 0;
  color: rgba(0,0,0,0.35);
  transition: transform 0.15s ease;
}

.category-drawer__item.is-expanded .category-drawer__chevron {
  transform: rotate(90deg);
}

.category-drawer__sizes-panel {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fafafa;
  padding: 0.75rem 1rem;
}

.category-drawer__sizes-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(0,0,0,0.55);
}

.category-drawer__sizes-empty {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(0,0,0,0.4);
}

.category-drawer__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shop-category-size-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(0,0,0,0.7);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.shop-category-size-chip:hover {
  border-color: rgba(0,0,0,0.25);
  color: #000;
}

.shop-category-size-chip--active {
  border-color: #000;
  background: #000;
  color: #fff;
}

.shop-category-size-chip--active:hover {
  border-color: #000;
  color: #fff;
}

/* โ”€โ”€ Product Grid โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.category-product-grid {
  display: grid;
  list-style: none;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
  row-gap: 1.5rem;
  padding: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .category-product-grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 2rem;
  }
}

@media (min-width: 1025px) {
  .category-product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-product-grid > li {
  min-width: 0;
  overflow: visible;
}

/* โ”€โ”€ Product Card โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.product-grid-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.product-grid-card:hover { color: inherit; }

.product-grid-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.625rem;
  background: #f5f5f5;
}

@media (max-width: 767px) {
  .product-grid-card__media { border-radius: 0.75rem; }
}

.product-card__img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.3s ease;
}

.product-grid-card:hover .product-card__img {
  transform: scale(1.01);
}

/* Sold state */
.product-card--sold {
  /* no filter/dimming โ€” just the stamp overlay */
}

.product-sold-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.product-sold-stamp {
  margin: 0;
  transform: rotate(-12deg);
  border: 3px solid rgba(255,255,255,0.95);
  background: #b91c1c;
  padding: 0.45rem 0.85rem;
  font-size: clamp(1rem, 5.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.25);
  white-space: nowrap;
}

.product-card-link--sold { cursor: default; }

/* Card footer */
.product-card__footer {
  margin-top: 0.375rem;
  min-width: 0;
}

.product-card__footer > * + * { margin-top: 0.25rem; }

.product-card__terms-line {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(0,0,0,0.6);
}

.product-card__terms-line--sale { color: rgba(153,27,27,0.75); }
.product-card__terms-line--free { color: rgba(120,83,15,0.75); }

.product-card__sku-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* SKU typography */
.tec-text-product-sku {
  margin-top: 0.375rem;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  color: #000;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

@media (min-width: 768px) {
  .tec-text-product-sku { font-size: 28px; }
}

@media (max-width: 767px) {
  .tec-text-product-sku {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
}

.product-availability {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(0,0,0,0.7);
}

.tec-text-product-price {
  margin-top: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
}

@media (min-width: 768px) {
  .tec-text-product-price { font-size: 1.125rem; }
}

@media (max-width: 767px) {
  .tec-text-product-price { font-size: 0.875rem; }
}

/* โ”€โ”€ Promo Chrome (Free/Sale frames) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
@keyframes product-free-frame-blink {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(227,168,0,0.38), 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.55);
  }
  50% {
    box-shadow: 0 8px 26px rgba(255,210,50,0.62), 0 2px 6px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.7);
  }
}

@keyframes product-free-burst-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(1.08); }
}

@keyframes product-sale-frame-blink {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(185,28,28,0.55), 0 2px 4px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.25);
  }
  50% {
    box-shadow: 0 8px 26px rgba(220,38,38,0.72), 0 2px 6px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.3);
  }
}

@keyframes product-sale-burst-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.08); }
}

.product-card-link--free {
  position: relative;
  z-index: 10;
  overflow: visible;
}
.product-card-link--free:hover { z-index: 30; }

.product-card-link--sale {
  position: relative;
  z-index: 10;
  overflow: visible;
}
.product-card-link--sale:hover { z-index: 30; }

.product-card--free {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 5px;
  border-radius: 0.625rem;
  overflow: visible;
  background: linear-gradient(145deg, #fff4a8 0%, #ffd84d 38%, #f5c400 72%, #e3a800 100%);
  animation: product-free-frame-blink 1.4s ease-in-out infinite;
}

.product-card-link--free:hover .product-card--free {
  animation-play-state: paused;
}

.product-card--sale {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 5px;
  border-radius: 0.625rem;
  overflow: visible;
  background: linear-gradient(145deg, #ef4444 0%, #dc2626 35%, #b91c1c 70%, #991b1b 100%);
  animation: product-sale-frame-blink 1.4s ease-in-out infinite;
}

.product-card-link--sale:hover .product-card--sale {
  animation-play-state: paused;
}

.product-card--promo__stack {
  --promo-burst-size: clamp(3.5rem, 20%, 4.75rem);
  --promo-burst-show: 0.3;
  --promo-burst-top: -0.55rem;
  position: relative;
  height: 100%;
  width: 100%;
}

.product-card--free__inner,
.product-card--sale__inner {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 0;
  top: calc(var(--promo-burst-top) + var(--promo-burst-size) * (1 - var(--promo-burst-show)));
  overflow: hidden;
  border-radius: 0.4rem;
  background: #f5f5f5;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.product-free-burst,
.product-sale-burst {
  pointer-events: none;
  position: absolute;
  top: var(--promo-burst-top);
  right: 0.15rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--promo-burst-size);
  height: var(--promo-burst-size);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.22));
}

.product-free-burst {
  animation: product-free-burst-blink 1.1s ease-in-out infinite;
}

.product-free-burst__svg,
.product-sale-burst__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.product-free-burst__label {
  position: relative;
  z-index: 2;
  transform: rotate(-10deg);
  font-size: clamp(0.95rem, 5.5vw, 1.15rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #111;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

.product-sale-burst {
  animation: product-sale-burst-blink 1.1s ease-in-out infinite;
}

.product-sale-burst__label {
  position: relative;
  z-index: 2;
  transform: rotate(-10deg);
  max-width: 88%;
  text-align: center;
  font-size: clamp(0.7rem, 4.2vw, 0.95rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(127,29,29,0.55);
}

.product-sale-promo-label {
  --sale-promo-header-h: calc(max(0px, var(--promo-burst-top)) + var(--promo-burst-size) * (1 - var(--promo-burst-show)) + 0.4rem);
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--sale-promo-header-h);
  padding: 0 calc(var(--promo-burst-size) * 0.45) 0 0.25rem;
  font-size: clamp(1.05rem, 7.5vw, 1.55rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #fff;
  text-align: center; 
  text-shadow: 0 2px 4px rgba(69,10,10,0.55), 0 0 12px rgba(0,0,0,0.15);
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .product-card--free,
  .product-free-burst,
  .product-card--sale,
  .product-sale-burst {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card--free,
  .product-free-burst,
  .product-card--sale,
  .product-sale-burst {
    animation: none;
  }
}

/* Starburst shape (SVG path decorations rendered in JS) */
.product-free-burst__shape,
.product-sale-burst__shape { display: none; }

/* โ”€โ”€ Save image button โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.product-card__save-row {
  display: flex;
  justify-content: flex-end;
}

.product-favorite-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.product-favorite-btn:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

.product-favorite-btn:active {
  transform: scale(0.96);
}

.product-favorite-btn--active {
  color: #dc2626;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.product-favorite-btn--active:hover {
  color: #b91c1c;
}

.product-favorite-btn__icon {
  width: 1.25rem;
  height: 1.25rem;
}

.product-save-image-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #171717;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,0.08);
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}

.product-save-image-btn:hover { background: #ebebeb; transform: scale(1.04); }
.product-save-image-btn:active { transform: scale(0.97); }
.product-save-image-btn svg { width: 0.875rem; height: 0.875rem; }

/* โ”€โ”€ Section Title โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.tec-text-section-title {
  display: inline-block;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #000;
  background:
    linear-gradient(#fffef8, #ffffff) padding-box,
    linear-gradient(120deg, #f5c400 0%, #fb923c 32%, #60a5fa 66%, #34d399 100%) border-box;
  border: 2px solid transparent;
  box-shadow: 0 4px 16px rgba(245,196,0,0.14), 0 1px 0 rgba(255,255,255,0.9) inset;
}

@media (min-width: 1025px) {
  .tec-text-section-title { padding: 0.75rem 1.25rem; font-size: 30px; }
}

@media (max-width: 767px) {
  .tec-text-section-title {
    padding: 0.375rem 0.75rem;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: normal;
    border-width: 1.5px;
    box-shadow: 0 2px 12px rgba(245,196,0,0.12);
  }
}

/* โ”€โ”€ Product Row (homepage) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.product-row {
  overflow: hidden;
  width: 100%;
}

.product-row__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .product-row__header { margin-bottom: 1.25rem; }
}

.product-row__title-link {
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.product-row__title-link:hover { opacity: 0.75; }

.product-row__see-all {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(0,0,0,0.7);
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
}

.product-row__see-all:hover { color: #000; }

/* Mobile grid */
.product-row__grid--mobile {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-row__grid-item {
  min-width: 0;
}

@media (min-width: 768px) {
  .product-row__grid--mobile { display: none; }
}

/* Tablet+ horizontal scroll */
.product-row__scroll-wrap {
  display: none;
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .product-row__scroll-wrap { display: block; }
}

.product-row__track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
  list-style: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1025px) {
  .product-row__track { gap: 1rem; }
}

/* Tablet: ~3.5 cards visible โ€” scroll for more */
.product-row__item {
  flex: 0 0 calc((100% - 2.25rem) / 3.5);
  min-width: 175px;
  scroll-snap-align: start;
  overflow: visible;
}

@media (min-width: 900px) {
  .product-row__item {
    flex: 0 0 calc((100% - 3rem) / 4);
    min-width: 190px;
  }
}

/* Desktop: 5 cards fill full row width (like reference) */
@media (min-width: 1025px) {
  .product-row__item {
    flex: 0 0 calc((100% - 4rem) / 5);
    min-width: 0;
  }
}

/* Homepage row โ€” SKU readable but compact */
.product-row .product-card__sku,
.product-row .tec-text-product-sku {
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

@media (min-width: 1025px) {
  .product-row .product-card__sku,
  .product-row .tec-text-product-sku {
    font-size: clamp(1.25rem, 1.75vw, 1.75rem);
  }
}

.product-row .product-availability {
  font-size: 0.8125rem;
}

.product-row .product-card__footer {
  margin-top: 0.5rem;
}

.product-row-scroll-btn {
  position: absolute;
  top: 38%;
  z-index: 10;
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: rgba(255,255,255,0.6);
  color: rgba(0,0,0,0.7);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.product-row-scroll-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.product-row-scroll-btn--left { left: -0.25rem; }
.product-row-scroll-btn--right { right: -0.25rem; }

.product-row-scroll-btn[hidden] { display: none !important; }

/* โ”€โ”€ Category Browse Layout โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.category-browse-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

@media (min-width: 1025px) {
  .category-browse-layout {
    flex-direction: row;
    gap: 2.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

.category-browse-sidebar {
  display: none;
}

@media (min-width: 1025px) {
  .category-browse-sidebar {
    display: block;
    width: 220px;
    max-width: 28%;
    flex-shrink: 0;
  }
}

.category-browse-sidebar__section {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0.75rem 0;
}

.category-browse-sidebar__section-toggle {
  display: flex;
  min-height: 44px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  cursor: pointer;
}

.category-browse-sidebar__chevron {
  flex-shrink: 0;
  color: rgba(0,0,0,0.4);
  transition: transform 0.15s ease;
}

.category-browse-sidebar__section-toggle.is-collapsed .category-browse-sidebar__chevron {
  transform: rotate(180deg);
}

.category-browse-sidebar__section-body {
  padding-top: 0.75rem;
}

.category-browse-sidebar__active {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(0,0,0,0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-browse-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
}

@media (min-width: 1025px) {
  .category-browse-sidebar__list {
    max-height: min(50vh, 420px);
  }
}

.category-browse-sidebar__list > li + li {
  margin-top: 0.125rem;
}

.category-browse-sidebar__link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: rgba(0,0,0,0.75);
  transition: background 0.1s, color 0.1s;
  text-decoration: none;
}

.category-browse-sidebar__link-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-browse-sidebar__link:hover { background: rgba(0,0,0,0.04); color: #000; }
.category-browse-sidebar__link--active { background: rgba(0,0,0,0.04); font-weight: 600; color: #000; }

@media (min-width: 1025px) {
  .category-browse-sidebar__link {
    min-height: 0;
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}

.category-browse-sidebar__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (min-width: 1025px) {
  .category-browse-sidebar__sizes {
    gap: 0.375rem;
  }

  .category-browse-sidebar__sizes .shop-category-size-chip {
    min-height: 0;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
  }
}

.category-browse-main {
  min-width: 0;
  flex: 1;
}

.category-browse-main__header {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: 1rem;
}

.category-browse-main__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
}

@media (min-width: 768px) {
  .category-browse-main__title { font-size: 1.5rem; }
}

.category-browse-main__count {
  margin: 0.5rem 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(0,0,0,0.45);
}

/* โ”€โ”€ Pagination โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.category-pagination {
  margin-top: 2.5rem;
  display: flex;
  width: 100%;
  justify-content: center;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.category-pagination__track {
  display: inline-flex;
  max-width: 100%;
  flex-nowrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.category-pagination__track::-webkit-scrollbar { display: none; }

.category-pagination__btn {
  display: inline-flex;
  height: 2.25rem;
  width: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(0,0,0,0.7);
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
  cursor: pointer;
}

.category-pagination__btn:hover { border-color: rgba(0,0,0,0.2); color: #000; }

.category-pagination__btn--disabled {
  pointer-events: none;
  border-color: rgba(0,0,0,0.06);
  background: #fafafa;
  color: rgba(0,0,0,0.25);
}

.category-pagination__page { min-width: 2.25rem; padding-left: 0.5rem; padding-right: 0.5rem; }

.category-pagination__page--active {
  border-color: #000;
  background: #000;
  color: #fff;
}
.category-pagination__page--active:hover { border-color: #000; color: #fff; }

.category-pagination__ellipsis {
  display: inline-flex;
  height: 2.25rem;
  min-width: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding-left: 0.125rem;
  padding-right: 0.125rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(0,0,0,0.35);
}

/* Hero carousel styles live in home.css (homepage only) */

/* โ”€โ”€ Product Detail โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.product-detail {
  max-width: 1120px;
}

.product-detail__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1025px) {
  .product-detail__layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
  }
}

.product-detail__media-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  background: #f5f5f5;
}

.product-detail__media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-detail__panel {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fafafa;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.product-detail__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  padding: 1.25rem;
}

@media (min-width: 1025px) {
  .product-detail__panel-head { padding: 1.5rem; }
}

.product-detail__panel-body {
  padding: 1.25rem;
}

@media (min-width: 1025px) {
  .product-detail__panel-body { padding: 1.5rem; }
}

.product-detail__badge {
  display: inline-flex;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.product-detail__badge--sold { background: #b91c1c; color: #fff; }
.product-detail__badge--free { background: #f5c400; color: #000; }
.product-detail__badge--sale { background: #dc2626; color: #fff; }
.product-detail__badge--available { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.product-detail__sku {
  font-family: ui-monospace, monospace;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #000;
}

@media (max-width: 767px) {
  .product-detail__sku { font-size: 1.5rem; }
}

.product-detail__price {
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #000;
}

@media (min-width: 768px) {
  .product-detail__price { font-size: 1.875rem; }
}

.product-detail__specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.product-detail__spec {
  display: grid;
  grid-template-columns: minmax(0, 6.5rem) 1fr;
  align-items: baseline;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.05);
  background: #fff;
  padding: 0.875rem 1rem;
}

.product-detail__spec dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0,0,0,0.45);
}

.product-detail__spec dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #000;
}

.product-detail__spec--highlight {
  border-color: rgba(245,196,0,0.4);
  background: #fffbeb;
}

.product-detail__spec--highlight dd {
  font-size: 1.125rem;
  font-weight: 800;
}

.product-detail__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(0,0,0,0.45);
  margin-bottom: 1.25rem;
}

@media (min-width: 1025px) {
  .product-detail__breadcrumb { font-size: 0.875rem; margin-bottom: 2rem; }
}

.product-detail__crumb { transition: color 0.15s; text-decoration: none; color: rgba(0,0,0,0.45); }
.product-detail__crumb:hover { color: #000; }
.product-detail__crumb--current { color: rgba(0,0,0,0.7); }

/* โ”€โ”€ Related Products โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.product-detail__related {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 2.5rem;
}

@media (min-width: 1025px) {
  .product-detail__related { margin-top: 3.5rem; padding-top: 3rem; }
}

/* โ”€โ”€ Search Page โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.search-hero {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

.search-hero__form {
  position: relative;
  max-width: 560px;
}

.search-hero__input {
  display: block;
  height: 3rem;
  width: 100%;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #f5f5f5;
  padding-left: 3rem;
  padding-right: 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: #000;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.search-hero__input:focus { border-color: rgba(0,0,0,0.2); background: #efefef; }
.search-hero__input::placeholder { font-weight: 400; color: rgba(0,0,0,0.4); }

.search-hero__icon {
  pointer-events: none;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: rgba(0,0,0,0.4);
}

/* โ”€โ”€ Badges โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge--sale { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge--free { background: #fffbeb; color: #78350f; border: 1px solid #fde68a; }
.badge--avail { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.badge--sold { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; }

/* โ”€โ”€ Misc โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.flex-center { display: flex; align-items: center; justify-content: center; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.min-h-screen {
  min-height: 100vh;
  min-height: 100dvh;
}

.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  width: 100%;
  max-width: 100%;
  background: #fff;
  /* ไม่ใส่ overflow-x — Safari จะทำให้ position:sticky ใน header พัง */
}

.grow {
  flex: 1 0 auto;
  min-width: 0;
  min-height: 0;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 0.5rem;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1.5rem;
  text-align: center;
  border-radius: 1rem;
  border: 1px dashed rgba(0,0,0,0.15);
  background: #fff;
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}

.empty-state__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.5rem;
}

.empty-state__body {
  font-size: 0.875rem;
  color: rgba(0,0,0,0.55);
}

/* โ”€โ”€ Mobile filter pills โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.mobile-filter-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 0 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.mobile-filter-bar::-webkit-scrollbar { display: none; }

@media (min-width: 1025px) { .mobile-filter-bar { display: none; } }

.filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(0,0,0,0.7);
  white-space: nowrap;
  transition: all 0.15s;
  text-decoration: none;
  cursor: pointer;
}

.filter-chip:hover { border-color: rgba(0,0,0,0.2); color: #000; }
.filter-chip--active { border-color: #000; background: #000; color: #fff; }
.filter-chip--active:hover { border-color: #000; color: #fff; }

/* ==========================================================================
   Mobile / Safari / Cross-browser fixes
   ========================================================================== */

[hidden] {
  display: none !important;
}

/* Safari: sticky ต้องมี prefix และ ancestor ห้ามมี overflow ซ่อน */
.shop-header {
  position: -webkit-sticky;
  position: sticky;
}

/* Flex/grid ลูกที่ truncate — Safari ต้องมี min-width:0 */
.shop-header-brand-link,
.shop-header__mobile,
.shop-header__desktop,
.header-utility-nav,
.header-category-bar__nav,
.category-browse-sidebar__link-text,
.product-grid-card,
.category-browse-main,
.product-row__track {
  min-width: 0;
}

/* clip-path ดาวรีวิว — WebKit ต้องการ prefix */
.review-star__fill {
  -webkit-clip-path: inset(0 calc((1 - var(--star-fill, 0)) * 100%) 0 0);
}

/* ล็อกสกอร์ลเมื่อเปิด drawer (iOS Safari) */
html.is-scroll-locked,
body.is-scroll-locked {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

body.is-scroll-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

/* Prevent iOS Safari auto-zoom on inputs */
@media (max-width: 1024px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* Product card square fallback */
@supports not (aspect-ratio: 1 / 1) {
  .product-grid-card__media::before,
  .product-card--free::before,
  .product-card--sale::before {
    content: '';
    display: block;
    padding-top: 100%;
  }

  .product-grid-card__media > div,
  .product-card--free__inner,
  .product-card--sale__inner {
    position: absolute;
    inset: 0;
  }

  .product-grid-card__media,
  .product-card--free,
  .product-card--sale {
    position: relative;
  }
}

/* Drawer โ€” iOS safe area + smooth scroll */
.category-drawer {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.category-drawer__list {
  -webkit-overflow-scrolling: touch;
}

.category-drawer-root.is-open {
  touch-action: none;
}

/* Horizontal scroll rows โ€” touch friendly */
.product-row__track,
.mobile-filter-bar,
.header-utility-nav {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.product-row__grid--mobile {
  touch-action: manipulation;
}

/* Promo cards โ€” allow starburst overflow without clipping row */
.product-row__item,
.product-row__grid-item {
  overflow: visible;
}

.product-row__grid-item .product-grid-card,
.product-row__item .product-grid-card {
  overflow: visible;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .hero-carousel__track,
  .product-card--free,
  .product-free-burst,
  .product-card--sale,
  .product-sale-burst {
    transition: none !important;
    animation: none !important;
  }
}

/* Fix 100vh on mobile Safari */
@supports (-webkit-touch-callout: none) {
  html {
    height: -webkit-fill-available;
  }

  .page-wrap {
    min-height: -webkit-fill-available;
  }

  .category-drawer-root {
    height: -webkit-fill-available;
  }
}

/* Marquee / carousel — ลดกระตุกบน Safari */
.review-marquee__track--loop,
.hero-carousel__track {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

