/* ============================================================
   VI FEERIE — Trang chi tiết sản phẩm
   Dùng chung .crumbbar và .seo-only từ css/shop.css,
   .pcard từ css/products.css
   ============================================================ */

/* WooCommerce-backed product detail overrides. */
.woocommerce-main div.product.vifeerie-product-detail {
  display: block;
  width: 100%;
  max-width: 100%;
}

.woocommerce-main .vifeerie-product-detail .container {
  padding-inline: 32px;
  max-width: 1400px;
}

.woocommerce-main .vifeerie-product-detail .pdtop__row.container,
.woocommerce-main .vifeerie-product-detail .pdrelated>.container {
  max-width: 1400px;
}

@media (max-width: 1200px) {
  .woocommerce-main .vifeerie-product-detail .container {
    padding-inline: 24px;
  }
}

@media (max-width: 640px) {
  .woocommerce-main .vifeerie-product-detail .container {
    padding-inline: 16px;
  }
}

.vifeerie-product-detail .crumbbar__sep {
  width: auto;
  height: auto;
  color: var(--muted);
}

.vifeerie-product-detail .pdgal__nav {
  font-size: 28px;
  line-height: 1;
}

.vifeerie-product-detail .pdgal__zoom {
  font-size: 27px;
  line-height: 1;
}

.vifeerie-product-detail .pdprice__prices {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.vifeerie-product-detail .pdprice__prices > ins { order: 0; }
.vifeerie-product-detail .pdprice__prices > del { order: 1; }
.vifeerie-product-detail .pdprice__prices > .price {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.vifeerie-product-detail .pdprice__prices > .price ins { order: 0; }
.vifeerie-product-detail .pdprice__prices > .price del { order: 1; }

.vifeerie-product-detail .pdprice .amount {
  font-size: 32px;
  font-weight: 600;
  color: var(--brand-deeper);
}

.vifeerie-product-detail .pdprice del .amount {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}

.vifeerie-product-detail .pdprice ins {
  text-decoration: none;
}

.vifeerie-product-detail .pdprice:empty {
  display: none;
}

.vifeerie-product-detail .pdqty input.qty {
  width: 52px;
  height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  text-align: center;
  box-shadow: none;
}

.vifeerie-product-detail .pdqty input.qty::-webkit-inner-spin-button,
.vifeerie-product-detail .pdqty input.qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.vifeerie-product-detail .pdqty input.qty {
  appearance: textfield;
}

.vifeerie-product-detail .pdbuy button:disabled {
  opacity: .68;
  cursor: not-allowed;
}

.woocommerce-main .vifeerie-product-detail .pdbuy button.pdbuy__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: 600 14px/1.2 var(--font-body);
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  vertical-align: middle;
  transform: none;
}

.woocommerce-main .vifeerie-product-detail .pdbuy button.pdbuy__cart:disabled,
.woocommerce-main .vifeerie-product-detail .pdbuy button.pdbuy__cart.disabled {
  opacity: 1;
  cursor: not-allowed;
}

.woocommerce-main .vifeerie-product-detail .pdbuy button.pdbuy__cart:hover:not(:disabled):not(.disabled),
.woocommerce-main .vifeerie-product-detail .pdbuy button.pdbuy__cart:focus-visible:not(:disabled):not(.disabled) {
  border-color: var(--brand-light);
  background: var(--brand-tint);
  color: var(--brand-deep);
  box-shadow: none;
  transform: none;
}

.vifeerie-product-detail .pdvar .vfr-swatches {
  margin: 0;
}

.vifeerie-product-detail .pdvar__value>select {
  width: min(100%, 340px);
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.vifeerie-product-detail .pdvar__value .reset_variations {
  display: inline-block;
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--brand-deep);
}

.vifeerie-product-detail .woocommerce-variation.single_variation {
  display: none !important;
}

.vifeerie-product-detail .pdstock .stock {
  margin: 0;
  font-size: inherit;
}

.vifeerie-product-detail .pdinfo {
  position: relative;
}

.vifeerie-product-detail .pdwishlist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand-deep);
  cursor: pointer;
}

.vifeerie-product-detail .pdwishlist svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.vifeerie-product-detail .pdwishlist.is-active {
  color: #b94368;
}

.vifeerie-product-detail .pdwishlist.is-active svg {
  fill: currentColor;
}

.vifeerie-product-detail .pdtrust__icon {
  flex: 0 0 21px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid var(--brand-deep);
  border-radius: 50%;
  color: var(--brand-deep);
  font-weight: 700;
  line-height: 1;
}

