/* Single product page — ruby / white / gold (extends home-v2.css + oem-v3.css) */
body.v-pdp { --v-bg: #FBF8F5; --v-surface-2: #F4EDE6; --v-line: #E8DDD3; --w-gold: #B8923A; --w-gold-soft: #E9D9A8; --w-cream: #F7F0E9; }
.v-pdp .p-top { background: radial-gradient(800px 420px at 85% 0%, #F3E6D6 0%, transparent 70%), linear-gradient(180deg, #FDFBF8, #F8F1EA); padding-block: 24px 56px; }
.v-pdp .p-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; margin-top: 8px; }
.v-pdp .p-gallery { position: sticky; top: 92px; }
.v-pdp .p-main { position: relative; background: #fff; border: 1px solid var(--w-gold-soft); border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.v-pdp .p-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.v-pdp .p-sale { position: absolute; top: 14px; right: 14px; background: linear-gradient(180deg, var(--v-gold-hi), var(--v-label)); color: var(--v-label-ink); font-weight: 600; font-size: 13px; padding: 3px 12px; border-radius: 3px; }
.v-pdp .p-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.v-pdp .p-thumbs button { width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 2px solid var(--v-line); border-radius: 8px; background: #fff; overflow: hidden; cursor: pointer; display: block; }
.v-pdp .p-thumbs button.is-on, .v-pdp .p-thumbs button:hover { border-color: var(--v-brand); }
.v-pdp .p-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.v-pdp .p-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.v-pdp .p-cat { align-self: flex-start; font-family: var(--v-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--w-gold); border: 1px solid var(--w-gold-soft); border-radius: 999px; padding: 3px 14px; background: #fff; }
.v-home.v-pdp .p-cat { color: var(--w-gold); }
.v-pdp .p-info h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.25; font-weight: 700; }
.v-pdp .p-sku { font-size: 14px; color: var(--v-muted); }
.v-pdp .p-sku b { font-family: var(--v-mono); color: var(--v-ink); font-weight: 500; }
.v-pdp .p-price { font-family: var(--v-display); font-size: clamp(30px, 3.6vw, 42px); font-weight: 700; color: var(--v-brand); line-height: 1.1; padding-block: 6px; border-block: 1px solid var(--w-gold-soft); font-variant-numeric: tabular-nums; }
.v-pdp .p-price .r2-price-unit { font-size: .5em; font-weight: 500; color: var(--v-muted); margin-left: 4px; }
.v-pdp .p-price del { font-size: .6em; color: var(--v-muted); font-weight: 400; margin-right: 8px; }
.v-pdp .p-price ins { text-decoration: none; }
.v-pdp .p-ask { font-size: .7em; }
.v-pdp .p-unit-note { margin: -4px 0 0; font-size: 14px; color: var(--v-muted); }
.v-pdp .p-short { color: var(--v-ink); }
.v-pdp .p-short ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.v-pdp .p-short li { position: relative; padding-left: 22px; }
.v-pdp .p-short li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--v-label); }
.v-pdp .p-short p { margin: 0; color: var(--v-muted); font-size: 15px; }
.v-pdp .p-short a { color: var(--v-brand); font-weight: 600; text-decoration: underline; text-decoration-color: var(--v-label); text-underline-offset: 3px; }

/* WooCommerce add-to-cart form */
.v-pdp .p-buy form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 0; }
.v-pdp .p-buy .quantity { display: flex; }
.v-pdp .p-buy .quantity input.qty { width: 96px; min-height: 52px; text-align: center; font: inherit; font-weight: 600; font-size: 18px; border: 1.5px solid var(--v-ink); border-radius: 4px; background: #fff; color: var(--v-ink); padding: 0 8px; }
.v-pdp .p-buy .quantity input.qty:focus { outline: 3px solid var(--v-label); outline-offset: 1px; }
.v-pdp .p-buy .single_add_to_cart_button, .v-home.v-pdp .p-buy button.button.alt { flex: 1; min-width: 200px; min-height: 52px; border: 1.5px solid var(--v-brand); border-radius: 4px; background: var(--v-brand); color: #fff; font: inherit; font-weight: 600; font-size: 17px; cursor: pointer; padding: 10px 28px; transition: transform .15s, background .15s; }
.v-pdp .p-buy .single_add_to_cart_button:hover { background: #7E0E1D; transform: translateY(-1px); color: #fff; }
.v-pdp .p-buy table.variations { width: 100%; margin-bottom: 12px; }
.v-pdp .p-buy table.variations select { font: inherit; padding: 10px; border: 1.5px solid var(--v-line); border-radius: 4px; background: #fff; width: 100%; }
.v-pdp .p-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.v-pdp .p-actions .w-btn { flex: 1; min-width: 190px; }
.v-pdp .p-marks { list-style: none; margin: 4px 0 0; padding: 16px 0 0; border-top: 1px solid var(--w-gold-soft); display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; color: var(--v-muted); }
.v-pdp .p-marks li { display: flex; align-items: center; gap: 8px; }
.v-pdp .p-marks .v-i { color: var(--w-gold); font-size: 20px; stroke-width: 1.5; }

/* description */
.v-pdp .p-desc { max-width: 860px; margin-inline: auto; background: #fff; border: 1px solid var(--w-gold-soft); border-radius: 12px; padding: clamp(22px, 4vw, 44px); color: var(--v-ink); }
.v-pdp .p-desc > *:first-child { margin-top: 0; }
.v-pdp .p-desc p { margin: 0 0 14px; color: var(--v-muted); font-size: 17px; }
.v-pdp .p-desc h2 { font-size: 22px; margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--v-label); display: inline-block; }
.v-pdp .p-desc ul, .v-pdp .p-desc ol { margin: 0 0 14px; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.v-pdp .p-desc li::marker { color: var(--w-gold); font-weight: 700; }
.v-pdp .p-desc a { color: var(--v-brand); font-weight: 600; text-decoration: underline; text-decoration-color: var(--v-label); text-underline-offset: 3px; }
.v-pdp .p-desc small { color: var(--v-muted); font-size: 13px; }
.v-pdp .p-desc iframe { max-width: 100%; }

/* notices */
.v-pdp .woocommerce-message, .v-pdp .woocommerce-error, .v-pdp .woocommerce-info { list-style: none; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--w-gold-soft); border-left: 4px solid var(--v-label); border-radius: 6px; background: #fff; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.v-pdp .woocommerce-message .button { background: var(--v-brand); color: #fff; padding: 6px 16px; border-radius: 4px; font-weight: 600; }

@media (max-width: 860px) {
  .v-pdp .p-grid { grid-template-columns: 1fr; gap: 24px; }
  .v-pdp .p-gallery { position: static; }
}
@media (max-width: 520px) {
  .v-pdp .p-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .v-pdp .p-buy .single_add_to_cart_button { flex-basis: 100%; }
  .v-pdp .p-actions .w-btn { flex-basis: 100%; }
}
.v-pdp .v-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--v-muted); margin-bottom: 18px; }
.v-pdp .v-crumbs span[aria-hidden] { color: var(--w-gold); }
@media (max-width: 860px) {
  body.v-pdp { padding-bottom: 76px; }
  .v-pdp .v-float-line { display: none; }
}
.v-pdp .w-banner-img img { max-width: 100%; height: auto; border-radius: 50%; object-fit: cover; aspect-ratio: 1 / 1; }
.v-pdp .woocommerce-variation-price .price { font-weight: 700; color: var(--v-brand); font-size: 22px; }
.v-pdp .p-buy .variations_form .single_variation_wrap { display: flex; flex-direction: column; gap: 12px; }
.v-pdp .p-buy .reset_variations { font-size: 13px; color: var(--v-muted); }
.v-pdp .p-buy .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; }
/* imported long text / URLs must wrap inside the column */
.v-pdp .p-short, .v-pdp .p-desc, .v-pdp .p-info h1 { overflow-wrap: anywhere; word-break: normal; }
.v-pdp .p-short *, .v-pdp .p-desc * { max-width: 100%; }
.v-pdp .p-short img, .v-pdp .p-desc img { height: auto; }
.v-pdp .p-short p, .v-pdp .p-short div { margin: 0 0 8px; }
.v-pdp .p-main { position: relative; }
.v-pdp .p-main > video.p-motion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.v-pdp .p-sale { z-index: 2; }

/* 14/10/2026: ชื่อสินค้าไทยตัดบรรทัดเฉพาะที่เว้นวรรค (ตัวตัดคำไทยของเบราว์เซอร์ไม่รู้จักคำทับศัพท์ เช่น "เจล" → เคยตัดเป็น "เจลน|วดตัว") */
.v-pdp .p-info h1 { word-break: keep-all; }
/* คำอธิบาย: รายการหัวข้อย่อยให้สี/ขนาดเท่าย่อหน้า, ตัวหนาเป็นสีหลัก, h3 ไม่ให้ใหญ่กว่า h2 */
.v-pdp .p-desc li { color: var(--v-muted); font-size: 17px; }
.v-pdp .p-desc strong { color: var(--v-ink); font-weight: 600; }
.v-pdp .p-desc h3 { font-size: 19px; margin: 22px 0 10px; color: var(--v-ink); }
.v-pdp .p-desc hr { border: 0; border-top: 1px solid var(--w-gold-soft); margin: 28px 0 18px; }
/* ชื่อสินค้า: แต่ละช่วงที่คั่นด้วยเว้นวรรคห้ามตัดกลางคำ (ยาวเกินบรรทัดค่อยตัดใน) */
.v-pdp .p-info h1 .p-nw { display: inline-block; max-width: 100%; }

/* 15/10/2026: ตัวเลือกขนาดแบบรูป (สร้างโดย JS ท้าย single-product-pdp.php) */
.v-pdp .p-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.v-pdp .p-swatch { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 6px 8px; border: 2px solid var(--v-line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; color: var(--v-ink); transition: border-color .15s, box-shadow .15s; }
.v-pdp .p-swatch img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 4px; display: block; }
.v-pdp .p-swatch-l { font-weight: 600; font-size: 15px; line-height: 1.3; }
.v-pdp .p-swatch-p { font-size: 13px; color: var(--v-brand); line-height: 1.3; }
.v-pdp .p-swatch-p del { color: var(--v-muted); }
.v-pdp .p-swatch:hover { border-color: var(--w-gold); }
.v-pdp .p-swatch.is-on { border-color: var(--v-brand); box-shadow: 0 0 0 2px var(--v-label); }
.v-pdp .p-swatch:focus-visible { outline: 3px solid var(--v-label); outline-offset: 2px; }
.v-pdp select.p-swatch-select { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
