/**
 * PDP (product-view) — แยกจาก main.css
 * Markup: includes/partials/product-detail.php · tokens จาก :root ใน main.css
 */

.pdp-page {
  color: var(--text, #0a1f44);
  font-family: "Noto Sans Thai", Sarabun, Tahoma, sans-serif;
}

/* เปิด overflow ให้ CSS sticky ใช้ได้ (page-shell ปกติเป็น overflow:clip) */
body.page-product-view .page-shell {
  overflow: visible;
}

/* กันสกอลบาร์แนวนอนทุกจอ — ไม่ใส่ overflow บน ancestor ของ tabs */
html:has(body.page-product-view),
body.page-product-view {
  overflow-x: clip;
  max-width: 100%;
}
body.page-product-view .pdp-page,
body.page-product-view .pdp-page .container,
body.page-product-view .pdp-below,
body.page-product-view .pdp-below__main,
body.page-product-view .pdp-recommend-shop,
body.page-product-view .shop-grid {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


.pdp-page .container {
  max-width: var(--container, 1140px);
}

.pdp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--muted, #536177);
}

.pdp-breadcrumb a {
  color: var(--navy-soft, #163560);
  text-decoration: none;
}

.pdp-breadcrumb a:hover { text-decoration: underline; }
.pdp-breadcrumb__sep { opacity: 0.55; }
.pdp-breadcrumb__current {
  color: var(--navy, #0a1f44);
  font-weight: 650;
}

.pdp-category-count {
  margin: -0.25rem 0 1rem;
  font-size: 0.86rem;
  color: var(--muted, #536177);
}

.pdp-layout {
  display: grid;
  gap: 1.25rem 1.75rem;
  align-items: start;
}

@media (min-width: 900px) {
  .pdp-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 1.75rem 2.25rem;
  }
}

.pdp-gallery { position: relative; }

.pdp-gallery__main {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(160deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  aspect-ratio: 1 / 1;
}

.pdp-gallery__main > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdp-gallery__badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pdp-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
}

.pdp-badge--cart { background: var(--navy, #0a1f44); }

.pdp-gallery__badges[hidden],
.pdp-badge[hidden],
.pdp-badge:empty,
.pdp-gallery__media-tags[hidden],
.pdp-gallery__media-tag[hidden] {
  display: none !important;
}

.pdp-gallery__badges:not(:has(.pdp-badge:not(:empty))) {
  display: none !important;
}

.pdp-gallery__media-tags {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
}

.pdp-gallery__media-tag {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: var(--navy, #0a1f44);
}

.pdp-gallery__media-tag--ship {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.28);
  color: #047857;
}

.pdp-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pdp-gallery__thumb {
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.pdp-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-gallery__thumb.is-active {
  border-color: var(--gold, #b89a64);
  box-shadow: 0 0 0 1px rgba(184, 154, 100, 0.35);
}

.pdp-gallery__main.is-sold-out > img {
  filter: grayscale(0.35) brightness(0.92);
}

.pdp-soldout-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(8, 22, 47, 0.42);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pdp-info { min-width: 0; }

.pdp-badge-line { margin: 0 0 0.65rem; }

.pdp-badge-line .product-tag {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: var(--navy, #0a1f44);
  color: #f7f6f4;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}

.pdp-title {
  margin: 0 0 0.65rem;
  color: var(--navy, #0a1f44);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.pdp-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.pdp-label {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  background: rgba(184, 154, 100, 0.14);
  color: var(--navy, #0a1f44);
  border: 1px solid rgba(184, 154, 100, 0.28);
}

.pdp-label--locked {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--muted, #536177);
}

.pdp-label--deal,
.pdp-label--promo {
  background: rgba(185, 28, 28, 0.08);
  border-color: rgba(185, 28, 28, 0.18);
  color: #9f1239;
}

.pdp-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0 0 0.95rem;
  font-size: 0.95rem;
}

.pdp-rating__stars {
  color: #c9a227;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  line-height: 1;
}

.pdp-rating__score {
  font-weight: 750;
  color: var(--navy, #0a1f44);
}

.pdp-rating__count a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.pdp-rating__count a:hover { text-decoration: underline; }

.pdp-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #ece7df;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.pdp-price__sale {
  margin: 0;
  color: #b91c1c;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
}

.pdp-price__sale--plain { color: var(--navy, #0a1f44); }

.pdp-price__was {
  margin: 0;
  color: #8b93a3;
  font-size: 0.95rem;
}

.pdp-price__was s { text-decoration: line-through; }

.pdp-price__pct {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 8px;
  background: #fde2e2;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 750;
}

.pdp-deal-name,
.pdp-offer-qty,
.pdp-variant-single,
.pdp-hint {
  margin: 0 0 0.65rem;
  color: var(--muted, #536177);
  font-size: 0.9rem;
}

.pdp-hint { color: #9f1239; }

.pdp-hint[hidden] { display: none !important; }

.pdp-variants { margin: 0 0 1rem; }

.pdp-variants__label,
.pdp-offers__label {
  margin: 0 0 0.55rem;
  color: var(--navy, #0a1f44);
  font-size: 0.98rem;
  font-weight: 750;
}

.pdp-variants__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdp-variant {
  min-width: 4.25rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: var(--navy, #0a1f44);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pdp-variant:hover { border-color: rgba(184, 154, 100, 0.55); }

.pdp-variant.is-selected {
  background: #e8dfd0;
  border-color: rgba(184, 154, 100, 0.7);
  box-shadow: inset 0 0 0 1px rgba(184, 154, 100, 0.25);
}

.pdp-offers { margin: 0 0 1.1rem; }

.pdp-offers__list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pdp-offer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pdp-offer:hover { border-color: rgba(184, 154, 100, 0.45); }

.pdp-offer.is-selected {
  background: #e8dfd0;
  border-color: rgba(184, 154, 100, 0.75);
  box-shadow: inset 0 0 0 1px rgba(184, 154, 100, 0.28);
}

.pdp-offer__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
}

.pdp-offer__price strong {
  color: #b91c1c;
  font-size: 1.12rem;
  font-weight: 800;
}

.pdp-offer__price s {
  color: #8b93a3;
  font-size: 0.9rem;
}

.pdp-offer__price em {
  font-style: normal;
  display: inline-flex;
  padding: 0.12rem 0.42rem;
  border-radius: 7px;
  background: #fde2e2;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 750;
}

.pdp-offer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
  color: #4b5568;
  font-size: 0.86rem;
}

.pdp-offer__deal,
.pdp-offer__cart-only { font-weight: 650; }

.pdp-offer__status { color: var(--muted, #536177); }

.pdp-offer__sidecar-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  margin-top: 0.15rem;
}

.pdp-offer__sidecar {
  font-size: 0.8rem;
  color: var(--muted, #536177);
}

.pdp-offer__sidecar.is-on { color: #047857; }
.pdp-offer__sidecar.is-off { color: #9ca3af; }

.pdp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}

.pdp-actions .pdp-buy-form,
.pdp-actions [data-pdp-buy-slot] { display: contents; }

.pdp-buy-btn {
  min-height: 46px;
  border-radius: 12px !important;
  font-weight: 700;
}

.pdp-buy-btn--info {
  background: linear-gradient(135deg, #d4c4a0 0%, #b89a64 100%) !important;
  color: var(--navy-deep, #08162f) !important;
  box-shadow: none;
}

.pdp-buy-btn--info:hover { filter: brightness(1.03); }

.pdp-buy-btn--cart {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%) !important;
  gap: 0.4rem;
}

.pdp-buy-btn--cart__qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #fff;
  color: #ea580c;
  font-size: 0.78rem;
  font-weight: 800;
}

.pdp-buy-btn--shopee {
  background: linear-gradient(135deg, #ee4d2d 0%, #f1582c 100%) !important;
  gap: 0.4rem;
}

.pdp-buy-btn--shopee__icon { display: inline-flex; }

.pdp-buy-btn--cart--pc-only { display: none; }

@media (min-width: 900px) {
  .pdp-buy-btn--cart--pc-only { display: inline-flex; }
}

@media (max-width: 899px) {
  body.has-mobile-buybar .pdp-actions { display: none; }
}

/* placeholder ค้างใน markup — ไม่ใช้แล้ว (เลิก JS fixed) */
.pdp-tabs-ph {
  display: none !important;
  height: 0 !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ทุกจอ: CSS sticky อย่างเดียว — ไม่มี JS ตั้ง width/fixed */
.pdp-tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1.25rem 0 0.85rem;
  padding: 0.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 22px rgba(8, 22, 47, 0.1);
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pdp-panel,
#pdp-reviews,
#pdp-reviews-long,
#pdp-reviews-service,
#pdp-details,
#pdp-recommend {
  scroll-margin-top: 3.75rem;
}


.pdp-tabs__link {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  color: var(--muted, #536177);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
}

.pdp-tabs__link.is-active {
  background: var(--navy, #0a1f44);
  color: #fff;
}

.pdp-below {
  display: grid;
  gap: 1.25rem;
}

.pdp-panel {
  margin: 0 0 1.35rem;
  padding: 1.1rem 1.15rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.pdp-panel__head { margin-bottom: 0.85rem; }

.pdp-panel__head h2 {
  margin: 0 0 0.25rem;
  color: var(--navy, #0a1f44);
  font-size: 1.15rem;
  font-weight: 800;
}

.pdp-panel__meta {
  margin: 0;
  color: var(--muted, #536177);
  font-size: 0.88rem;
}

.pdp-panel__meta a {
  color: #1d4ed8;
  text-decoration: none;
}

.pdp-empty {
  color: var(--muted, #536177);
  font-size: 0.95rem;
}

.pdp-empty p { margin: 0 0 0.45rem; }

.pdp-details-copy {
  color: var(--text, #0a1f44);
  line-height: 1.65;
  font-size: 0.98rem;
}

.pdp-notes {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  color: var(--text, #0a1f44);
  line-height: 1.55;
}

.pdp-details-cta { margin: 1rem 0 0; }

.pdp-btn-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4c4a0 0%, #b89a64 100%);
  color: var(--navy-deep, #08162f);
  font-weight: 750;
  text-decoration: none;
}

.pdp-btn-detail:hover { filter: brightness(1.03); }

.pdp-recommend-shop { margin-top: 0.35rem; }

/* การ์ดแนะนำ — จำนวนคอลัมน์ตามจอ
   พีซีจอกว้าง ≥900: ไม่แตะ (คง 4 จาก shop-grid)
   แท็บเลตตั้ง / พีซีจอแคบ ≤899: 3
   มือถือตั้ง ≤599 portrait: 2
   มือถือ/แท็บเลตนอน (touch หรือสูงสั้น): 4 — ไม่ดึงพีซีจอแคบที่มีเมาส์ไปเป็น 4 */
@media (max-width: 899px) {
  .pdp-recommend-shop .shop-grid[data-layout="four"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 599px) and (orientation: portrait) {
  .pdp-recommend-shop .shop-grid[data-layout="four"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (hover: none) {
  .pdp-recommend-shop .shop-grid[data-layout="four"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  .pdp-recommend-shop .shop-grid[data-layout="four"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* รีวิวสั้น / ยาว / บริการแชท — 1 คอลัมน์เต็มทุกจอ (ทับ .rv-list / .rv-long-grid ใน main.css) */
.pdp-panel .pdp-rv-stack,
.pdp-panel .rv-list.pdp-rv-stack,
.pdp-panel .rv-long-grid.pdp-rv-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.pdp-rv-pager { margin-top: 0.85rem; }

/* recipe cards: legacy .pdp-recipe-* + NI .ni-recipe-* (cols = recommend) */
.pdp-recipe-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem;
}

.pdp-recipe-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.pdp-recipe-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: #eef2f7;
}

.pdp-recipe-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-recipe-card__glyph {
  font-size: 1.6rem;
  color: var(--gold, #b89a64);
}

.pdp-recipe-card__num {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  background: rgba(10, 31, 68, 0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 750;
}

.pdp-recipe-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.75rem 0.85rem;
}

.pdp-recipe-card__body strong {
  font-size: 0.92rem;
  color: var(--navy, #0a1f44);
}

.pdp-recipe-card__sub {
  font-size: 0.8rem;
  color: var(--muted, #536177);
}

.pdp-recipe-card--tone-0 .pdp-recipe-card__media { background: #eef2f7; }
.pdp-recipe-card--tone-1 .pdp-recipe-card__media { background: #f5efe6; }
.pdp-recipe-card--tone-2 .pdp-recipe-card__media { background: #e8f5ef; }
.pdp-recipe-card--tone-3 .pdp-recipe-card__media { background: #efeaf8; }
.pdp-recipe-card--tone-4 .pdp-recipe-card__media { background: #fdeeee; }

#pdp-recipes.ni-page {
  --ni-ink: var(--navy, #0a1f44);
  --ni-muted: #5b6b82;
  --ni-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, rgba(248, 242, 234, 0.28) 100%);
}

#pdp-recipes .ni-recipe-card__title {
  font-size: 1.02rem;
}

#pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover,
#pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover.pdp-recipe-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem;
}

#pdp-recipes .ni-recipe-card.ni-recipe-card--cover {
  flex-direction: column !important;
  min-height: 0;
}

#pdp-recipes .ni-recipe-card--cover .ni-recipe-card__mark,
#pdp-recipes .ni-recipe-card--cover .ni-recipe-card__mark.ni-recipe-card__mark--cover {
  flex: none !important;
  width: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
}

@media (max-width: 899px) {
  .pdp-recipe-grid,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover.pdp-recipe-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.75rem;
  }
}

@media (max-width: 599px) and (orientation: portrait) {
  .pdp-recipe-grid,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover.pdp-recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (hover: none) {
  .pdp-recipe-grid,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover.pdp-recipe-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  .pdp-recipe-grid,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover,
  #pdp-recipes .ni-recipe-grid.ni-recipe-grid--cover.pdp-recipe-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

.pdp-mini-buy {
  position: fixed;
  top: 50%;
  right: 1rem;
  left: auto;
  bottom: auto;
  z-index: 40;
  width: min(22rem, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(8, 22, 47, 0.16);
  /* ห้าม translate ออกนอกจอ — ทำให้สกอลบาร์ล่างยืด-หดตอนเลื่อน */
  transform: translate(0, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}

.pdp-mini-buy.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pdp-mini-buy__inner {
  max-width: none;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.pdp-mini-buy__head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.pdp-mini-buy__media {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f7;
  flex-shrink: 0;
}

.pdp-mini-buy__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-mini-buy__name {
  margin: 0;
  font-weight: 750;
  color: var(--navy, #0a1f44);
  font-size: 0.95rem;
}

.pdp-mini-buy__price {
  margin: 0.15rem 0 0;
  color: #b91c1c;
  font-weight: 800;
}

.pdp-mini-buy__price s {
  margin-left: 0.4rem;
  color: #8b93a3;
  font-weight: 500;
}

.pdp-mini-buy__price em {
  margin-left: 0.35rem;
  font-style: normal;
  color: #b91c1c;
  font-size: 0.8rem;
}

.pdp-mini-buy__deal {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--muted, #536177);
}

.pdp-mini-buy__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 899px) {
  .pdp-mini-buy { display: none; }
}
/* ========== Storefront cart FAB (ดูตะกร้า) ========== */
[data-storefront-cart-fab-sentinel] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.storefront-cart-fab {
  position: fixed;
  right: 14px;
  bottom: 88px;
  z-index: 90;
  display: none;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.4rem 0.4rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #f97316 0%, #ea580c 55%, #c2410c 100%);
  color: #fff;
  text-decoration: none;
  font-family: "Noto Sans Thai", Sarabun, Tahoma, sans-serif;
  line-height: 1;
  white-space: nowrap !important;
  box-shadow:
    0 12px 28px rgba(234, 88, 12, 0.38),
    0 2px 0 rgba(255, 255, 255, 0.22) inset;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  visibility: hidden;
}

.storefront-cart-fab.is-shown {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.storefront-cart-fab__icon,
.storefront-cart-fab .icon.storefront-cart-fab__icon {
  width: 1.15rem !important;
  height: 1.15rem !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  vertical-align: middle;
  color: #fff;
  stroke: currentColor;
}

.storefront-cart-fab__text {
  display: inline !important;
  white-space: nowrap !important;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #fff;
}

.storefront-cart-fab__lead {
  display: contents;
}

.storefront-cart-fab__orb {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 999px;
  background: #fff;
  color: #c2410c;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
}

.storefront-cart-fab__qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1em;
  color: #c2410c;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  .storefront-cart-fab,
  .storefront-cart-fab.is-shown,
  .storefront-cart-fab--mobile-only.is-shown {
    display: none !important;
  }
}

html:not(.is-line-webview) body.has-mobile-buybar .storefront-cart-fab {
  bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 16px);
}

html:not(.is-line-webview) body.has-glass-preview-bar:not(.has-mobile-buybar) .storefront-cart-fab {
  bottom: calc(76px + env(safe-area-inset-bottom, 0px) + 14px);
}

@media (prefers-reduced-motion: reduce) {
  .storefront-cart-fab {
    transition: none;
  }
}
