.alh1688-page, .alh1688-page *, .alh1688-page *::before, .alh1688-page *::after { box-sizing: border-box; }
.typing-cursor{
  color:#f59e0b;
  animation: blink .8s infinite;
  font-weight: 400 !important;
}
.alh1688-page {
  --alh1688-brand: #ff5b00;
  --alh1688-brand-dark: #e94900;
  --alh1688-brand-soft: #fff2ea;
  --alh1688-brand-pale: #fff8f4;
  --alh1688-text: #222222;
  --alh1688-text-soft: rgba(0, 0, 0, 0.82);
  --alh1688-text-faint: rgba(0, 0, 0, 0.70);
  --alh1688-border: rgba(0, 0, 0, 0.08);
  --alh1688-border-strong: rgba(0, 0, 0, 0.14);
  --alh1688-bg: #f5f6f8;
  --alh1688-card: #ffffff;
  --alh1688-success: #169b62;
  --alh1688-blue: #1677ff;
  --alh1688-radius-small: 8px;
  --alh1688-radius-medium: 12px;
  --alh1688-radius-large: 18px;
  --alh1688-shadow: 0 10px 30px rgba(30, 35, 50, 0.06);
  --alh1688-content-width: 1540px;
  --alh1688-header-height: 72px;
  min-width: 0; min-height: calc(100vh - 80px); background: var(--alh1688-bg);
  color: var(--alh1688-text);
  font-family: "Noto Sans Thai", "Prompt", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5; scroll-behavior: smooth; touch-action: manipulation;
}

.alh1688-page button, .alh1688-page input { font: inherit; }

.alh1688-page button, .alh1688-page a { -webkit-tap-highlight-color: transparent; }

.alh1688-page button { cursor: pointer; }

.alh1688-page img, .alh1688-page video { display: block; max-width: 100%; }

.alh1688-page [hidden] { display: none !important; }

.alh1688-card {
  min-width: 0; background: var(--alh1688-card); border: 1px solid var(--alh1688-border);
  border-radius: var(--alh1688-radius-large); box-shadow: var(--alh1688-shadow);
}

.alh1688-icon {
  width: 20px; height: 20px; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}

.alh1688-button-reset {
  appearance: none; border: 0; background: transparent;
  color: inherit; padding: 0;
}


/* ==================================================================
   02) TOP HEADER + SEARCH
   ================================================================== */

.alh1688-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--alh1688-border); backdrop-filter: blur(16px);
}

.alh1688-header__inner {
  width: min(calc(100% - 32px), var(--alh1688-content-width)); min-height: var(--alh1688-header-height); margin: 0 auto;
  display: grid; grid-template-columns: auto minmax(300px, 760px) auto; align-items: center;
  gap: 22px;
}

.alh1688-brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: max-content; color: var(--alh1688-text); text-decoration: none;
}

.alh1688-brand__mark {
  width: 40px; height: 40px; display: grid;
  place-items: center; border-radius: 13px; background: linear-gradient(145deg, #ff7d35, var(--alh1688-brand));
  color: #ffffff; font-size: 12px; font-weight: 850;
  letter-spacing: -0.4px; box-shadow: 0 8px 18px rgba(255, 91, 0, 0.24);
}

.alh1688-brand__text { display: flex; flex-direction: column; line-height: 1.2; }

.alh1688-brand__text strong { font-size: 15px; }

.alh1688-brand__text small {
  margin-top: 3px; color: var(--alh1688-text-faint); font-size: 14px;
  letter-spacing: 0.4px;
}

.alh1688-search {
  min-width: 0; height: 44px; display: flex;
  align-items: center; gap: 8px; padding: 4px 5px 4px 14px;
  border: 2px solid var(--alh1688-brand); border-radius: 999px; background: #ffffff;
}

.alh1688-search__icon { flex: 0 0 auto; color: var(--alh1688-brand); }

.alh1688-search__input {
  min-width: 0; flex: 1; border: 0;
  outline: 0; background: transparent; color: var(--alh1688-text);
  font-size: 13px;
}

.alh1688-search__input::placeholder { color: var(--alh1688-text-faint); }

.alh1688-search__submit {
  height: 32px; flex: 0 0 auto; padding: 0 17px;
  border: 0; border-radius: 999px; background: linear-gradient(90deg, #ff7a31, var(--alh1688-brand));
  color: #ffffff; font-size: 12px; font-weight: 750;
}

.alh1688-header-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px;
}

.alh1688-header-action {
  width: 38px; height: 38px; display: grid;
  place-items: center; border: 1px solid var(--alh1688-border); border-radius: 12px;
  background: #ffffff; color: var(--alh1688-text-soft);
}

/* ==================================================================
   03) SEARCH VIEW + PAGE STATES
   ไม่มี q แสดงหน้าค้นหา; มี q แสดงรายละเอียดสินค้า
   ================================================================== */

.alh1688-view.is-hidden { display: none !important; }

.alh1688-header-search { min-width: 0; transition: opacity 0.18s ease, visibility 0.18s ease; }

.alh1688-page.is-search-mode .alh1688-header-search { opacity: 0; visibility: hidden; pointer-events: none; }

.alh1688-search-view {
  width: min(calc(100% - 32px), 1120px); min-height: calc(100vh - var(--alh1688-header-height)); margin: 0 auto;
  padding: 72px 0 96px; display: grid; align-content: start;
  justify-items: center;
}

.alh1688-search-hero {
  width: 100%; padding: 46px; position: relative;
  overflow: hidden; text-align: center;
}

.alh1688-search-hero::before, .alh1688-search-hero::after {
  content: ""; position: absolute; border-radius: 50%;
  pointer-events: none;
}

.alh1688-search-hero::before {
  width: 360px; height: 360px; top: -230px;
  right: -130px; background: rgba(255, 91, 0, 0.08);
}

.alh1688-search-hero::after {
  width: 260px; height: 260px; bottom: -180px;
  left: -90px; background: rgba(139, 92, 246, 0.07);
}

.alh1688-search-hero__content {
  max-width: 840px; margin: 0 auto; position: relative;
  z-index: 1;
}

.alh1688-search-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; background: var(--alh1688-brand-soft);
  color: var(--alh1688-brand); font-size: 12px; font-weight: 800;
}

.alh1688-search-hero__title {
  margin: 18px 0 8px; font-size: clamp(28px, 4vw, 46px); line-height: 1.22;
  letter-spacing: -0.02em;
}

.alh1688-search-hero__description {
  max-width: 650px; margin: 0 auto; color: var(--alh1688-text-soft);
  font-size: 15px;
}

.alh1688-market-list {
  margin: 26px 0 18px; display: flex; justify-content: center;
  flex-wrap: wrap; gap: 9px;
}