.vifeerie-product-detail .pdstars {
  display: inline-block;
  width: max-content;
  background: linear-gradient(90deg, #e8a33d var(--pd-rating), #d9d4d5 var(--pd-rating));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 19px;
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
}

.vifeerie-product-detail .pdstars--sm {
  font-size: 15px;
}

.vifeerie-product-detail .pdrev__score strong {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.vifeerie-product-detail .pdrev__score>span:last-child {
  font-size: 12px;
  color: var(--muted);
}

.vifeerie-product-detail .pdspec {
  display: block;
  overflow: hidden;
}

.vifeerie-product-detail .pdspec>div {
  display: grid;
  grid-template-columns: 42% 1fr;
  border-bottom: 1px solid var(--line);
}

.vifeerie-product-detail .pdspec>div:last-child {
  border-bottom: 0;
}

.vifeerie-product-detail .pdspec dt,
.vifeerie-product-detail .pdspec dd {
  margin: 0;
  padding: 12px 18px;
  font-size: 14px;
}

.vifeerie-product-detail .pdspec dt {
  border-right: 1px solid var(--line);
  font-weight: 600;
  color: var(--muted);
}

.vifeerie-product-detail .pdrev__text {
  margin-top: 12px;
  line-height: 1.7;
}

.vifeerie-product-detail .pdrev__text p:last-child {
  margin-bottom: 0;
}

.vifeerie-product-detail .pdrev__more {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.vifeerie-product-detail .pdrev__more a {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.vifeerie-product-detail .pdrev__more a[aria-current] {
  background: var(--brand-deep);
  color: #fff;
}

.vifeerie-product-detail .pdrev__notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 7px;
  background: var(--brand-tint);
}

.vifeerie-product-detail .pdmodal__prod {
  display: block;
}

.vifeerie-product-detail .pdform label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
}

.vifeerie-product-detail .pdform input:not([type="submit"]):not([type="checkbox"]),
.vifeerie-product-detail .pdform select,
.vifeerie-product-detail .pdform textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
}

.vifeerie-product-detail .pdform textarea {
  min-height: 120px;
  max-height: 180px;
  resize: vertical;
}

.vifeerie-product-detail .pdform p {
  margin: 0 0 16px;
}

.vifeerie-product-detail .pdform .form-submit {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.vifeerie-product-detail .pdform .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
}

.vifeerie-product-detail .pdform .comment-form-cookies-consent input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--brand-deep);
}

.vifeerie-product-detail .pdform .comment-form-cookies-consent label {
  display: inline;
  margin: 0;
  font-weight: 400;
}

.vifeerie-product-detail .pdmodal__box {
  overflow: hidden;
}

body.pdmodal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .vifeerie-product-detail .pdspec>div {
    grid-template-columns: 1fr;
  }

  .vifeerie-product-detail .pdspec dt {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ============================================================
   PHẦN TRÊN: ẢNH + THÔNG TIN
   ============================================================ */
.pdtop__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 40px;
  align-items: start;
}

/* ---------------- Thư viện ảnh ---------------- */
.pdgal {
  position: sticky;
  top: calc(var(--navbar-h) + 20px);
}

.pdgal__stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}

.pdgal__viewport {
  position: relative;
  aspect-ratio: 1 / 1;
}

/* Ảnh gốc là ảnh dọc có thẻ thông số ở đáy — cắt giống thẻ sản phẩm
   để chỉ lấy phần khuôn mặt, giấu thẻ thông số đi. */
.pdgal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.pdgal__img.is-active {
  opacity: 1;
}

.pdgal__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pdgal__zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(56, 34, 19, 0.12);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.pdgal__zoom:hover {
  background: #fff;
  transform: scale(1.06);
}

.pdgal__zoom svg {
  width: 17px;
  height: 17px;
}

/* Nút lật ảnh */
.pdgal__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(56, 34, 19, 0.14);
  opacity: 0;
  transition: opacity 0.25s var(--ease), background 0.2s var(--ease);
}

.pdgal__stage:hover .pdgal__nav,
.pdgal__nav:focus-visible {
  opacity: 1;
}

.pdgal__nav:hover {
  background: #fff;
}

.pdgal__nav--prev {
  left: 12px;
}

.pdgal__nav--next {
  right: 12px;
}

.pdgal__nav svg {
  width: 17px;
  height: 17px;
}

.pdgal__counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(41, 24, 33, 0.55);
  color: #fff;
  font-size: 12px;
}

/* ---------------- Băng ảnh nhỏ ---------------- */
.pdthumbs {
  margin-top: 12px;
}

.pdthumbs__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
}

.pdthumbs__viewport.is-draggable {
  cursor: grab;
}

.pdthumbs__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.pdthumbs__viewport::-webkit-scrollbar {
  display: none;
}

.pdthumbs__track {
  display: flex;
  gap: 8px;
}

.pdthumbs__track li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.pdthumb {
  display: block;
  width: 78px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-soft);
  transition: border-color 0.2s var(--ease), opacity 0.2s var(--ease);
  opacity: 0.72;
}

.pdthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  user-select: none;
  -webkit-user-drag: none;
}

.pdthumb:hover {
  opacity: 1;
}

.pdthumb.is-active {
  border-color: var(--brand-deep);
  opacity: 1;
}

/* ============================================================
   THÔNG TIN SẢN PHẨM
   ============================================================ */
.pdinfo__brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  width: fit-content;
  max-width: calc(100% - 46px);
  padding: 4px 8px;
  border: 1px solid #dfb8cf;
  border-radius: 4px;
  font-weight: 400;
}

.pdinfo__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-deep);
  transition: color 0.2s var(--ease);
}

.pdinfo__brand:hover {
  color: var(--ink);
}

.pdinfo__brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.pdinfo__sku {
  font-size: 12.5px;
  color: var(--muted);
}

.pdinfo__sku b {
  color: var(--text);
  font-weight: 400;
}

.pdinfo__title {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 33px;
  font-weight: 600;
  line-height: 1.24;
  color: var(--ink);
}

/* ---------------- Sao ---------------- */
.pdstars {
  display: inline-flex;
  gap: 1px;
}

.pdstars svg {
  width: 16px;
  height: 16px;
  fill: #e8a33d;
  stroke: none;
}

.pdstars svg.is-off {
  fill: var(--line);
}

/* Nửa sao: một ngôi xám nằm dưới, một ngôi vàng cắt còn nửa trái đè lên.
   Cách cũ chỉ cắt một thẻ svg nên nửa phải bị mất hẳn, không ra hình sao. */
.pdstar-half {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
}

.pdstar-half svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: none;
}

/* Phải bám thêm .pdstar-half, vì .pdstars svg ở trên cũng là 2 hạng
   nên nếu viết một hạng thì màu vàng ở đó vẫn thắng, nửa xám không ra. */
.pdstar-half .pdstar-half__bg {
  fill: var(--line);
}

.pdstar-half .pdstar-half__fg {
  fill: #e8a33d;
  clip-path: inset(0 50% 0 0);
}

.pdstars--sm svg {
  width: 13px;
  height: 13px;
}

.pdstars--sm .pdstar-half {
  width: 13px;
  height: 13px;
}

.pdinfo__rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.pdinfo__rating b {
  color: var(--ink);
  font-weight: 700;
}

.pdinfo__reviewlink {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pdinfo__reviewlink:hover {
  color: var(--ink);
}

.pdinfo__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--brand-light);
}

.pdinfo__excerpt {
  margin-bottom: 20px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
}

/* ---------------- Giá ---------------- */
.pdprice {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin-bottom: 24px;
  border-radius: 0;
  background: none;
}

.pdprice__new {
  font-size: 29px;
  font-weight: 700;
  color: var(--brand-deeper);
}

.pdprice__old {
  font-size: 16px;
  color: var(--muted);
  text-decoration: line-through;
}