.alh1688-market-button {
  min-width: 110px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  padding: 0 14px; border: 1px solid var(--alh1688-border); border-radius: 12px;
  background: #ffffff; color: var(--alh1688-text-soft); font-size: 12px;
  font-weight: 750; text-decoration: none; transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.alh1688-market-button:hover { transform: translateY(-1px); border-color: rgba(255, 91, 0, 0.42); color: var(--alh1688-brand); }
.alh1688-price-tier-card__yuan{
  display: inline-block !important; 
}

.alh1688-market-button__mark {
  width: 25px; height: 25px; display: grid;
  place-items: center; border-radius: 8px; background: var(--alh1688-brand-soft);
  color: var(--alh1688-brand); font-size: 14px; font-weight: 900;
}

.alh1688-hero-search {
  max-width: 760px; min-height: 58px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 7px 6px 18px; border: 2px solid var(--alh1688-brand); border-radius: 999px;
  background: #ffffff; box-shadow: 0 16px 38px rgba(255, 91, 0, 0.12);
}

.alh1688-hero-search .alh1688-icon { flex: 0 0 auto; color: var(--alh1688-brand); }

.alh1688-hero-search__input {
  min-width: 0; flex: 1; border: 0;
  outline: 0; background: transparent; color: var(--alh1688-text);
  font-size: 14px;
}

.alh1688-hero-search__clear {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center; border: 0;
  border-radius: 50%; background: transparent; color: var(--alh1688-text-faint);
}

.alh1688-hero-search__clear:hover { background: #f5f5f6; color: var(--alh1688-text); }

.alh1688-hero-search__submit {
  min-width: 135px; height: 44px; flex: 0 0 auto;
  border: 0; border-radius: 999px; background: linear-gradient(100deg, #ff7b35, var(--alh1688-brand));
  color: #ffffff; font-size: 13px; font-weight: 850;
}

.alh1688-search-help {
  margin-top: 18px; display: flex; justify-content: center;
  flex-wrap: wrap; gap: 10px;
}

.alh1688-search-help__button {
  min-height: 38px; display: inline-flex; align-items: center;
  gap: 7px; padding: 0 13px; border: 1px solid var(--alh1688-border);
  border-radius: 10px; background: #ffffff; color: var(--alh1688-text-soft);
  font-size: 14px;
}

.alh1688-search-help__button:hover { border-color: rgba(255, 91, 0, 0.38); color: var(--alh1688-brand); }

.alh1688-demo-note { margin-top: 17px; color: var(--alh1688-text-faint); font-size: 14px; }

.alh1688-breadcrumb__back {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; color: var(--alh1688-brand);
  font-size: inherit; padding: 0;
}

.alh1688-loading-layer {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.alh1688-loading-layer.is-hidden { display: none; }

.alh1688-loading-card {
  width: min(330px, calc(100% - 36px)); padding: 28px 24px; border: 1px solid var(--alh1688-border);
  border-radius: 18px; background: #ffffff; box-shadow: var(--alh1688-shadow);
  text-align: center;
}

.alh1688-loading-spinner {
  width: 38px; height: 38px; margin: 0 auto 13px;
  border: 4px solid var(--alh1688-brand-soft); border-top-color: var(--alh1688-brand); border-radius: 50%;
  animation: alh1688Spin 0.75s linear infinite;
}

.alh1688-loading-card strong { display: block; font-size: 14px; }

.alh1688-loading-card span {
  display: block; margin-top: 5px; color: var(--alh1688-text-faint);
  font-size: 14px;
}

@keyframes alh1688Spin {
  to { transform: rotate(360deg); }
}

/* ==================================================================
   04) PAGE CONTAINER + BREADCRUMB
   ================================================================== */

.alh1688-container { width: min(calc(100% - 32px), var(--alh1688-content-width)); margin: 0 auto; padding: 10px 0 48px; }

.alh1688-breadcrumb {
  margin-bottom: 12px; display: flex; align-items: center;
  gap: 7px; overflow: hidden; color: var(--alh1688-text-faint);
  font-size: 14px; white-space: nowrap;
}

.alh1688-breadcrumb span { overflow: hidden; text-overflow: ellipsis; }

.alh1688-breadcrumb a { font-size: 12px !important; }

/* ==================================================================
   05) MAIN RESPONSIVE LAYOUT
   Desktop: store / gallery / details อยู่ซ้าย, purchase อยู่ขวา แบ่งพื้นที่ 50/50
   Mobile: store → gallery → purchase → details โดยใช้ Grid ไม่ย้าย DOM
   ================================================================== */

.alh1688-product-layout {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "store purchase" "gallery purchase" "details purchase"; align-items: start; gap: 16px;
}

/* ==================================================================
   06) STORE CARD
   ================================================================== */

.alh1688-store-card { grid-area: store; padding: 15px 18px; }

.alh1688-store-card__head { display: flex; align-items: center; gap: 14px; }

.alh1688-store-card__identity { min-width: 0; flex: 1; }

.alh1688-store-card__name {
  margin: 0; overflow: hidden; color: var(--alh1688-text);
  font-size: 18px; font-weight: 750; line-height: 1.35;
  text-overflow: ellipsis; white-space: nowrap;
}

.alh1688-store-card__tags {
  margin-top: 7px; display: flex; flex-wrap: wrap;
  gap: 6px;
}

.alh1688-store-tag {
  min-height: 21px; display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 6px; background: #f6f6f7;
  color: var(--alh1688-text-soft); font-size: 14px; font-weight: 650;
}

.alh1688-store-tag--gold { background: linear-gradient(115deg, #fff0db, #fff8ef); color: #a76a1b; }

.alh1688-store-card__actions { display: flex; align-items: center; gap: 4px; }

.alh1688-store-action {
  min-height: 34px; display: inline-flex; align-items: center;
  gap: 5px; padding: 0 10px; border: 0;
  border-radius: 10px; background: transparent; color: var(--alh1688-text-soft);
  font-size: 14px; font-weight: 650;
}

.alh1688-store-action:hover { background: #f7f7f8; color: var(--alh1688-brand); }

.alh1688-store-action .alh1688-icon { width: 16px; height: 16px; }

.alh1688-store-card__metrics {
  margin-top: 13px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden; border: 1px solid var(--alh1688-border); border-radius: 12px;
  background: #fafafa;
}

.alh1688-store-metric { min-width: 0; padding: 10px 12px; position: relative; }

.alh1688-store-metric + .alh1688-store-metric::before {
  content: ""; width: 1px; position: absolute;
  top: 10px; bottom: 10px; left: 0;
  background: var(--alh1688-border);
}

.alh1688-store-metric span, .alh1688-store-metric strong {
  display: block; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}

.alh1688-store-metric span { color: var(--alh1688-text-faint); font-size: 14px; }

.alh1688-store-metric strong { margin-top: 3px; font-size: 13px; }

/* ==================================================================
   07) PRODUCT GALLERY
   ================================================================== */

.alh1688-gallery-card { grid-area: gallery; padding: 18px; }

.alh1688-gallery-layout {
  display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: start;
  gap: 16px;
}

.alh1688-gallery-thumbs {
  max-height: min(660px, calc(100vh - 132px)); display: flex; flex-direction: column;
  gap: 9px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}

.alh1688-gallery-thumb {
  width: 70px; height: 70px; flex: 0 0 auto;
  padding: 0; position: relative; overflow: hidden;
  border: 1px solid var(--alh1688-border-strong); border-radius: 11px; background: #f7f7f7;
}

.alh1688-gallery-thumb img,
.alh1688-gallery-thumb__video {
  width: 100%; height: 100%; object-fit: cover;
}

.alh1688-gallery-thumb--video {
  background: #111827;
}

.alh1688-gallery-thumb__video {
  pointer-events: none;
}

.alh1688-gallery-thumb__play {
  width: 30px; height: 30px; position: absolute;
  left: 50%; top: 50%; z-index: 2;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.alh1688-gallery-thumb__play .alh1688-icon {
  width: 16px; height: 16px;
  fill: currentColor; stroke: none;
  transform: translateX(1px);
}

.alh1688-gallery-thumb.is-active { border: 2px solid var(--alh1688-brand); box-shadow: 0 0 0 2px rgba(255, 91, 0, 0.10); }

.alh1688-gallery-main {
  width: 100%; aspect-ratio: 1 / 1; position: relative;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 15px;
  background: radial-gradient(circle at 18% 17%, rgba(255, 91, 0, 0.10), transparent 17%), radial-gradient(circle at 83% 84%, rgba(255, 91, 0, 0.08), transparent 20%), #f8f8f8;
  cursor: zoom-in; touch-action: pan-y;
}

.alh1688-gallery-main__image {
  width: 100%; height: 100%; object-fit: contain;
  min-width: 0; min-height: 0;
  user-select: none;
}

.alh1688-gallery-main__video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000000;
  border-radius: inherit;
}

.alh1688-gallery-main.is-video-mode {
  cursor: default;
  touch-action: auto;
}

.alh1688-gallery-main.is-video-mode .alh1688-gallery-hint { display: none; }

.alh1688-gallery-video-play {
  width: clamp(64px, 12vw, 88px); height: clamp(64px, 12vw, 88px);
  position: absolute; top: 50%; left: 50%; z-index: 4;
  display: grid; place-items: center; padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.92); border-radius: 50%;
  background: rgba(0, 0, 0, 0.62); color: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.30);
  transform: translate(-50%, -50%); touch-action: manipulation;
}

.alh1688-gallery-video-play[hidden] { display: none !important; }

.alh1688-gallery-video-play:hover { background: rgba(0, 0, 0, 0.80); }

.alh1688-gallery-video-play:focus-visible { outline: 3px solid var(--alh1688-brand); outline-offset: 4px; }

.alh1688-gallery-video-play .alh1688-icon {
  width: 44%; height: 44%; fill: currentColor; stroke: none;
  transform: translateX(2px);
}

.alh1688-gallery-counter {
  min-width: 48px; height: 28px; position: absolute;
  top: 12px; right: 12px; z-index: 3;
  display: grid; place-items: center; padding: 0 9px;
  border-radius: 999px; background: rgba(0, 0, 0, 0.48); color: #ffffff;
  font-size: 14px; backdrop-filter: blur(8px);
}

.alh1688-gallery-nav {
  width: 44px; height: 64px; position: absolute;
  top: 50%; z-index: 3; display: grid;
  place-items: center; border: 0; background: rgba(0, 0, 0, 0.28);
  color: #ffffff; transform: translateY(-50%); opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.alh1688-gallery-nav:hover { background: rgba(0, 0, 0, 0.52); }

.alh1688-gallery-nav--previous { left: 0; border-radius: 0 10px 10px 0; }

.alh1688-gallery-nav--next { right: 0; border-radius: 10px 0 0 10px; }

.alh1688-gallery-main:hover .alh1688-gallery-nav, .alh1688-gallery-main:focus-within .alh1688-gallery-nav { opacity: 1; }

.alh1688-gallery-hint {
  position: absolute; right: 12px; bottom: 12px;
  padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.82);
  color: var(--alh1688-text-soft); font-size: 14px; backdrop-filter: blur(8px);
}

/* ==================================================================
   08) PURCHASE / SKU PANEL
   ================================================================== */

.alh1688-purchase-column {
  grid-area: purchase; min-width: 0; position: sticky;
  top: calc(var(--alh1688-header-height) + 16px); align-self: start;
}

.alh1688-purchase-card {
  max-height: calc(100vh - var(--alh1688-header-height) - 32px); display: flex; flex-direction: column;
  overflow: hidden;
}

.alh1688-purchase-card__body {
  min-height: 0; padding: 20px 20px 12px; overflow-y: auto;
  scrollbar-width: thin;
}

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

.alh1688-source-badge {
  min-height: 22px; display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px; background: var(--alh1688-brand-soft);
  color: var(--alh1688-brand); font-size: 14px; font-weight: 750;
}

.alh1688-source-status {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--alh1688-text-faint); font-size: 14px;
}

.alh1688-source-status::before {
  content: ""; width: 8px; height: 8px;
  border-radius: 50%; background: var(--alh1688-success); box-shadow: 0 0 0 4px rgba(22, 155, 98, 0.10);
}

.alh1688-product-title {
  margin: 11px 0 0; color: var(--alh1688-text); font-size: 21px;
  font-weight: 650; line-height: 1.35 !important;
}

.alh1688-product-title-thai {
  margin: 7px 0 0; color: var(--alh1688-text-soft); font-size: 12px;
  line-height: 1.65;
}

.alh1688-product-flags {
  margin-top: 12px; display: flex; flex-wrap: wrap;
  gap: 6px;
}

.alh1688-product-flag {
  min-height: 24px; display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 7px; background: #fff6f1;
  color: var(--alh1688-brand); font-size: 14px; font-weight: 700;
}

.alh1688-price-box {
  margin-top: 0px; padding: 10px; overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(100deg, rgba(255, 91, 0, 0.10), rgba(255, 255, 255, 0.42)), var(--alh1688-brand-pale);
}

.alh1688-price-main {
  display: flex; align-items: baseline; flex-wrap: wrap;
  color: var(--alh1688-brand); line-height: 1;
}

.alh1688-price-main__prefix, .alh1688-price-main__suffix { font-size: 16px; font-weight: 700; }

.alh1688-price-main__currency { margin-left: 4px; font-size: 21px; font-weight: 850; }

.alh1688-price-main__value { font-size: 40px; font-weight: 700; letter-spacing: -1.8px; }

.alh1688-price-main__suffix { margin-left: 5px; }

.alh1688-price-meta {
  margin-top: 8px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; color: var(--alh1688-text-soft);
  font-size: 14px;
}

.alh1688-price-meta strong { color: var(--alh1688-text); }

.alh1688-promotion-list {
  margin-top: 12px; display: flex; gap: 7px;
  overflow-x: auto; scrollbar-width: none;
}

.alh1688-promotion-list::-webkit-scrollbar { display: none; }

.alh1688-promotion-chip {
  min-width: max-content; min-height: 24px; display: inline-flex;
  align-items: center; padding: 2px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.76); color: var(--alh1688-brand); font-size: 14px;
}

.alh1688-info-panel {
  margin-top: 14px; overflow: hidden; border: 1px solid var(--alh1688-border);
  border-radius: 13px;
}

.alh1688-info-row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px;
  padding: 11px 13px; font-size: 14px;
}

.alh1688-info-row + .alh1688-info-row { border-top: 1px solid var(--alh1688-border); }

.alh1688-info-row__label { color: var(--alh1688-text-faint); }

.alh1688-info-row__value { color: var(--alh1688-text); }

.alh1688-shipping-highlight { color: var(--alh1688-brand); font-weight: 750; }

.alh1688-service-list { display: flex; flex-wrap: wrap; gap: 6px 12px; }

.alh1688-service-item {
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}

.alh1688-service-item::before {
  content: "✓"; width: 16px; height: 16px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(22, 155, 98, 0.10); color: var(--alh1688-success); font-size: 14px;
  font-weight: 850;
}

.alh1688-sku-area { margin-top: 16px; }

.alh1688-sku-group + .alh1688-sku-group { margin-top: 17px; }

.alh1688-sku-group__head {
  margin-bottom: 9px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
}

.alh1688-sku-group__label { font-size: 12px; font-weight: 750; }

.alh1688-sku-group__selected {
  overflow: hidden; color: var(--alh1688-text-faint); font-size: 14px;
  text-overflow: ellipsis; white-space: nowrap;
}

.alh1688-sku-options { display: flex; flex-wrap: wrap; gap: 8px; }

.alh1688-sku-option {
  min-height: 40px; display: inline-flex; align-items: center;
  gap: 7px; padding: 5px 10px; position: relative;
  border: 1px solid var(--alh1688-border-strong); border-radius: 9px; background: #ffffff;
  color: var(--alh1688-text); font-size: 14px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.alh1688-sku-option:hover { border-color: rgba(255, 91, 0, 0.55); }

.alh1688-sku-option.is-active { border: 2px solid var(--alh1688-brand); background: #fffaf7; color: var(--alh1688-brand); }

.alh1688-sku-option.is-active::after {
  content: "✓"; width: 15px; height: 15px;
  position: absolute; right: -1px; bottom: -1px;
  display: grid; place-items: center; border-radius: 7px 0 7px 0;
  background: var(--alh1688-brand); color: #ffffff; font-size: 14px;
  font-weight: 900;
}

.alh1688-sku-option__image {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 6px; background: #f5f5f5; object-fit: cover;
}

.alh1688-sku-option--size {
  min-width: 62px; min-height: 46px; justify-content: center;
  flex-direction: column; gap: 2px; padding: 5px 8px;
}

.alh1688-sku-option--size small { color: var(--alh1688-text-faint); font-size: 14px; white-space: nowrap; }

.alh1688-sku-quantity-table {
  display: flex; flex-direction: column; border: 1px solid var(--alh1688-border);
  border-radius: 12px; overflow: hidden; background: #ffffff;
}

.alh1688-sku-quantity-row {
  display: grid; grid-template-columns: minmax(56px, 70px) minmax(0, 1fr) auto; align-items: center;
  gap: 10px; padding: 11px 12px;
}

.alh1688-sku-quantity-row + .alh1688-sku-quantity-row { border-top: 1px solid var(--alh1688-border); }

.alh1688-sku-quantity-row__size { font-size: 16px; font-weight: 750; color: var(--alh1688-text); }

.alh1688-sku-quantity-row__meta {
  min-width: 0; display: flex; flex-direction: column;
  gap: 3px;
}

.alh1688-sku-quantity-row__price { color: var(--alh1688-text); font-size: 13px; font-weight: 700; }

.alh1688-sku-quantity-row__stock { color: var(--alh1688-text-faint); font-size: 14px; }

.alh1688-sku-quantity-row__stepper {
  height: 34px; display: grid; grid-template-columns: 30px 42px 30px;
  overflow: hidden; border: 1px solid var(--alh1688-border-strong); border-radius: 9px;
  background: #ffffff;
}

.alh1688-sku-quantity-row__stepper button, .alh1688-sku-quantity-row__stepper input {
  border: 0; background: #ffffff; text-align: center;
}

.alh1688-sku-quantity-row__stepper button { color: var(--alh1688-text-soft); font-size: 18px; line-height: 1; }

.alh1688-sku-quantity-row__stepper button:hover { background: #f7f7f8; color: var(--alh1688-brand); }

.alh1688-sku-quantity-row__stepper input {
  min-width: 0; width: 100%; border-right: 1px solid var(--alh1688-border);
  border-left: 1px solid var(--alh1688-border); outline: 0; font-size: 12px;
  font-weight: 700; -moz-appearance: textfield;
}

.alh1688-sku-quantity-row__stepper input::-webkit-outer-spin-button,
.alh1688-sku-quantity-row__stepper input::-webkit-inner-spin-button {
  margin: 0; -webkit-appearance: none;
}

.alh1688-selection-box__chosen-list {
  margin-top: 9px; display: flex; flex-direction: column;
  gap: 7px;
}

.alh1688-selected-sku-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 8px 10px; border-radius: 10px;
  background: #ffffff;
}

.alh1688-selected-sku-item strong { display: block; color: var(--alh1688-text); font-size: 14px; }

.alh1688-selected-sku-item span {
  display: block; margin-top: 2px; color: var(--alh1688-text-faint);
  font-size: 14px;
}

.alh1688-selected-sku-item__total {
  color: var(--alh1688-brand); font-size: 14px; font-weight: 750;
  white-space: nowrap;
}

.alh1688-selected-sku-empty {
  padding: 9px 10px; border-radius: 10px; background: #ffffff;
  color: var(--alh1688-text-faint); font-size: 14px;
}

.alh1688-quantity-row {
  margin-top: 17px; display: grid; grid-template-columns: 76px minmax(0, 1fr);
  align-items: center; gap: 10px;
}

.alh1688-quantity-row__label { color: var(--alh1688-text-faint); font-size: 14px; }

.alh1688-quantity-control {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 9px;
}

.alh1688-quantity-stepper {
  height: 36px; display: grid; grid-template-columns: 36px 58px 36px;
  overflow: hidden; border: 1px solid var(--alh1688-border-strong); border-radius: 9px;
  background: #ffffff;
}

.alh1688-quantity-stepper button, .alh1688-quantity-stepper input { border: 0; background: #ffffff; text-align: center; }

.alh1688-quantity-stepper button { color: var(--alh1688-text-soft); font-size: 18px; }

.alh1688-quantity-stepper button:hover { background: #f7f7f8; color: var(--alh1688-brand); }

.alh1688-quantity-stepper input {
  min-width: 0; width: 100%; border-right: 1px solid var(--alh1688-border);
  border-left: 1px solid var(--alh1688-border); outline: 0; font-size: 14px;
  font-weight: 700; -moz-appearance: textfield;
}

.alh1688-quantity-stepper input::-webkit-outer-spin-button, .alh1688-quantity-stepper input::-webkit-inner-spin-button {
  margin: 0; -webkit-appearance: none;
}

.alh1688-stock-text { color: var(--alh1688-text-faint); font-size: 14px; }

.alh1688-selection-box {
  margin-top: 15px; padding: 12px 13px; border-radius: 12px;
  background: #f8f8f9;
}

.alh1688-selection-box__line {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; color: var(--alh1688-text-soft); font-size: 14px;
}

.alh1688-selection-box__line + .alh1688-selection-box__line { margin-top: 7px; }

.alh1688-selection-box__line strong { max-width: 68%; color: var(--alh1688-text); text-align: right; }

.alh1688-selection-box__total {
  margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--alh1688-border);
  align-items: baseline;
}

.alh1688-selection-box__total strong { color: var(--alh1688-brand); font-size: 18px; }

.alh1688-purchase-card__footer {
  flex: 0 0 auto; padding: 10px 12px 12px; border-top: 1px solid var(--alh1688-border);
  background: #ffffff; box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.035);
}

.alh1688-action-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 48px; gap: 8px; }

.alh1688-action-button {
  min-width: 0; height: 45px; display: inline-flex;
  align-items: center; justify-content: center; gap: 7px;
  padding: 0 12px; border: 1px solid var(--alh1688-brand); border-radius: 12px;
  background: #ffffff; color: var(--alh1688-brand); font-size: 14px;
  font-weight: 800; white-space: nowrap;
}

.alh1688-action-button:hover { filter: brightness(0.985); }

.alh1688-action-button--primary { border: 0; background: linear-gradient(90deg, #ff7530, var(--alh1688-brand)); color: #ffffff; }

.alh1688-action-button--soft { background: var(--alh1688-brand-pale); }

.alh1688-action-button--source { border-color: var(--alh1688-border-strong); color: var(--alh1688-text-soft); }

.alh1688-action-button--icon { padding: 0; border-color: var(--alh1688-border-strong); color: var(--alh1688-text-soft); }

.alh1688-action-button--icon.is-active {
  border-color: var(--alh1688-brand); color: var(--alh1688-brand); background: var(--alh1688-brand-pale);
}

/* ==================================================================
   09) DETAIL TABS + CONTENT
   ================================================================== */

.alh1688-detail-card { grid-area: details; overflow: hidden; }

.alh1688-detail-tabs {
  min-height: 60px; position: sticky; top: var(--alh1688-header-height);
  z-index: 20; display: flex; align-items: stretch;
  overflow-x: auto; border-bottom: 1px solid var(--alh1688-border); background: rgba(255, 255, 255, 0.96);
  scrollbar-width: none; backdrop-filter: blur(14px);
}

.alh1688-detail-tabs::-webkit-scrollbar { display: none; }

.alh1688-detail-tab {
  min-width: max-content; padding: 0 20px; position: relative;
  border: 0; background: transparent; color: var(--alh1688-text-soft);
  font-size: 12px; font-weight: 720;
}

.alh1688-detail-tab::after {
  content: ""; height: 3px; position: absolute;
  right: 20px; bottom: 0; left: 20px;
  border-radius: 999px 999px 0 0; background: var(--alh1688-brand); transform: scaleX(0);
  transition: transform 0.2s ease;
}

.alh1688-detail-tab.is-active { color: var(--alh1688-brand); }

.alh1688-detail-tab.is-active::after { transform: scaleX(1); }

.alh1688-detail-section { padding: 26px 24px 30px; scroll-margin-top: calc(var(--alh1688-header-height) + 70px); }

.alh1688-detail-section + .alh1688-detail-section { border-top: 1px solid var(--alh1688-border); }

.alh1688-section-heading {
  margin-bottom: 16px; display: flex; align-items: baseline;
  justify-content: space-between; gap: 12px;
}

.alh1688-section-heading h2 { margin: 0; font-size: 17px; }

.alh1688-section-heading span { color: var(--alh1688-text-faint); font-size: 14px; }

.alh1688-attribute-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  overflow: hidden; border: 1px solid var(--alh1688-border); border-radius: 13px;
  background: var(--alh1688-border);
}

.alh1688-attribute-item { min-width: 0; padding: 13px 14px; background: #ffffff; }

.alh1688-attribute-item span, .alh1688-attribute-item strong { display: block; }

.alh1688-attribute-item span { color: var(--alh1688-text-faint); font-size: 14px; }

.alh1688-attribute-item strong {
  margin-top: 4px; overflow-wrap: anywhere; font-size: 12px;
  font-weight: 700;
}

.alh1688-package-table-wrap { overflow-x: auto; border: 1px solid var(--alh1688-border); border-radius: 12px; }

.alh1688-package-table {
  width: 100%; min-width: 720px; border-collapse: collapse;
  font-size: 14px;
}

.alh1688-package-table th, .alh1688-package-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--alh1688-border); text-align: left;
  white-space: nowrap;
}

.alh1688-package-table th { background: #f6f6f7; font-weight: 750; }

.alh1688-package-table tr:last-child td { border-bottom: 0; }

.alh1688-detail-images {
  width: min(100%, 820px); margin: 0 auto; display: flex;
  flex-direction: column; gap: 8px;
}

.alh1688-detail-image {
  width: 100%; min-height: 220px; border-radius: 8px;
  background: #f7f7f7; object-fit: contain;
}

.alh1688-recommend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.alh1688-recommend-card {
  min-width: 0; overflow: hidden; border: 1px solid var(--alh1688-border);
  border-radius: 12px; background: #ffffff;
}

.alh1688-recommend-card img {
  width: 100%; aspect-ratio: 1 / 1; background: #f6f6f7;
  object-fit: cover;
}

.alh1688-recommend-card__body { padding: 10px; }

.alh1688-recommend-card__title {
  min-height: 36px; display: -webkit-box; overflow: hidden;
  font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.alh1688-recommend-card__price {
  margin-top: 7px; color: var(--alh1688-brand); font-size: 13px;
  font-weight: 850;
}

/* ==================================================================
   10) TOAST + FULLSCREEN IMAGE VIEWER
   ================================================================== */

.alh1688-toast {
  max-width: min(360px, calc(100% - 32px)); position: fixed; right: 20px;
  bottom: 20px; z-index: 200; padding: 11px 14px;
  border-radius: 11px; background: rgba(20, 20, 20, 0.90); color: #ffffff;
  font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.20); opacity: 0;
  pointer-events: none; transform: translateY(12px); transition: opacity 0.2s ease, transform 0.2s ease;
}

.alh1688-toast.is-visible { opacity: 1; transform: translateY(0); }

.alh1688-image-viewer {
  position: fixed; inset: 0; z-index: 300;
  display: none; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, 0.86);
}

.alh1688-image-viewer.is-open { display: grid; }

.alh1688-image-viewer__image,
.alh1688-image-viewer__video {
  max-width: 94vw; max-height: 90vh; border-radius: 12px;
  object-fit: contain;
}

.alh1688-image-viewer__video {
  width: min(94vw, 1120px);
  height: min(72vh, 720px);
  background: #000000;
}

.alh1688-image-viewer__close {
  width: 44px; height: 44px; position: fixed;
  top: 18px; right: 18px; display: grid;
  place-items: center; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #ffffff;
}

.alh1688-sku-quantity-row__stepper button:disabled { cursor: not-allowed; opacity: 0.38; background: #f4f4f5; }

.alh1688-no-data {
  grid-column: 1 / -1; width: 100%; padding: 18px;
  border: 1px dashed var(--alh1688-border-strong); border-radius: 12px; background: #fafafa;
  color: var(--alh1688-text-faint); font-size: 14px; text-align: center;
}

.alh1688-table-empty { padding: 20px !important; color: var(--alh1688-text-faint); text-align: center !important; }

/* ==================================================================
   11) REAL-LAYOUT SKELETON PRELOAD
   Skeleton ใช้ Grid Area เดียวกับหน้าสินค้า เพื่อลด Layout Shift ระหว่างรอ API
   ================================================================== */

.alh1688-visually-hidden {
  width: 1px; height: 1px; position: absolute;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.alh1688-loading-status {
  min-height: 58px; margin-bottom: 12px; display: flex;
  align-items: center; gap: 12px; padding: 11px 14px;
  border: 1px solid rgba(255, 91, 0, 0.14); border-radius: 14px; background: linear-gradient(90deg, #fff9f5, #ffffff);
  color: var(--alh1688-text-soft);
}

.alh1688-loading-status__spinner {
  width: 26px; height: 26px; flex: 0 0 auto;
  border: 3px solid rgba(255, 91, 0, 0.16); border-top-color: var(--alh1688-brand); border-radius: 50%;
  animation: alh1688Spinner 0.75s linear infinite;
}

.alh1688-loading-status__text { min-width: 0; display: flex; flex-direction: column; }

.alh1688-loading-status__text strong { color: var(--alh1688-text); font-size: 13px; }

.alh1688-loading-status__text span {
  margin-top: 2px; overflow: hidden; color: var(--alh1688-text-faint);
  font-size: 14px; text-overflow: ellipsis; white-space: nowrap;
}

@keyframes alh1688Spinner {
  to { transform: rotate(360deg); }
}

.alh1688-skeleton-store { grid-area: store; padding: 16px 18px; }

.alh1688-skeleton-gallery { grid-area: gallery; padding: 14px; }

.alh1688-skeleton-purchase {
  grid-area: purchase; position: sticky; top: calc(var(--alh1688-header-height) + 14px);
  overflow: hidden;
}

.alh1688-skeleton-details { grid-area: details; overflow: hidden; }

.alh1688-skeleton-block {
  position: relative; overflow: hidden; border-radius: 8px;
  background: #eceef2;
}

.alh1688-skeleton-block::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 48%, rgba(255, 255, 255, 0) 100% );
  animation: alh1688SkeletonShimmer 1.25s ease-in-out infinite;
}

@keyframes alh1688SkeletonShimmer {
  100% { transform: translateX(100%); }
}

.alh1688-skeleton-line { height: 12px; }

.alh1688-skeleton-line--title { width: min(62%, 430px); height: 20px; }

.alh1688-skeleton-line--wide { width: 100%; }

.alh1688-skeleton-line--medium { width: 68%; }

.alh1688-skeleton-line--short { width: 38%; }

.alh1688-skeleton-store__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px;
}

.alh1688-skeleton-stack {
  min-width: 0; flex: 1; display: flex;
  flex-direction: column; gap: 9px;
}

.alh1688-skeleton-inline {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px;
}

.alh1688-skeleton-pill { width: 82px; height: 24px; border-radius: 999px; }

.alh1688-skeleton-store__actions { display: flex; gap: 8px; }

.alh1688-skeleton-action { width: 88px; height: 32px; border-radius: 10px; }

.alh1688-skeleton-metrics {
  margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.alh1688-skeleton-metric { height: 52px; border-radius: 10px; }

.alh1688-skeleton-gallery__layout { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }

.alh1688-skeleton-gallery__thumbs { display: flex; flex-direction: column; gap: 9px; }

.alh1688-skeleton-gallery__thumb { width: 68px; aspect-ratio: 1; border-radius: 10px; }

.alh1688-skeleton-gallery__main { width: 100%; aspect-ratio: 1; border-radius: 14px; }

.alh1688-skeleton-purchase__body { padding: 18px 16px 14px; }

.alh1688-skeleton-source-row { display: flex; justify-content: space-between; gap: 10px; }

.alh1688-skeleton-source-row .alh1688-skeleton-pill:first-child { width: 112px; }

.alh1688-skeleton-source-row .alh1688-skeleton-pill:last-child { width: 76px; }

.alh1688-skeleton-title-group {
  margin-top: 15px; display: flex; flex-direction: column;
  gap: 9px;
}

.alh1688-skeleton-title-group .alh1688-skeleton-line:first-child { height: 19px; }

.alh1688-skeleton-badges { margin-top: 12px; display: flex; gap: 7px; }

.alh1688-skeleton-badge { width: 82px; height: 23px; border-radius: 7px; }

.alh1688-skeleton-price {
  height: 130px; margin-top: 14px; padding: 15px;
  border-radius: 14px; background: #fff6f0;
}

.alh1688-skeleton-price__number {
  width: 54%; height: 42px; margin-top: 4px;
  background: #ffdaca;
}

.alh1688-skeleton-price__meta {
  margin-top: 13px; display: flex; flex-direction: column;
  gap: 9px;
}

.alh1688-skeleton-info {
  margin-top: 13px; border: 1px solid var(--alh1688-border); border-radius: 13px;
  overflow: hidden;
}

.alh1688-skeleton-info__row {
  min-height: 60px; display: grid; grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px; align-items: center; padding: 12px;
}

.alh1688-skeleton-info__row + .alh1688-skeleton-info__row { border-top: 1px solid var(--alh1688-border); }

.alh1688-skeleton-sku { margin-top: 16px; }

.alh1688-skeleton-sku__head { display: flex; justify-content: space-between; gap: 12px; }

.alh1688-skeleton-color-list {
  margin-top: 10px; display: flex; flex-wrap: wrap;
  gap: 8px;
}

.alh1688-skeleton-color { width: 102px; height: 42px; border-radius: 9px; }

.alh1688-skeleton-sku-table {
  margin-top: 14px; border: 1px solid var(--alh1688-border); border-radius: 12px;
  overflow: hidden;
}

.alh1688-skeleton-sku-row {
  min-height: 56px; display: grid; grid-template-columns: 58px minmax(0, 1fr) 104px;
  align-items: center; gap: 10px; padding: 10px 12px;
}

.alh1688-skeleton-sku-row + .alh1688-skeleton-sku-row { border-top: 1px solid var(--alh1688-border); }

.alh1688-skeleton-stepper { height: 34px; border-radius: 9px; }

.alh1688-skeleton-summary {
  min-height: 106px; margin-top: 14px; padding: 13px;
  display: flex; flex-direction: column; gap: 9px;
  border-radius: 12px; background: #f7f7f8;
}

.alh1688-skeleton-footer {
  padding: 10px 12px 12px; display: grid; grid-template-columns: 1.2fr 1fr 1fr 48px;
  gap: 8px; border-top: 1px solid var(--alh1688-border);
}

.alh1688-skeleton-footer__button { height: 45px; border-radius: 12px; }

.alh1688-skeleton-tabs {
  height: 58px; display: flex; align-items: center;
  gap: 28px; padding: 0 18px; border-bottom: 1px solid var(--alh1688-border);
}

.alh1688-skeleton-tab { width: 86px; height: 14px; }

.alh1688-skeleton-detail-body { padding: 22px 18px 26px; }

.alh1688-skeleton-attribute-grid {
  margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; overflow: hidden; border: 1px solid var(--alh1688-border);
  border-radius: 12px; background: var(--alh1688-border);
}

.alh1688-skeleton-attribute {
  min-height: 70px; padding: 12px; display: flex;
  flex-direction: column; gap: 9px; background: #ffffff;
}

.alh1688-skeleton-package-table {
  margin-top: 18px; border: 1px solid var(--alh1688-border); border-radius: 12px;
  overflow: hidden;
}

.alh1688-skeleton-package-row {
  display: grid; grid-template-columns: 1.35fr repeat(4, 0.8fr) 1.5fr; gap: 1px;
  background: var(--alh1688-border);
}

.alh1688-skeleton-package-row > div { min-height: 42px; padding: 10px; background: #ffffff; }

.alh1688-skeleton-package-row:first-child > div { background: #f4f5f7; }

.alh1688-skeleton-detail-image {
  width: min(100%, 760px); aspect-ratio: 16 / 9; margin: 20px auto 0;
  border-radius: 14px;
}

/* Error state after API failure */

.alh1688-error-view {
  min-height: calc(100vh - var(--alh1688-header-height)); display: grid; place-items: start center;
  padding-top: 56px;
}

.alh1688-error-card { width: min(100%, 720px); padding: 30px; text-align: center; }

.alh1688-error-card__icon {
  width: 54px; height: 54px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 50%;
  background: #fff0ec; color: #df3e17;
}

.alh1688-error-card__icon .alh1688-icon { width: 27px; height: 27px; }

.alh1688-error-card h1 { margin: 0; font-size: 22px; }

.alh1688-error-card p {
  max-width: 560px; margin: 9px auto 0; color: var(--alh1688-text-soft);
  font-size: 13px;
}

.alh1688-error-card__technical {
  margin-top: 15px; padding: 11px 13px; overflow-wrap: anywhere;
  border-radius: 10px; background: #f7f7f8; color: var(--alh1688-text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; text-align: left;
  white-space: pre-wrap;
}

.alh1688-error-card__actions {
  margin-top: 18px; display: flex; justify-content: center;
  flex-wrap: wrap; gap: 9px;
}

.alh1688-error-button {
  min-height: 42px; padding: 0 17px; border: 1px solid var(--alh1688-brand);
  border-radius: 11px; background: #ffffff; color: var(--alh1688-brand);
  font-size: 12px; font-weight: 750;
}

.alh1688-error-button--primary { background: var(--alh1688-brand); color: #ffffff; }

@media (max-width: 999px) {
  .alh1688-skeleton-purchase { position: static; top: auto; }
}

@media (max-width: 767px) {
  .alh1688-loading-status { min-height: 52px; margin: 0 0 7px; border-radius: 12px; }

  .alh1688-skeleton-store, .alh1688-skeleton-gallery { padding: 11px; }

  .alh1688-skeleton-store__actions { display: none; }

  .alh1688-skeleton-metrics { grid-template-columns: repeat(4, 108px); overflow: hidden; }

  .alh1688-skeleton-gallery__layout { display: flex; flex-direction: column-reverse; gap: 8px; }

  .alh1688-skeleton-gallery__thumbs { flex-direction: row; overflow: hidden; }

  .alh1688-skeleton-gallery__thumb { width: 54px; flex: 0 0 54px; }

  .alh1688-skeleton-purchase__body { padding: 15px 12px 10px; }

  .alh1688-skeleton-sku-row { grid-template-columns: 48px minmax(0, 1fr) 94px; padding: 9px; }

  .alh1688-skeleton-footer { grid-template-columns: 1.2fr 1fr 46px; position: static; }

  .alh1688-skeleton-footer__button:nth-child(3) { display: none; }

  .alh1688-skeleton-attribute-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .alh1688-skeleton-package-table { overflow-x: hidden; }

  .alh1688-skeleton-package-row { grid-template-columns: 1.25fr 0.8fr 0.8fr; }

  .alh1688-skeleton-package-row > div:nth-child(n + 4) { display: none; }

  .alh1688-error-view { padding-top: 24px; }

  .alh1688-error-card { padding: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .alh1688-skeleton-block::after, .alh1688-loading-status__spinner { animation: none; }
}

/* ==================================================================
   12) RESPONSIVE — TABLET
   ================================================================== */

@media (max-width: 1199px) {
  .alh1688-gallery-layout { grid-template-columns: 72px minmax(0, 1fr); }

  .alh1688-gallery-thumb { width: 64px; height: 64px; }

  .alh1688-action-grid { grid-template-columns: 1fr 1fr 48px; }

  .alh1688-action-button--source { display: none; }
}

/* ==================================================================
   13) RESPONSIVE — ONE-COLUMN MODE
   ตั้งแต่ 999px ลงมา ใช้ลำดับ store → gallery → purchase → details
   ================================================================== */

@media (max-width: 999px) {
  .alh1688-product-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "store" "gallery" "purchase" "details"; }

  .alh1688-purchase-column { position: static; top: auto; }

  .alh1688-purchase-card { max-height: none; }

  .alh1688-purchase-card__body { overflow: visible; }

  .alh1688-action-grid { grid-template-columns: 1.2fr 1fr 1fr 48px; }

  .alh1688-action-button--source { display: inline-flex; }
}

/* ==================================================================
   14) RESPONSIVE — MOBILE
   ================================================================== */

@media (max-width: 767px) {
  .alh1688-page {
    --alh1688-header-height: 58px;
    --alh1688-radius-large: 14px;
    background: #f2f3f5; padding-bottom: calc(79px + env(safe-area-inset-bottom));
  }

  .alh1688-header__inner {
    width: 100%; min-height: var(--alh1688-header-height); padding: 8px;
    grid-template-columns: 34px minmax(0, 1fr) auto; gap: 7px;
  }

  .alh1688-brand { width: 34px; min-width: 34px; }

  .alh1688-brand__mark {
    width: 34px; height: 34px; border-radius: 11px;
    font-size: 14px;
  }

  .alh1688-brand__text { display: none; }

  .alh1688-search { height: 36px; padding-left: 10px; }

  .alh1688-search__icon { display: none; }

  .alh1688-search__input { font-size: 14px; }

  .alh1688-search__submit { height: 27px; padding: 0 11px; font-size: 14px; }

  .alh1688-header-actions { gap: 4px; }

  .alh1688-header-action {
    width: 34px; height: 34px; border: 0;
    background: transparent;
  }

  .alh1688-header-action:first-child { display: none; }

  .alh1688-container { width: 100%; padding: 6px 7px 20px; }

  .alh1688-breadcrumb { margin: 2px 4px 7px; font-size: 14px; }

  .alh1688-product-layout { gap: 7px; }

  .alh1688-card { box-shadow: 0 4px 15px rgba(30, 35, 50, 0.045); }

  .alh1688-store-card { padding: 12px; }

  .alh1688-store-card__head { align-items: flex-start; flex-wrap: wrap; gap: 8px; }

  .alh1688-store-card__name { font-size: 13px; }

  .alh1688-store-card__actions { width: 100%; overflow-x: auto; scrollbar-width: none; }

  .alh1688-store-card__actions::-webkit-scrollbar { display: none; }

  .alh1688-store-action {
    min-width: max-content; min-height: 30px; padding: 0 8px;
    background: #f8f8f9; font-size: 14px;
  }

  .alh1688-store-card__metrics { grid-template-columns: repeat(4, 112px); overflow-x: auto; scrollbar-width: none; }

  .alh1688-store-card__metrics::-webkit-scrollbar { display: none; }

  .alh1688-store-metric { padding: 8px 10px; }

  .alh1688-gallery-card { padding: 9px; }

  .alh1688-gallery-layout { display: flex; flex-direction: column-reverse; gap: 8px; }

  .alh1688-gallery-thumbs {
    width: 100%; max-height: none; flex-direction: row;
    gap: 7px; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
  }

  .alh1688-gallery-thumbs::-webkit-scrollbar { display: none; }

  .alh1688-gallery-thumb { width: 54px; height: 54px; }

  .alh1688-gallery-thumb__play {
    width: 26px; height: 26px;
  }

  .alh1688-gallery-main { border-radius: 12px; }

  .alh1688-gallery-main__video {
    min-height: 260px;
  }

  .alh1688-image-viewer__video {
    width: 100%;
    height: auto;
    max-height: 76vh;
  }

  .alh1688-gallery-nav { width: 36px; height: 50px; opacity: 0.62; }

  .alh1688-gallery-hint { display: none; }

  /* กล่อง purchase อยู่ใต้ gallery เพราะ grid-template-areas ด้านบน */

  .alh1688-purchase-column { width: 100%; margin: 0; }

  .alh1688-purchase-card__body { padding: 15px 12px 10px; }

  .alh1688-product-title { font-size: 16px; }

  .alh1688-product-title-thai { font-size: 14px; }

  .alh1688-price-box { margin-top: 13px; padding: 14px; }

  .alh1688-price-main__value { font-size: 38px; }

  .alh1688-info-row { grid-template-columns: 62px minmax(0, 1fr); padding: 10px 11px; font-size: 14px; }

  .alh1688-service-list { gap: 5px 9px; }

  .alh1688-sku-options { gap: 7px; }

  .alh1688-sku-option { min-height: 38px; padding: 4px 9px; }

  .alh1688-sku-option--size { min-width: calc(25% - 6px); flex: 1 1 calc(25% - 6px); }

  .alh1688-quantity-row { grid-template-columns: 62px minmax(0, 1fr); }

  .alh1688-selection-box__line strong { max-width: 62%; }

  /* ปุ่มล่างคง Fixed เหมือน UX บนมือถือในภาพตัวอย่าง */

  .alh1688-purchase-card__footer {
    position: fixed; right: 0; bottom: 0;
    left: 0; z-index: 120; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-radius: 0; box-shadow: 0 -5px 18px rgba(0, 0, 0, 0.10);
  }

  .alh1688-action-grid { grid-template-columns: 1fr 1fr 46px; gap: 7px; }

  .alh1688-action-button {
    height: 46px; padding: 0 8px; border-radius: 11px;
    font-size: 14px;
  }

  .alh1688-action-button--source { display: none; }

  .alh1688-detail-tabs { min-height: 52px; top: var(--alh1688-header-height); }

  .alh1688-detail-tab { padding: 0 12px; font-size: 14px; }

  .alh1688-detail-tab::after { right: 12px; left: 12px; }

  .alh1688-detail-section { padding: 19px 12px 23px; scroll-margin-top: calc(var(--alh1688-header-height) + 58px); }

  .alh1688-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }

  .alh1688-section-heading h2 { font-size: 14px; }

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

  .alh1688-attribute-item { padding: 11px; }

  .alh1688-recommend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

  .alh1688-toast {
    right: 12px; bottom: calc(83px + env(safe-area-inset-bottom)); left: 12px;
    max-width: none; text-align: center;
  }
}

@media (max-width: 420px) {
  .alh1688-sku-option--size { min-width: calc(33.333% - 6px); flex-basis: calc(33.333% - 6px); }

  .alh1688-attribute-grid { grid-template-columns: 1fr; }

  .alh1688-price-main__value { font-size: 35px; }
}

@media (max-width: 767px) {
  .alh1688-page.is-search-mode .alh1688-header__inner { grid-template-columns: 1fr auto; }

  .alh1688-page.is-search-mode .alh1688-header-search { display: none; }

  .alh1688-search-view { width: min(calc(100% - 16px), 1120px); min-height: auto; padding: 16px 0 80px; }

  .alh1688-search-hero { padding: 30px 14px 27px; border-radius: 16px; }

  .alh1688-search-hero__description { font-size: 13px; }

  .alh1688-market-list { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .alh1688-market-button { min-width: 0; width: 100%; }

  .alh1688-hero-search { min-height: 0; padding: 5px 5px 5px 12px; border-radius: 15px; }

  .alh1688-hero-search__input { font-size: 12px; }

  .alh1688-hero-search__submit {
    min-width: 88px; height: 40px; padding: 0 12px;
    border-radius: 11px;
  }

  .alh1688-hero-search__clear { display: none; }

  .alh1688-search-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .alh1688-search-help__button { justify-content: center; padding: 8px; line-height: 1.35; }
}

/* ==================================================================
   15) MOTION, LOGOS + TYPOGRAPHY
   ================================================================== */

@media (prefers-reduced-motion: reduce) {
  .alh1688-page, .alh1688-page *, .alh1688-page *::before, .alh1688-page *::after {
    scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.alh1688-market-button__logo { display: block; max-width: 100%; max-height: 40px !important; }

.btn.text-color-ranbow {
  background: linear-gradient( 120deg, #00ffff 0%, #ff7b00 25%, #8b5cf6 50%, #ff00c8 75%, #51ff00 100% );
  background-size: 300% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: neonMove 5s linear infinite; font-weight: 700; font-size: 12px;
}

.typing-title {
  font-size: 32px; font-weight: 700; position: relative;
  background: linear-gradient( 120deg, #00ffff 0%, #ff6600 25%, #8b5cf6 50%, #ff00c8 75%, #c8ff00 100% );
  background-size: 300% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: neonMove 3s linear infinite;
}

@keyframes neonMove {
  from { background-position: 0% center; }

  to { background-position: 300% center; }
}

@keyframes blink {
  0%, 50% { opacity: 1; }

  51%, 100% { opacity: 0; }
}

/* ==================================================================
   16) LEGACY SEARCH ACTION COMPATIBILITY
   คง is-clear-mode และกฎ 480px สำหรับ Markup รุ่นก่อนหน้า
   ================================================================== */

.alh1688-page .alh1688-hero-search__clear.is-clear-mode {
  width: 34px; min-width: 34px; padding: 0;
  border-radius: 50%; background: transparent; color: var(--alh1688-text-faint);
}

.alh1688-page .alh1688-hero-search__clear.is-clear-mode:hover { background: #f5f5f6; color: var(--alh1688-text); }

@media (max-width: 480px) {
  .alh1688-page .alh1688-hero-search__clear:not(.is-clear-mode) {
    width: 34px; min-width: 34px; padding: 0;
    border-radius: 50%;
  }

  .alh1688-hero-search__action-text { display: none; }
}

/* ==================================================================
   17) SEARCH ACTION BUTTONS — วาง / ล้าง
   data-search-action เป็นสถานะหลัก: paste = วาง, clear = ล้าง
   ================================================================== */

.alh1688-page .alh1688-hero-search__clear {
  place-items: center; width: auto; min-width: 64px;
  height: 36px; flex: 0 0 auto; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 11px;
  border: 0; border-radius: 999px; background: var(--alh1688-brand-soft, #fff2ea);
  color: var(--alh1688-brand, #ff5b00); font-size: 14px; font-weight: 750;
  line-height: 1; white-space: nowrap;
  transition: min-width 0.16s ease, width 0.16s ease, padding 0.16s ease, color 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
}

.alh1688-page .alh1688-hero-search__clear:hover { background: #ffe5d7; color: var(--alh1688-brand-dark, #e94900); }

.alh1688-page .alh1688-hero-search__clear:disabled { cursor: wait; opacity: 0.58; }

.alh1688-page .alh1688-hero-search__clear[data-search-action="clear"] {
  width: 36px; min-width: 36px; padding: 0;
  border-radius: 50%; background: transparent; color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40));
}

.alh1688-page .alh1688-hero-search__clear[data-search-action="clear"]:hover {
  background: #f5f5f6; color: var(--alh1688-text, #222222);
}

.alh1688-hero-search__action-content {
  white-space: nowrap; display: none; align-items: center;
  justify-content: center; gap: 5px; pointer-events: none;
}

.alh1688-hero-search__action-content .alh1688-icon { width: 17px; height: 17px; }

.alh1688-hero-search__clear[data-search-action="paste"] [data-search-action-content="paste"] { display: inline-flex; }

.alh1688-hero-search__clear[data-search-action="clear"] [data-search-action-content="clear"] { display: inline-flex; }

.alh1688-hero-search__action-text { display: inline-block; }

/* มือถือใช้เฉพาะไอคอน Clipboard เพื่อรักษาพื้นที่ช่องค้นหา */

@media (max-width: 575px) {
  .alh1688-page .alh1688-hero-search__clear[data-search-action="paste"] {
    width: 36px; min-width: 36px; padding: 0;
    border-radius: 50%;
  }

  .alh1688-hero-search__action-text { display: none; }
}

/* ==================================================================
   18) ORDER PRICE — บาท / หยวน
   CHINA_ORDER_YUAN_RATE เป็น Snapshot จาก PHP; THB = CNY × CHINA_ORDER_YUAN_RATE
   ================================================================== */

.alh1688-page .alh1688-price-box.is-rate-missing {
  background: linear-gradient(100deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.55)), #fffaf0;
}

.alh1688-page .alh1688-price-main--baht { color: var(--alh1688-brand, #ff5b00); }

.alh1688-page .alh1688-price-cny {
  margin-top: 9px; display: flex; align-items: baseline;
  flex-wrap: wrap; gap: 7px; color: var(--alh1688-text-soft, rgba(0, 0, 0, 0.62));
  font-size: 14px;
}

.alh1688-page .alh1688-price-cny__label { color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); }

.alh1688-page .alh1688-price-cny__value { color: var(--alh1688-text, #222222); font-size: 15px; font-weight: 800; }

.alh1688-page .alh1688-price-cny__unit { color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px; }

.alh1688-page .alh1688-price-range-stack {
  min-width: 0; display: flex; align-items: flex-end;
  flex-direction: column; gap: 2px; text-align: right;
}

.alh1688-price-range-stack{
  display: none !important;
}

.alh1688-page .alh1688-price-range-stack > span { color: var(--alh1688-text-soft, rgba(0, 0, 0, 0.62)); }

.alh1688-page .alh1688-price-range-stack strong { color: var(--alh1688-brand, #ff5b00); font-size: 12px; }

.alh1688-page .alh1688-price-range-stack small { color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px; }

/* ==================================================================
   19) QUANTITY PRICE TIERS + SKU NOTES
   price_ranges ใช้จำนวนรวมทุก SKU ของสินค้านี้ ไม่เริ่มนับใหม่ต่อสี
   คงหมายเหตุ textarea แยกแต่ละตัวเลือก SKU
   ================================================================== */

.alh1688-page .alh1688-price-tier-list {
  margin-top: 12px; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 1fr); gap: 8px; overflow-x: auto;
  padding: 2px 1px 5px; scrollbar-width: thin; overscroll-behavior-x: contain;
}

.alh1688-page .alh1688-price-tier-card {
  min-width: 0; padding: 9px 10px; position: relative;
  border: 1px solid rgba(0, 0, 0, 0.09); border-radius: 10px; background: rgba(255, 255, 255, 0.76);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.alh1688-page .alh1688-price-tier-card.is-reached { border-color: rgba(255, 91, 0, 0.20); background: rgba(255, 248, 244, 0.94); }

.alh1688-page .alh1688-price-tier-card.is-active {
  border-color: var(--alh1688-brand, #ff5b00); background: #ffffff; box-shadow: 0 5px 14px rgba(255, 91, 0, 0.13);
  transform: translateY(-1px);
}

.alh1688-page .alh1688-price-tier-card.is-active::after {
  position: absolute; top: -7px; right: 7px;
  padding: 1px 6px; background: var(--alh1688-brand, #ff5b00); color: #ffffff;
  font-size: 7px; line-height: 1.45;
}

.alh1688-page .alh1688-price-tier-card__baht,
.alh1688-page .alh1688-price-tier-card__yuan,
.alh1688-page .alh1688-price-tier-card__quantity {
  display: block;
}

.alh1688-page .alh1688-price-tier-card__baht {
  color: var(--alh1688-brand, #ff5b00); font-size: 18px; font-weight: 900;
  line-height: 1.2;
}

.alh1688-page .alh1688-price-tier-card__yuan {
  margin-top: 2px; color: var(--alh1688-text, #222222); font-size: 14px;
  font-weight: 750;
}

.alh1688-page .alh1688-price-tier-card__quantity {
  margin-top: 4px; color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px;
  line-height: 1.35;
}

.alh1688-page .alh1688-price-tier-hint {
  margin-top: 6px; display: flex; align-items: center;
  gap: 6px; color: var(--alh1688-text-soft, rgba(0, 0, 0, 0.62)); font-size: 14px;
  line-height: 1.45;
}

.alh1688-page .alh1688-price-tier-hint::before {
  content: ""; width: 6px; height: 6px;
  flex: 0 0 auto; border-radius: 50%; background: var(--alh1688-brand, #ff5b00);
  box-shadow: 0 0 0 3px rgba(255, 91, 0, 0.09);
}

.alh1688-page .alh1688-sku-option { overflow: visible; position: relative; }

.alh1688-page .alh1688-sku-option.has-selected-quantity { border-color: rgba(255, 91, 0, 0.46); background: #fffaf7; }

/* จำนวนรวมที่ลูกค้าเลือกใน option หลัก เช่น สีดำรวม 4 ชิ้น */

.alh1688-page .alh1688-sku-option__selected-count {
  min-width: 20px; height: 20px; position: absolute;
  top: -9px; left: -8px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px; border: 2px solid #ffffff; border-radius: 999px;
  background: var(--alh1688-brand, #ff5b00); color: #ffffff; font-size: 14px;
  font-weight: 900; line-height: 1; box-shadow: 0 3px 8px rgba(255, 91, 0, 0.24);
  pointer-events: none;
}

.alh1688-page .alh1688-sku-quantity-row__price-before-tier {
  color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px; text-decoration: line-through;
  line-height: 1.2;
}

/* หมายเหตุแยกตามตัวเลือก SKU */

.alh1688-page .alh1688-sku-quantity-row__note { grid-column: 1 / -1; width: 100%; margin-top: 8px; }

.alh1688-page .alh1688-sku-quantity-row__note-label {
  display: block; margin-bottom: 4px; color: var(--alh1688-text-soft, rgba(0, 0, 0, .62));
  font-size: 14px; font-weight: 700;
}

.alh1688-page .alh1688-sku-quantity-row__note textarea {
  display: block; width: 100%; min-height: 52px;
  padding: 8px 10px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 9px;
  background: #fff; color: var(--alh1688-text, #222); font: inherit;
  font-size: 14px; line-height: 1.45; resize: vertical;
}

.alh1688-page .alh1688-sku-quantity-row__note textarea:focus {
  outline: none; border-color: var(--alh1688-brand, #ff5b00); box-shadow: 0 0 0 3px rgba(255, 91, 0, .10);
}

.alh1688-page .alh1688-sku-quantity-row__tier-note {
  color: var(--alh1688-brand, #ff5b00); font-size: 14px; font-weight: 700;
  line-height: 1.25;
}

.alh1688-page .alh1688-selection-box__tier-summary {
  margin-top: 8px; padding: 8px 10px; border-radius: 9px;
  background: rgba(255, 91, 0, 0.06); color: var(--alh1688-text-soft, rgba(0, 0, 0, 0.62)); font-size: 14px;
  line-height: 1.5;
}

.alh1688-page .alh1688-selection-box__tier-summary strong { color: var(--alh1688-brand, #ff5b00); }

.alh1688-page .alh1688-sku-quantity-row__price-group {
  min-width: 0; display: flex; align-items: flex-start;
  flex-direction: column; gap: 1px;
}

.alh1688-page .alh1688-sku-quantity-row__price-baht {
  color: var(--alh1688-text, #222222); font-size: 14px; font-weight: 800;
  line-height: 1.25;
}

.alh1688-page .alh1688-sku-quantity-row__price-yuan {
  color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px; line-height: 1.25;
}

.alh1688-page .alh1688-selection-box__rate {
  margin-top: 11px; padding: 10px 11px; display: flex;
  align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid rgba(255, 91, 0, 0.14); border-radius: 10px; background: #fffaf7;
}

.alh1688-page .alh1688-selection-box__rate.is-rate-missing { border-color: rgba(245, 158, 11, 0.28); background: #fffaf0; }

.alh1688-page .alh1688-selection-box__rate-copy { min-width: 0; }

.alh1688-page .alh1688-selection-box__rate-copy span, .alh1688-page .alh1688-selection-box__rate-copy small { display: inline-block; }

.alh1688-page .alh1688-selection-box__rate-copy span {
  color: var(--alh1688-text-soft, rgba(0, 0, 0, 0.62)); font-size: 14px; font-weight: 700;
}

.alh1688-page .alh1688-selection-box__rate-copy small {
  margin-top: 2px; color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px;
}

.alh1688-page .alh1688-selection-box__rate-value {
  flex: 0 0 auto; color: var(--alh1688-brand, #ff5b00); font-size: 12px;
  font-weight: 850; text-align: right; white-space: nowrap;
}

.alh1688-page .alh1688-selection-box__total-values {
  min-width: 0; display: flex; align-items: flex-end;
  flex-direction: column; gap: 3px;
}

.alh1688-page .alh1688-selection-box__total .alh1688-selection-box__total-baht {
  max-width: none; color: var(--alh1688-brand, #ff5b00); font-size: 25px;
  font-weight: 900; line-height: 1; letter-spacing: -0.5px;
  text-align: right;
}

.alh1688-page .alh1688-selection-box__total-yuan {
  color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px; font-weight: 700;
  line-height: 1.2;
}

.alh1688-page .alh1688-selection-box__money-note {
  margin-top: 8px; color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px;
  line-height: 1.55; text-align: right;
}

.alh1688-page .alh1688-selected-sku-item__calculation { line-height: 1.5; }

.alh1688-page .alh1688-selected-sku-item__money {
  flex: 0 0 auto; display: flex; align-items: flex-end;
  flex-direction: column; gap: 2px; text-align: right;
}

.alh1688-page .alh1688-selected-sku-item__total-baht {
  color: var(--alh1688-brand, #ff5b00); font-size: 13px; font-weight: 850;
  white-space: nowrap;
}

.alh1688-page .alh1688-selected-sku-item__total-yuan {
  color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px; font-weight: 700;
  white-space: nowrap;
}

.alh1688-page .alh1688-recommend-card__price {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 5px;
}

.alh1688-page .alh1688-recommend-card__price-baht { color: var(--alh1688-brand, #ff5b00); font-size: 14px; font-weight: 850; }

.alh1688-page .alh1688-recommend-card__price-yuan { color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.40)); font-size: 14px; }

@media (max-width: 575px) {
  .alh1688-page .alh1688-price-cny { margin-top: 7px; }

  .alh1688-page .alh1688-selection-box__rate { align-items: flex-start; flex-direction: column; gap: 5px; }

  .alh1688-page .alh1688-selection-box__rate-value { text-align: left; }

  .alh1688-page .alh1688-selection-box__total .alh1688-selection-box__total-baht { font-size: 23px; }

  .alh1688-page .alh1688-price-tier-list { grid-auto-columns: minmax(112px, 44%); }

  .alh1688-page .alh1688-sku-option__selected-count { top: -8px; left: -6px; }
}

/* ==================================================================
   20) DESKTOP PURCHASE PANEL LOCK
   JS ควบคุม 3 สถานะ: normal, fixed, bottom; คอลัมน์เดิมเป็น Placeholder
   ใช้ร่วมกับ Cuba Template ซึ่งมี overflow: hidden ที่ .page-wrapper
   ================================================================== */

@media (min-width: 1000px) {
  /*
   * Cuba กำหนด .page-wrapper { overflow: hidden; }
   * จึงเปลี่ยนเฉพาะแกน Y เป็น visible ระหว่างใช้งานหน้านี้
   * และยัง clip แกน X ไว้เพื่อไม่ให้ Sidebar สร้าง Horizontal Scroll
   */

  .page-wrapper.alh1688-product-lock-host, .page-wrapper.alh1688-product-lock-host > .page-body-wrapper {
    overflow-x: clip !important; overflow-y: visible !important;
  }

  .page-wrapper.alh1688-product-lock-host .page-body,
  .page-wrapper.alh1688-product-lock-host .page-body > .container-fluid,
  .alh1688-page.alh1688-purchase-pin-ready,
  .alh1688-page.alh1688-purchase-pin-ready #alh1688ProductView,
  .alh1688-page.alh1688-purchase-pin-ready .alh1688-product-layout {
    overflow-y: visible !important;
  }

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-product-layout { align-items: stretch !important; }

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-purchase-column {
    min-width: 0; min-height: 1px; position: relative !important;
    top: auto !important; right: auto !important; bottom: auto !important;
    left: auto !important; align-self: stretch !important; height: auto !important;
    z-index: 7;
  }

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-purchase-card {
    width: 100%; max-height: var( --alh1688-purchase-pin-max-height, calc(100dvh - 104px) ) !important; display: flex;
    flex-direction: column; overflow: hidden !important; box-sizing: border-box;
    margin: 0 !important;
  }

  /* ก่อนเลื่อนถึงจุดล็อก */

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-purchase-column[data-pin-state="normal"] .alh1688-purchase-card {
    position: relative !important; inset: auto !important; transform: none !important;
  }

  /* ล็อกกับ Viewport โดยไม่พึ่ง overflow ของ Cuba */

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-purchase-column[data-pin-state="fixed"] .alh1688-purchase-card {
    position: fixed !important; top: var(--alh1688-purchase-pin-top, 88px) !important; right: auto !important;
    bottom: auto !important; left: var(--alh1688-purchase-pin-left, auto) !important;
    width: var(--alh1688-purchase-pin-width, auto) !important; z-index: 7; transform: none !important;
    box-shadow: 0 18px 42px rgba(30, 35, 50, 0.13), 0 4px 14px rgba(30, 35, 50, 0.06);
  }

  /* เมื่อฝั่งซ้ายใกล้หมด ให้หยุดแผงไว้ที่ขอบล่างของ Layout */

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-purchase-column[data-pin-state="bottom"] .alh1688-purchase-card {
    position: absolute !important; top: auto !important; right: 0 !important;
    bottom: 0 !important; left: 0 !important; width: 100% !important;
    z-index: 7; transform: none !important;
    box-shadow: 0 14px 34px rgba(30, 35, 50, 0.10), 0 3px 10px rgba(30, 35, 50, 0.05);
  }

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-purchase-card__body {
    min-height: 0; flex: 1 1 auto; overflow-x: hidden !important;
    overflow-y: auto !important; scrollbar-gutter: stable; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .alh1688-page.alh1688-purchase-pin-ready .alh1688-purchase-card__footer {
    position: static !important; inset: auto !important; flex: 0 0 auto;
  }
}

/* Mobile/Tablet: ใช้ Layout ต่อกันตามเดิม ไม่ล็อก Panel */

@media (max-width: 999px) {
  .alh1688-page .alh1688-purchase-column {
    position: static !important; inset: auto !important; height: auto !important;
    min-height: 0 !important; z-index: auto !important;
  }

  .alh1688-page .alh1688-purchase-card {
    position: relative !important; inset: auto !important; width: 100% !important;
    max-height: none !important; overflow: visible !important; transform: none !important;
    box-shadow: var(--alh1688-shadow);
  }

  .alh1688-page .alh1688-purchase-card__body { overflow: visible !important; scrollbar-gutter: auto; }
}

/* ==================================================================
   21) PRICE-TIER BADGE CLIPPING GUARD
   คงชุด Override นี้หลัง Price Tier หลัก เพื่อเปิด overflow และจองพื้นที่ป้าย
   หากหน้ายังมี Inline CSS ชุดเดิมตามหลัง ต้องรักษาลำดับ Override ของหน้านั้นด้วย
   ================================================================== */

.alh1688-page .alh1688-price-box { overflow: visible !important; }

.alh1688-page .alh1688-price-tier-list {
  position: relative !important; margin-top: 6px !important;
  /* จองพื้นที่เหนือ Card ให้ Badge ลอยขึ้นมาโดยไม่ถูก Scroll Container ตัด */
  padding: 16px 1px 6px !important;
  /* รายการยังเลื่อนแนวนอนได้ ส่วนแกนตั้งไม่ต้องมี Scroll */
  overflow-x: auto !important; overflow-y: hidden !important; scroll-padding-top: 16px;
}

.alh1688-page .alh1688-price-tier-card { position: relative !important; overflow: visible !important; isolation: isolate; }

.alh1688-page .alh1688-price-tier-card.is-active { z-index: 5 !important; }

.alh1688-page .alh1688-price-tier-card.is-active::after {
  content: "ราคาปัจจุบัน"; position: absolute !important;
  /* ให้ Badge คร่อมอยู่บนเส้นขอบ Card */
  top: 0 !important; right: 8px !important; transform: translateY(-50%) !important;
  z-index: 999 !important; display: inline-flex !important; align-items: center;
  justify-content: center; min-height: 18px; padding: 2px 8px !important;
  border: 2px solid #ffffff; border-radius: 999px; background: var(--alh1688-brand, #ff5b00) !important;
  color: #ffffff !important; box-shadow: 0 3px 8px rgba(255, 91, 0, 0.28); font-size: 8px !important;
  font-weight: 800; line-height: 1; white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 575px) {
  .alh1688-page .alh1688-price-tier-list { padding-top: 15px !important; }

  .alh1688-page .alh1688-price-tier-card.is-active::after { right: 6px !important; font-size: 7px !important; }
}

/* ==================================================================
   22) COMPACT SEARCH BAR — หน้าผลลัพธ์สินค้า
   หน้าเริ่มต้นใช้ Search Hero; หน้าผลลัพธ์ใช้ช่องค้นหาแถวเดียวเต็มความกว้าง
   ================================================================== */

.alh1688-page .alh1688-result-search-shell {
  width: min(calc(100% - 32px), var(--alh1688-content-width, 1540px)); margin: 0 auto; padding: 14px 0 0;
}

.alh1688-page .alh1688-result-search-shell.is-hidden { display: none !important; }

/* ป้องกัน Search Hero ใหญ่ค้างร่วมกับหน้าผลลัพธ์ แม้ CSS อื่น override */

.alh1688-page.is-result-mode #alh1688SearchView { display: none !important; }

.alh1688-page.is-search-mode #alh1688ResultSearchBar { display: none !important; }

.alh1688-page .alh1688-result-search-card {
  min-width: 0; display: flex; align-items: center;
  flex-wrap: nowrap; gap: 12px; padding: 9px 10px 9px 14px;
  border: 1px solid rgba(255, 91, 0, 0.18); border-radius: 16px; background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 22px rgba(30, 35, 50, 0.06);
}

.alh1688-page .alh1688-result-search-card__label {
  min-width: max-content; display: inline-flex; align-items: center;
  gap: 7px; color: var(--alh1688-text-soft, rgba(0, 0, 0, 0.72)); font-size: 14px;
  font-weight: 750; white-space: nowrap;
}

.alh1688-page .alh1688-result-search-card__label .alh1688-icon { width: 17px; height: 17px; color: var(--alh1688-brand, #ff5b00); }

.alh1688-page .alh1688-result-search {
  min-width: 0; flex: 1 1 auto; height: 44px;
  display: flex; align-items: center; flex-wrap: nowrap;
  gap: 7px; padding: 4px 5px 4px 13px; border: 2px solid var(--alh1688-brand, #ff5b00);
  border-radius: 999px; background: #ffffff; box-shadow: 0 6px 16px rgba(255, 91, 0, 0.08);
}

.alh1688-page .alh1688-result-search__icon {
  width: 18px; height: 18px; flex: 0 0 auto;
  color: var(--alh1688-brand, #ff5b00);
}

.alh1688-page .alh1688-result-search__input {
  min-width: 0; width: 100%; flex: 1 1 auto;
  border: 0; outline: 0; background: transparent;
  color: var(--alh1688-text, #222222); font-size: 12px; line-height: 1;
  white-space: nowrap;
}

.alh1688-page .alh1688-result-search__input::placeholder { color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.45)); }

.alh1688-page .alh1688-result-search__action {
  width: 34px; height: 34px; min-width: 34px;
  flex: 0 0 auto; display: inline-flex; align-items: center;
  justify-content: center; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: var(--alh1688-text-faint, rgba(0, 0, 0, 0.45));
}

.alh1688-page .alh1688-result-search__action:hover { background: #f5f5f6; color: var(--alh1688-text, #222222); }

.alh1688-page .alh1688-result-search__action:disabled { cursor: wait; opacity: 0.55; }

.alh1688-page .alh1688-result-search__action-content {
  display: none; align-items: center; justify-content: center;
  pointer-events: none;
}

.alh1688-page .alh1688-result-search__action-content .alh1688-icon { width: 17px; height: 17px; }

.alh1688-page .alh1688-result-search__action[data-search-action="paste"] [data-result-search-action-content="paste"],
.alh1688-page .alh1688-result-search__action[data-search-action="clear"] [data-result-search-action-content="clear"] {
  display: inline-flex;
}

.alh1688-page .alh1688-result-search__submit {
  min-width: 104px; height: 34px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 15px; border: 0;
  border-radius: 999px; background: linear-gradient(100deg, #ff7b35, var(--alh1688-brand, #ff5b00)); color: #ffffff;
  font-size: 14px; font-weight: 850; white-space: nowrap;
}

.alh1688-page .alh1688-result-search__submit .alh1688-icon { width: 16px; height: 16px; }

/* ช่องค้นหาใหม่ทำหน้าที่แทนปุ่มย้อนกลับ จึงลดความซ้ำซ้อนใน Breadcrumb */

.alh1688-page.is-result-mode #alh1688BackToSearchButton { display: none !important; }

@media (max-width: 767px) {
  .alh1688-page .alh1688-result-search-shell {
    width: min(calc(100% - 16px), var(--alh1688-content-width, 1540px)); padding-top: 8px;
  }

  .alh1688-page .alh1688-result-search-card { gap: 0; padding: 6px; border-radius: 14px; }

  .alh1688-page .alh1688-result-search-card__label { display: none; }

  .alh1688-page .alh1688-result-search {
    height: 42px; gap: 5px; padding: 3px 4px 3px 11px;
    border-radius: 12px;
  }

  .alh1688-page .alh1688-result-search__input { font-size: 14px; }

  .alh1688-page .alh1688-result-search__action { width: 32px; height: 32px; min-width: 32px; }

  .alh1688-page .alh1688-result-search__submit {
    min-width: 42px; width: 42px; height: 34px;
    padding: 0; border-radius: 10px;
  }

  .alh1688-page .alh1688-result-search__submit-text { display: none; }
}
/* ==================================================================
   16) DARK MODE — Cuba: <body class="dark-only">
   ================================================================== */

/* ใช้ body.dark-only เพื่อรองรับ class อื่นของ body เช่น page-wrapper */
body.dark-only .alh1688-page {
  --alh1688-brand-soft: rgba(255, 91, 0, 0.16);
  --alh1688-brand-pale: rgba(255, 91, 0, 0.08);
  --alh1688-text: #f1f3f5;
  --alh1688-text-soft: rgba(255, 255, 255, 0.78);
  --alh1688-text-faint: rgba(255, 255, 255, 0.56);
  --alh1688-border: rgba(255, 255, 255, 0.12);
  --alh1688-border-strong: rgba(255, 255, 255, 0.2);
  --alh1688-bg: #1d1e26;
  --alh1688-card: #262932;
  --alh1688-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  background: var(--alh1688-bg);
  color: var(--alh1688-text);
}

body.dark-only .alh1688-page .alh1688-header,
body.dark-only .alh1688-page .alh1688-result-search-bar {
  background: rgba(38, 41, 50, 0.94);
  border-color: var(--alh1688-border);
}

body.dark-only .alh1688-page .alh1688-card,
body.dark-only .alh1688-page .alh1688-search-hero,
body.dark-only .alh1688-page .alh1688-product-card,
body.dark-only .alh1688-page .alh1688-detail-card,
body.dark-only .alh1688-page .alh1688-summary-card {
  background: var(--alh1688-card);
  border-color: var(--alh1688-border);
  box-shadow: var(--alh1688-shadow);
}

body.dark-only .alh1688-page input,
body.dark-only .alh1688-page textarea,
body.dark-only .alh1688-page select,
body.dark-only .alh1688-page .alh1688-hero-search,
body.dark-only .alh1688-page .alh1688-result-search {
  background-color: #1d1e26;
  color: var(--alh1688-text);
  border-color: var(--alh1688-border-strong);
}

body.dark-only .alh1688-page input::placeholder,
body.dark-only .alh1688-page textarea::placeholder {
  color: var(--alh1688-text-faint);
}

body.dark-only .alh1688-page .alh1688-brand,
body.dark-only .alh1688-page .alh1688-search-hero__title,
body.dark-only .alh1688-page h1,
body.dark-only .alh1688-page h2,
body.dark-only .alh1688-page h3,
body.dark-only .alh1688-page h4,
body.dark-only .alh1688-page h5,
body.dark-only .alh1688-page h6 {
  color: var(--alh1688-text);
}

body.dark-only .alh1688-page p,
body.dark-only .alh1688-page label,
body.dark-only .alh1688-page small,
body.dark-only .alh1688-page .alh1688-search-hero__description,
body.dark-only .alh1688-page .alh1688-product-meta,
body.dark-only .alh1688-page .alh1688-result-search__hint {
  color: var(--alh1688-text-soft);
}

body.dark-only .alh1688-page table,
body.dark-only .alh1688-page th,
body.dark-only .alh1688-page td,
body.dark-only .alh1688-page hr {
  border-color: var(--alh1688-border);
}

body.dark-only .alh1688-page .alh1688-market-chip,
body.dark-only .alh1688-page .alh1688-option-card,
body.dark-only .alh1688-page .alh1688-detail-tab,
body.dark-only .alh1688-page .alh1688-hero-search__clear {
  background: #1d1e26;
  color: var(--alh1688-text-soft);
  border-color: var(--alh1688-border-strong);
}

body.dark-only .alh1688-page .alh1688-market-chip:hover,
body.dark-only .alh1688-page .alh1688-option-card:hover,
body.dark-only .alh1688-page .alh1688-detail-tab:hover {
  background: #323846;
}
/* ==================================================================
   24) DESKTOP SKU READABILITY
   ราคาบาท/หยวนอยู่คู่กัน และสต็อกอยู่ใต้ปุ่มจำนวน เฉพาะหน้าจอ PC
   ================================================================== */

@media (min-width: 1000px) {
  .alh1688-page .alh1688-sku-group__label { font-size: 15px; }
  .alh1688-page .alh1688-sku-group__selected { font-size: 13px; }
  .alh1688-page .alh1688-sku-option { min-height: 44px; padding: 6px 11px; font-size: 15px; line-height: 1.4; }

  .alh1688-page .alh1688-sku-quantity-table { container: alh1688-sku / inline-size; }

  .alh1688-page .alh1688-sku-quantity-row {
    grid-template-columns: minmax(56px, 1fr) max-content max-content;
    grid-template-areas: "size price stepper" "size price stock" "note note note";
    column-gap: 8px; row-gap: 4px; padding: 12px;
  }

  .alh1688-page .alh1688-sku-quantity-row__size {
    grid-area: size; min-width: 0; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere;
  }

  /* ส่ง price-group และ stock เข้า Grid ของแถว โดยยังใช้ HTML เดิม */
  .alh1688-page .alh1688-sku-quantity-row__meta { display: contents; }

  .alh1688-page .alh1688-sku-quantity-row__price-group {
    grid-area: price; display: grid; grid-template-columns: max-content max-content;
    align-items: baseline; align-self: center; justify-content: start; gap: 4px 8px;
  }

  .alh1688-page .alh1688-sku-quantity-row__price-baht { font-size: 18px; line-height: 1.4; white-space: nowrap; }
  .alh1688-page .alh1688-sku-quantity-row__price-yuan { font-size: 14px; line-height: 1.4; white-space: nowrap; }
  .alh1688-page .alh1688-sku-quantity-row__price-before-tier,
  .alh1688-page .alh1688-sku-quantity-row__tier-note { grid-column: 1 / -1; font-size: 12px; line-height: 1.4; }

  .alh1688-page .alh1688-sku-quantity-row__stepper {
    grid-area: stepper; justify-self: center; align-self: start;
    height: 38px; grid-template-columns: 34px 44px 34px;
  }

  .alh1688-page .alh1688-sku-quantity-row__stepper input { font-size: 16px; }
  .alh1688-page .alh1688-sku-quantity-row__stepper button { font-size: 21px; }

  .alh1688-page .alh1688-sku-quantity-row__stock {
    grid-area: stock; justify-self: center; align-self: start; width: 114px; max-width: 100%;
    font-size: 12px; line-height: 1.4; text-align: center; overflow-wrap: anywhere;
  }

  .alh1688-page .alh1688-sku-quantity-row__note { grid-area: note; margin-top: 6px; }
  .alh1688-page .alh1688-sku-quantity-row__note-label { font-size: 12px; }
  .alh1688-page .alh1688-sku-quantity-row__note textarea { font-size: 13px; }

  /* ใช้ความกว้างกรอบจริง: จอ PC ที่มี Sidebar อาจเหลือพื้นที่ตัวเลือกน้อย */
  @container alh1688-sku (max-width: 420px) {
    .alh1688-page .alh1688-sku-quantity-row {
      grid-template-columns: minmax(0, 1fr) max-content;
      grid-template-areas: "size size" "price stepper" "price stock" "note note";
    }
  }
}
.lanAlh1688FeesNotIncluded{
  color: #ff0000;
}