.pdprice__save {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 0;
  background: var(--brand-light);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.vifeerie-product-detail .pdprice .pdprice__save .amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.pdprice__save[hidden] { display: none; }

/* ============================================================
   CHỌN BIẾN THỂ
   ============================================================ */
.pdvar__group {
  margin-bottom: 20px;
}

.pdvar__group--color {
  margin-bottom: 26px;
}

/* The color name is printed below each swatch. Keep the native label for screen readers. */
.pdvar__group--color .pdvar__head {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__list {
  gap: 8px;
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 104px;
  min-height: 132px;
  height: auto;
  padding: 9px 6px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
  color: var(--text);
  font: 400 14px/1.2 var(--font-body);
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item:hover,
.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item.is-active {
  border-color: #d9b4ca;
  background: #f4eaf0;
  box-shadow: none;
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item--image img {
  width: 80px;
  height: 80px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item--color::before {
  content: "";
  width: 80px;
  height: 80px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--swatch-color, #eee);
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item--color {
  background-color: #fff;
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item--color.is-active,
.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item--color:hover {
  background-color: #f4eaf0;
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__caption {
  display: block;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.vifeerie-product-detail .pdvar__group--color .vfr-swatches__item--text {
  justify-content: center;
  min-height: 52px;
  padding: 8px;
}

.vifeerie-product-detail .pdvar__group--power .vfr-swatches__list {
    display: flex;
    flex-wrap: wrap;
  gap: 6px;
}

.vifeerie-product-detail .pdvar__group:not(.pdvar__group--color) .vfr-swatches__item--text {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.vifeerie-product-detail .pdvar__group.pdvar__group--power .vfr-swatches__item--text {
  width: max-content;
  min-width: 56px;
  height: 34px;
  padding: 3px 4px;
  border-radius: 7px;
  font-size: 12.5px;
}

.vifeerie-product-detail .pdvar__group:not(.pdvar__group--color) .vfr-swatches__item--text.is-active {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
  box-shadow: none;
}

.vifeerie-product-detail .vfr-swatches__item.is-out {
  opacity: .6;
  cursor: not-allowed;
}

.vifeerie-product-detail .vfr-swatches__item.is-out::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, transparent calc(50% - .5px), #d7a9c4 50%, transparent calc(50% + .5px));
  pointer-events: none;
}

.pdvar__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

.pdvar__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pdvar__note {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.pdvar__picked {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

/* ---------------- Ô màu ---------------- */
.pdvar__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdsw {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 3px;
  border: 1.6px solid var(--line);
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pdsw img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.pdsw:hover {
  border-color: var(--brand-light);
  transform: translateY(-2px);
}

.pdsw.is-active {
  border-color: var(--brand-deep);
  border-width: 2px;
}

/* Hết hàng: gạch chéo và mờ đi */
.pdsw.is-out {
  opacity: 0.4;
  cursor: not-allowed;
}

.pdsw.is-out::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(to bottom right,
      transparent calc(50% - 1px), var(--ink) 50%, transparent calc(50% + 1px));
}

.pdsw.is-out:hover {
  transform: none;
  border-color: var(--line);
}

.pdsw__tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.pdsw:hover .pdsw__tip {
  opacity: 1;
}

/* ---------------- Nút chọn biến thể ---------------- */
.pdvar__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdvar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 64px);
  gap: 6px;
}

.pdopt {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.pdopt em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.pdopt:hover {
  border-color: var(--brand-light);
  background: var(--brand-tint);
}

.pdopt.is-active {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
  font-weight: 600;
}

.pdopt.is-active em {
  color: rgba(255, 255, 255, 0.75);
}

.pdopt--sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 34px;
  padding: 3px 5px;
  text-align: center;
  font-size: 12px;
}

/* Hết hàng: gạch ngang qua chữ */
.pdopt.is-out {
  position: relative;
  color: var(--muted);
  background: var(--bg-soft);
  cursor: not-allowed;
  overflow: hidden;
}

.pdopt.is-out::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right,
      transparent calc(50% - 0.5px), var(--brand-light) 50%, transparent calc(50% + 0.5px));
}

.pdopt.is-out:hover {
  border-color: var(--line);
  background: var(--bg-soft);
}

.pdvar__warn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 13px;
  color: #b4553f;
}

.pdvar__warn[hidden] {
  display: none;
}

.pdvar__warn svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* ============================================================
   SỐ LƯỢNG + NÚT MUA
   ============================================================ */
.pdbuy__row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 16px;
}

.pdqty {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.pdqty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  color: var(--ink);
  transition: background 0.2s var(--ease);
}

.pdqty__btn:hover {
  background: var(--brand-tint);
}

.pdqty__btn svg {
  width: 15px;
  height: 15px;
}

.pdqty__input {
  width: 46px;
  height: 44px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.pdqty__input:focus {
  outline: none;
  background: var(--brand-tint);
}

.pdstock {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
}

.pdstock b {
  color: var(--ink);
  font-weight: 600;
}

.pdstock__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5aa06f;
  box-shadow: 0 0 0 3px rgba(90, 160, 111, 0.18);
}

/* ---------------- Ba nút mua ---------------- */
/* Giữ ba nút cùng hàng trên desktop; Shopee rộng hơn để nhãn không xuống dòng. */
.pdbuy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.38fr);
  gap: 10px;
}

/* .btn trong app.css đặt width: max-content nên phải ghi đè,
   không thì nút co lại theo chữ và ba nút so le nhau. */
.pdbuy__now,
.pdbuy__cart {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 14px;
}

.pdbuy__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pdbuy__cart svg {
  display: block;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.pdbuy__cart span {
  display: block;
  line-height: 1.2;
}

.pdbuy__shopee {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 12px;
  white-space: nowrap;
  border: 1px solid #ffd9c7;
  border-radius: var(--radius);
  background: #fff5f0;
  font-size: 13.5px;
  font-weight: 600;
  color: #d9481f;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.pdbuy__shopee:hover {
  background: #ffece2;
  border-color: #ffc2a6;
}

.pdbuy__shopee img {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.pdbuy__done {
  margin-top: 12px;
  padding: 11px 15px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  font-size: 13.5px;
  color: var(--brand-deeper);
}

.pdbuy__done[hidden] {
  display: none;
}

/* ---------------- Cam kết ---------------- */
.pdtrust {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pdtrust li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.pdtrust svg {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  margin-top: 1px;
  color: var(--brand-deep);
}

.pdtrust span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12.5px;
  color: var(--muted);
}

.pdtrust b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================
   TAB MÔ TẢ / THÔNG SỐ / ĐÁNH GIÁ
   ============================================================ */
.pdtabs {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.pdtabs__bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.pdtabs__bar::-webkit-scrollbar {
  display: none;
}

.pdtab {
  position: relative;
  flex-shrink: 0;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.pdtab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand-deep);
  transform: scaleX(0);
  transition: transform 0.28s var(--ease);
}

.pdtab:hover {
  color: var(--ink);
}

.pdtab.is-active {
  color: var(--brand-deep);
}

.pdtab.is-active::after {
  transform: scaleX(1);
}

.pdtab__count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand-tint);
  font-size: 11.5px;
  color: var(--brand-deep);
}

.pdpanel[hidden] {
  display: none;
}

/* ---------------- Nội dung mô tả ---------------- */
.pdprose {
  max-width: none;
}

.pdprose h2 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  color: var(--ink);
}

.pdprose h3 {
  margin: 30px 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.pdprose p {
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}

.pdprose ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.pdprose li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.75;
  list-style: disc;
  color: var(--text);
}

.pdprose li::marker {
  color: var(--brand-deep);
}

.pdprose b {
  font-weight: 600;
  color: var(--ink);
}

.pdprose blockquote {
  margin: 22px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand-tint);
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.75;
  color: var(--text);
}

/* ---------------- Bảng thông số ---------------- */
.pdspec__scroll {
  overflow-x: auto;
}

.pdspec {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.pdspec th,
.pdspec td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: left;
}

.pdspec tr:last-child th,
.pdspec tr:last-child td {
  border-bottom: 0;
}

/* Cả hai cột đều nền trắng; phân biệt cột nhãn bằng đường kẻ dọc
   và màu chữ nhạt hơn, không dùng nền màu nữa. */
.pdspec th {
  width: 42%;
  border-right: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  color: var(--muted);
}

.pdspec td {
  background: #fff;
  color: var(--ink);
}

/* ============================================================
   ĐÁNH GIÁ
   ============================================================ */
.pdrev__summary {
  display: grid;
  grid-template-columns: 190px 1fr 240px;
  gap: 40px;
  align-items: center;
  padding: 26px 28px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pdrev__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.pdrev__score b {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.pdrev__score em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
}

.pdrev__bars {
  display: grid;
  gap: 7px;
}

.pdrev__bars li {
  display: grid;
  grid-template-columns: 44px 1fr 32px;
  align-items: center;
  gap: 11px;
  font-size: 12.5px;
  color: var(--muted);
}

.pdrev__bars b {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.pdrev__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.pdrev__bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #e8a33d;
}

.pdrev__cta {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.pdrev__cta p {
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------------- Lọc theo sao ---------------- */
.pdrev__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.pdrev__filter {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.pdrev__filter span {
  color: var(--muted);
}

.pdrev__filter:hover {
  border-color: var(--brand-light);
}

.pdrev__filter.is-active {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
  font-weight: 600;
}

.pdrev__filter.is-active span {
  color: rgba(255, 255, 255, 0.75);
}

/* ---------------- Danh sách đánh giá ---------------- */
.pdrev__list {
  display: grid;
  gap: 18px;
}

.pdrev__item {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pdrev__item.is-hidden {
  display: none;
}

.pdrev__who {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 11px;
}

.pdrev__ava {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-soft);
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-deeper);
}

.pdrev__who>div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdrev__who b {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.pdrev__meta {
  font-size: 12px;
  color: var(--muted);
}

.pdrev__text {
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--text);
}

.pdrev__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pdrev__photos img {
  width: 84px;
  height: 84px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 22%;
}

.pdrev__empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}

.pdrev__empty[hidden] {
  display: none;
}

.pdrev__more {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

/* ============================================================
   SẢN PHẨM LIÊN QUAN
   ============================================================ */
.pdrelated__head {
  margin-bottom: 30px;
  text-align: center;
}

.pdrelated__carousel {
  position: relative;
}

.pdrelated__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.pdrelated__viewport::-webkit-scrollbar {
  display: none;
}

.pdrelated__track {
  display: flex;
  gap: 20px;
}

.pdrelated__track > .pcard {
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 0;
  scroll-snap-align: start;
}

.pdrelated__nav {
  position: absolute;
  z-index: 2;
  top: 40%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #eadde5;
  border-radius: 50%;
  background: #fff;
  color: #39261d;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
}

.pdrelated__nav--prev { left: 8px; }
.pdrelated__nav--next { right: 8px; }
.pdrelated__nav[disabled] { display: none; }
.pdrelated__nav:hover,
.pdrelated__nav:focus-visible { border-color: #96718d; color: #96718d; }

/* ============================================================
   POPUP VIẾT ĐÁNH GIÁ
   ============================================================ */
.pdmodal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pdmodal[hidden] {
  display: none;
}

.pdmodal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(41, 24, 33, 0.5);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.pdmodal.is-open .pdmodal__scrim {
  opacity: 1;
}

.pdmodal__box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: calc(100dvh - 48px);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 60px rgba(56, 34, 19, 0.24);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  overflow: hidden;
}

.pdmodal.is-open .pdmodal__box {
  opacity: 1;
  transform: none;
}

.pdmodal__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.pdmodal__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
}

.pdmodal__x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.pdmodal__x:hover {
  background: var(--brand-tint);
  color: var(--ink);
}

.pdmodal__x svg {
  width: 17px;
  height: 17px;
}

.pdmodal__prod {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.pdmodal__prod img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 22%;
}

.pdmodal__prod div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdmodal__prod b {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.pdmodal__prod span {
  font-size: 12.5px;
  color: var(--muted);
}

.pdmodal__box .comment-respond {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdmodal__box .comment-reply-title {
  display: none;
}

.pdrev__language-link {
  margin: 0 0 20px;
  font-size: 13px;
}

.pdrev__language-link a {
  color: var(--brand-deep);
  text-decoration: underline;
}

.pdmodal .stars a::before {
  color: #d8cfd3;
}

.pdmodal .stars a:hover::before,
.pdmodal .stars a.active::before,
.pdmodal .stars.selected a::before {
  color: #e8a33d;
}

/* ---------------- Biểu mẫu ---------------- */
.pdform {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 20px 22px 0;
}

.pdform > * {
  grid-column: 1 / -1;
}

.pdform > .comment-form-author {
  grid-column: 1;
}

.pdform > .comment-form-email {
  grid-column: 2;
}

.woocommerce-main .vifeerie-product-detail #pdModal input#submit.btn--brand {
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid var(--brand-deep);
  border-radius: 999px;
  background: var(--brand-deep);
  color: #fff;
  font: 600 14px var(--font-body);
  cursor: pointer;
}

.woocommerce-main .vifeerie-product-detail #pdModal input#submit.btn--brand:hover {
  background: var(--brand-deeper);
  border-color: var(--brand-deeper);
}

.pdform__field {
  display: block;
  margin-bottom: 18px;
}

.pdform__two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pdform__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.pdform__label i {
  font-style: normal;
  color: #c0553c;
}

.pdform__hint {
  font-weight: 400;
  color: var(--muted);
}

.vff-input,
.vff-select,
.vff-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
}

.vff-textarea {
  resize: vertical;
  line-height: 1.7;
}

.vff-input:focus,
.vff-select:focus,
.vff-textarea:focus {
  outline: none;
  border-color: var(--brand-deep);
}

.vff-input::placeholder,
.vff-textarea::placeholder {
  color: #bcaeb5;
}

/* ---------------- Chấm sao ---------------- */
.pdrate {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pdrate__star {
  padding: 2px;
  color: var(--line);
  transition: transform 0.15s var(--ease);
}

.pdrate__star svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  stroke: none;
}

.pdrate__star:hover {
  transform: scale(1.12);
}

.pdrate__star.is-on {
  color: #e8a33d;
}

.pdrate__text {
  margin-left: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------- Chọn ảnh ---------------- */
.pdupload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px;
  border: 1.5px dashed var(--brand-light);
  border-radius: var(--radius);
  background: var(--brand-tint);
  font-size: 13.5px;
  color: var(--brand-deep);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.pdupload:hover {
  border-color: var(--brand-deep);
  background: var(--brand-soft);
}

.pdupload input {
  display: none;
}

.pdupload svg {
  width: 19px;
  height: 19px;
}

.pdupload__list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.pdupload__list li {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--muted);
}

.pdmodal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.pdform__done {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  font-size: 13.5px;
  color: var(--brand-deeper);
}

.pdform__done[hidden] {
  display: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 1200px) {
  .pdtop__row {
    gap: 36px;
  }

  .pdrev__summary {
    grid-template-columns: 160px 1fr;
    gap: 28px;
  }

  .pdrev__cta {
    grid-column: 1 / -1;
    padding-left: 0;
    padding-top: 20px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* Từ đây header đổi kiểu dính: navbar ẩn, midbar dính lại */
@media screen and (max-width: 1050px) {
  .pdgal {
    top: calc(var(--midbar-h) + 18px);
  }
}

@media screen and (max-width: 900px) {
  .pdtop__row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pdgal {
    position: static;
  }

  .pdinfo__title {
    font-size: 27px;
  }

  .pdprice__new {
    font-size: 25px;
  }

  .vifeerie-product-detail .pdprice .amount { font-size: 32px; }
  .vifeerie-product-detail .pdprice del .amount { font-size: 16px; }

  /* Màn hình cảm ứng không có hover nên để nút lật ảnh hiện sẵn */
  .pdgal__nav {
    opacity: 1;
  }

  /* Layout 1 cột, nút mua xếp dọc cho dễ bấm trên tablet */
  .pdbuy {
    display: flex;
    flex-direction: column;
  }

  .pdbuy__now,
  .pdbuy__cart,
  .pdbuy__shopee {
    flex: 0 0 auto;
    width: 100%;
  }

  .pdbuy__row {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Review summary: breakpoint trung gian giữa 1200 và 560 */
  .pdrev__summary {
    grid-template-columns: 140px 1fr;
    gap: 22px;
    padding: 22px;
  }
}

@media screen and (max-width: 1023px) {
  .pdrelated__track > .pcard {
    flex-basis: calc((100% - 40px) / 3);
  }
}

@media screen and (max-width: 820px) {
  .pdrelated__track {
    gap: 14px;
  }

  .pdrelated__track > .pcard {
    flex-basis: calc((100% - 14px) / 2);
  }

  .pdspec th {
    width: 46%;
  }
}

@media screen and (max-width: 560px) {
  .pdtop__row {
    gap: 26px;
  }

  /* Brand row cho phép wrap khi cột hẹp */
  .pdinfo__brandrow {
    flex-wrap: wrap;
  }

  .pdinfo__title {
    font-size: 23px;
  }

  .pdinfo__excerpt {
    font-size: 13.5px;
  }

  .pdprice {
    padding: 0;
  }

  .pdprice__new {
    font-size: 23px;
  }

  .vifeerie-product-detail .pdprice .amount { font-size: 30px; }
  .vifeerie-product-detail .pdprice del .amount { font-size: 16px; }

  .pdprice__save {
    margin-left: 6px;
  }

  .vifeerie-product-detail .pdvar__group--power .vfr-swatches__list { gap: 5px; }

  .pdthumb {
    width: 56px;
  }

  /* Grid độ cận: giảm minmax để vừa màn nhỏ */
  .pdvar__grid {
    grid-template-columns: repeat(auto-fill, 64px);
    gap: 6px;
  }

  .pdopt--sm {
    padding: 3px 5px;
    font-size: 12px;
  }

  /* Tab bar: padding phải để tab cuối không bị cắt khi cuộn */
  .pdtabs__bar {
    justify-content: flex-start;
    padding: 0 4px;
    gap: 2px;
  }

  .pdtab {
    padding: 12px 15px;
    font-size: 13.5px;
  }

  .pdrev__summary {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .pdrev__score {
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
  }

  .pdrev__score b {
    font-size: 34px;
  }

  /* Review item padding giảm */
  .pdrev__item {
    padding: 16px 14px;
  }

  /* Review photos giảm kích thước */
  .pdrev__photos img {
    width: 66px;
    height: 66px;
  }

  .pdmodal {
    padding: 0;
    align-items: flex-end;
  }

  .pdmodal__box {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .pdform__two {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pdform {
    grid-template-columns: 1fr;
    padding: 18px 16px 0;
  }

  .pdform > .comment-form-author,
  .pdform > .comment-form-email {
    grid-column: 1;
  }

  .pdrate__star svg {
    width: 26px;
    height: 26px;
  }

  .pdmodal__foot {
    flex-direction: column-reverse;
  }

  .pdmodal__foot .btn {
    width: 100%;
  }
}

/* ---------- Mobile nhỏ (iPhone SE, 399px trở xuống) ---------- */
@media screen and (max-width: 400px) {
  .pdtop__row {
    gap: 20px;
  }

  .pdinfo__brandrow {
    gap: 8px;
  }

  .pdinfo__title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .pdinfo__rating {
    gap: 5px;
    font-size: 12px;
  }

  .pdinfo__excerpt {
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 14px;
  }

  .pdprice {
    padding: 0;
    gap: 8px;
    margin-bottom: 18px;
  }

  .pdprice__new {
    font-size: 20px;
  }

  .vifeerie-product-detail .pdprice .amount { font-size: 28px; }

  .pdprice__old {
    font-size: 14px;
  }

  .vifeerie-product-detail .pdprice del .amount { font-size: 14px; }

  .pdprice__save {
    font-size: 11px;
    padding: 2px 6px;
  }

  /* Thumbnails nhỏ hơn nữa */
  .pdthumb {
    width: 48px;
  }

  /* Ô màu lens nhỏ hơn */
  .pdsw {
    width: 40px;
    height: 40px;
    padding: 2px;
  }

  /* Grid độ cận: cố định 4 cột để không bị bóp */
  .pdvar__grid {
    grid-template-columns: repeat(4, 64px);
    gap: 5px;
  }

  .pdopt--sm {
    padding: 3px 4px;
    font-size: 12px;
  }

  .pdvar__label {
    font-size: 12px;
  }

  .pdvar__picked {
    font-size: 12.5px;
  }

  /* Nút mua nhỏ hơn */
  .pdbuy__now,
  .pdbuy__cart,
  .pdbuy__shopee {
    height: 46px;
    font-size: 13px;
  }

  .woocommerce-main .vifeerie-product-detail .pdbuy button.pdbuy__cart {
    height: 46px;
    font-size: 13px;
  }

  /* Cam kết */
  .pdtrust svg {
    width: 18px;
    height: 18px;
  }

  .pdtrust b {
    font-size: 12.5px;
  }

  .pdtrust span {
    font-size: 11.5px;
  }

  /* Tabs */
  .pdtab {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Bảng thông số: cột nhãn hẹp hơn */
  .pdspec th,
  .pdspec td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .pdspec th {
    width: 44%;
  }

  /* Mô tả */
  .pdprose h2 {
    font-size: 20px;
  }

  .pdprose h3 {
    font-size: 15px;
  }

  .pdprose p,
  .pdprose li {
    font-size: 13.5px;
  }

  /* Review */
  .pdrev__score b {
    font-size: 28px;
  }

  .pdrev__filter {
    padding: 6px 10px;
    font-size: 12px;
  }

  .pdrev__item {
    padding: 14px 12px;
  }

  .pdrev__text {
    font-size: 13.5px;
  }

  .pdrev__photos img {
    width: 56px;
    height: 56px;
  }

  /* Sản phẩm liên quan */
  .pdrelated__track {
    gap: 10px;
  }

  .pdrelated__track > .pcard {
    flex-basis: 78%;
  }

  .pdrelated__head .section__title {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .pdpanel.is-active,
  .pdmodal__box,
  .pdgal__img {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------- Bộ sưu tập của sản phẩm ----------------
   Taxonomy riêng, hiển thị giống cách WooCommerce hiện thương hiệu. */
.pdcols {
  display: block;
  margin-top: 16px;
}

.pdcols__label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pdcols__list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pdcols__item {
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  color: var(--brand-deep);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.pdcols__item:hover {
  border-color: var(--brand-deep);
  background: var(--brand-tint);
}
