/* WooCommerce-specific styles cho Hưng Phát Laptop theme.
 * Load có điều kiện chỉ trên WC pages.
 */

/* ============ ARCHIVE / SHOP LAYOUT ============ */
.hp-shop {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 20px 0;
}
@media (max-width: 1080px) {
  .hp-shop { grid-template-columns: 1fr; }
  .hp-shop__sidebar { order: 2; }
}

.hp-shop__sidebar { position: sticky; top: 140px; align-self: start; }

.hp-shop__main { display: flex; flex-direction: column; gap: 16px; }

.hp-shop__heading {
  background: #fff; border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--line);
}
[data-theme="dark"] .hp-shop__heading { background: var(--bg); }
.hp-shop__heading h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.hp-shop__heading p { margin: 0; color: var(--muted); }
.hp-page-description {
  min-width: 0;
}
.hp-page-description img,
.hp-page-description figure,
.hp-page-description .wp-caption {
  max-width: 100% !important;
}
.hp-page-description img {
  height: auto;
  display: block;
  border-radius: 10px;
}
.hp-page-description figure,
.hp-page-description .wp-caption {
  width: 100% !important;
  margin: 16px 0;
}
.hp-page-description table {
  width: 100% !important;
  max-width: 100%;
  table-layout: fixed;
}
.hp-page-description th,
.hp-page-description td {
  word-break: break-word;
  overflow-wrap: anywhere;
}
.hp-page-description figcaption,
.hp-page-description .wp-caption-text {
  width: auto !important;
  max-width: 100%;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
}

/* Sort bar */
.hp-sort-bar {
  background: #fff; border-radius: var(--radius); padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border: 1px solid var(--line);
}
[data-theme="dark"] .hp-sort-bar { background: var(--bg); }
.hp-sort-bar__label { font-size: 12.5px; color: var(--muted); margin-right: 8px; }
.hp-sort-bar__chip {
  background: var(--bg-2); color: var(--ink-2);
  padding: 6px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 500;
  cursor: pointer; border: 0; text-decoration: none;
}
.hp-sort-bar__chip:hover { background: var(--red-50); color: var(--red); }
.hp-sort-bar__chip.is-active { background: var(--red); color: #fff; }
.hp-sort-bar__count { margin-left: auto; font-size: 12px; color: var(--muted); }

/* Product grid */
.hp-product-grid {
  /* minmax(0,1fr): cột bằng nhau TUYỆT ĐỐI — tránh 1 cột phình to khi card có
     nội dung dài không wrap (tên SP/spec) đẩy min-width vượt 1fr. */
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
@media (max-width: 1240px) { .hp-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px)  { .hp-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .hp-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* ============ SINGLE PRODUCT (PDP) ============ */
.hp-pdp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 28px;
  padding: 20px 0;
}
@media (max-width: 1080px) { .hp-pdp { grid-template-columns: 1fr 380px; gap: 20px; } }
@media (max-width: 768px)  { .hp-pdp { grid-template-columns: 1fr; } }

.hp-pdp__gallery {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; border: 1px solid var(--line);
}
[data-theme="dark"] .hp-pdp__gallery { background: var(--bg); }
.hp-pdp__main-image {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius);
  background: var(--bg-2); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hp-pdp__main-image img { width: 100%; height: 100%; object-fit: contain; }
.hp-pdp__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.hp-pdp__thumb {
  aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: var(--bg-2);
}
.hp-pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hp-pdp__thumb.is-active { border-color: var(--red); }

.hp-pdp__info {
  background: #fff; border-radius: var(--radius-lg);
  padding: 24px; border: 1px solid var(--line);
  align-self: start; position: sticky; top: 140px;
}
[data-theme="dark"] .hp-pdp__info { background: var(--bg); }
.hp-pdp__title { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.01em; }
.hp-pdp__brand-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.hp-pdp__brand { color: var(--red); font-weight: 600; }
.hp-pdp__rating { display: inline-flex; align-items: center; gap: 4px; }
.hp-pdp__rating .stars { color: #ffb800; }

.hp-pdp__price {
  background: var(--red-50); border-radius: var(--radius);
  padding: 14px 16px; margin: 12px 0;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.hp-pdp__price-now { font-size: 26px; font-weight: 800; color: var(--red); }
.hp-pdp__price-was { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.hp-pdp__price-off { font-size: 11px; background: var(--red); color: #fff; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.hp-pdp__installment { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; flex-basis: 100%; }
.hp-pdp__installment strong { color: var(--red); }

.hp-pdp__options { margin: 12px 0; }
.hp-pdp__option-label { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.hp-pdp__option-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-pdp__option-pill {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 12.5px; cursor: pointer; background: #fff;
}
[data-theme="dark"] .hp-pdp__option-pill { background: transparent; }
.hp-pdp__option-pill.is-active { border-color: var(--red); background: var(--red-50); color: var(--red); font-weight: 600; }

.hp-pdp__qty-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.hp-pdp__qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hp-pdp__qty button { width: 36px; height: 36px; background: transparent; border: 0; font-size: 16px; }
.hp-pdp__qty input { width: 48px; height: 36px; border: 0; text-align: center; font-weight: 600; }

.hp-pdp__cta { display: flex; gap: 8px; margin: 12px 0; }
.hp-pdp__cta .hp-btn { flex: 1; padding: 14px 20px; font-size: 14px; }

.hp-pdp__quick-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.hp-pdp__quick-specs .spec { padding: 8px 12px; background: var(--bg-2); border-radius: 6px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.hp-pdp__quick-specs .spec strong { color: var(--ink); }

.hp-pdp__warranty {
  margin-top: 12px; padding: 12px 14px; background: var(--bg-2); border-radius: 8px;
  display: flex; align-items: center; gap: 10px; font-size: 12.5px;
}
.hp-pdp__warranty svg { color: var(--ok); flex-shrink: 0; }

/* Tabs */
.hp-pdp-tabs { margin-top: 24px; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; }
[data-theme="dark"] .hp-pdp-tabs { background: var(--bg); }
.hp-pdp-tabs__nav { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.hp-pdp-tabs__nav button { background: transparent; border: 0; padding: 14px 20px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.hp-pdp-tabs__nav button.is-active { color: var(--red); border-color: var(--red); }
.hp-pdp-tabs__panel { padding: 20px 24px; }
.hp-pdp-tabs__panel[hidden] { display: none; }

/* Spec table */
.hp-spec-table { width: 100%; border-collapse: collapse; }
.hp-spec-table th, .hp-spec-table td { padding: 10px 12px; text-align: left; font-size: 13.5px; vertical-align: top; }
.hp-spec-table th { background: var(--bg-2); color: var(--ink-2); font-weight: 600; width: 35%; }
.hp-spec-table tr:not(:last-child) td, .hp-spec-table tr:not(:last-child) th { border-bottom: 1px solid var(--line); }

/* Reviews */
.hp-reviews { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
@media (max-width: 768px) { .hp-reviews { grid-template-columns: 1fr; } }
.hp-reviews__summary { text-align: center; }
.hp-reviews__avg { font-size: 48px; font-weight: 800; color: var(--red); line-height: 1; }
.hp-reviews__stars { color: #ffb800; font-size: 16px; }
.hp-reviews__count { color: var(--muted); font-size: 13px; }
.hp-reviews__list { display: flex; flex-direction: column; gap: 16px; }
.hp-review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hp-review__head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.hp-review__name { font-weight: 600; }
.hp-review__date { font-size: 12px; color: var(--muted); }

/* Cart */
.woocommerce-cart .hp-main { padding: 24px 0; }
.woocommerce-cart-form { background: #fff; border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--line); }
[data-theme="dark"] .woocommerce-cart-form { background: var(--bg); }
.woocommerce-cart-form table { width: 100%; }
.woocommerce-cart-form th, .woocommerce-cart-form td { padding: 12px; border-bottom: 1px solid var(--line); }
.cart_totals { background: var(--bg-2); border-radius: var(--radius); padding: 18px; margin-top: 16px; }
[data-theme="dark"] .cart_totals { background: var(--bg-3); }

/* Checkout 4-step */
.hp-checkout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; padding: 24px 0; }
@media (max-width: 1080px) { .hp-checkout { grid-template-columns: 1fr; } }
.hp-checkout__steps { display: flex; flex-direction: column; gap: 16px; }
.hp-checkout__step { background: #fff; border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--line); }
[data-theme="dark"] .hp-checkout__step { background: var(--bg); }
.hp-checkout__step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hp-checkout__step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.hp-checkout__step-title { font-size: 16px; font-weight: 700; margin: 0; }
.hp-checkout__sidebar { background: #fff; border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--line); align-self: start; position: sticky; top: 140px; }
[data-theme="dark"] .hp-checkout__sidebar { background: var(--bg); }

/* Form fields */
.hp-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.hp-field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.hp-field label .req { color: var(--red); }
.hp-field input, .hp-field select, .hp-field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px;
  background: #fff; color: var(--ink);
}
[data-theme="dark"] .hp-field input, [data-theme="dark"] .hp-field select, [data-theme="dark"] .hp-field textarea { background: var(--bg); }
.hp-field input:focus, .hp-field select:focus, .hp-field textarea:focus { border-color: var(--red); outline: 0; box-shadow: 0 0 0 3px var(--red-50); }
.hp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 768px) { .hp-field-row { grid-template-columns: 1fr; } }

/* Payment options */
.hp-payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hp-payment-option { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.hp-payment-option:hover { border-color: var(--red); }
.hp-payment-option.is-active { border-color: var(--red); background: var(--red-50); }

/* ============================================================ */
/* === PDP — Pixel-perfect theo design HPStore (detail.jsx) === */
/* ============================================================ */

.pdp { padding: 0 0 40px; }
.pdp-container { max-width: 1320px; }
.pdp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 300px;
  gap: 20px;
  margin: 16px 0;
}
.pdp-grid > * { min-width: 0; }
@media (max-width: 1200px) { .pdp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pdp-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 900px)  { .pdp-grid { grid-template-columns: minmax(0, 1fr); } .pdp-side { grid-template-columns: 1fr; } }
@media (max-width: 768px)  { .pdp-gallery-card { padding: 0; border-radius: 0; box-shadow: none; border-left: 0; border-right: 0; } }

/* Gallery */
.pdp-gallery-wrap { display: flex; flex-direction: column; gap: 14px; }
.pdp-gallery-card {
  background: #fff; border-radius: 12px;
  padding: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  position: relative;
  border: 1px solid var(--line);
}
.pdp-gallery-card .main {
  aspect-ratio: 1/1; border-radius: 8px;
  background: #fff; overflow: hidden; position: relative;
  padding: 6px;
  display: flex; align-items: center; justify-content: center;
}
.pdp-gallery-card .main img { width: 100%; height: 100%; object-fit: contain; }
.pdp-main-placeholder { font-size: 80px; opacity: .3; }
.pdp-gallery-card .thumbs {
  display: grid; grid-template-columns: repeat(5,1fr);
  gap: 8px; margin-top: 12px;
}
.pdp-gallery-card .thumbs .t {
  aspect-ratio: 1/1; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; overflow: hidden;
  background: #fff; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.pdp-gallery-card .thumbs .t img { width: 100%; height: 100%; object-fit: contain; padding: 0; }
.pdp-gallery-card .thumbs .t.active { border-color: var(--red); }

.pdp-badge-genuine {
  position: absolute; top: 14px; left: 14px;
  background: #2096f3; color: #fff !important;
  padding: 5px 14px; border-radius: 99px;
  font-size: 12px; font-weight: 700; z-index: 2;
  box-shadow: 0 4px 12px rgba(32,150,243,.35);
}
.pdp-badge-hot {
  position: absolute; top: 14px; right: 14px;
  background: linear-gradient(135deg, #ff6b00, var(--red));
  color: #fff !important;
  padding: 5px 14px; border-radius: 99px;
  font-size: 12px; font-weight: 700; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  box-shadow: 0 4px 12px rgba(221,51,51,.35);
}
.pdp-badge-hot[hidden] { display: none !important; }

/* Trust strip */
.pdp-trust-strip {
  background: #fff; border-radius: 12px;
  padding: 14px 18px;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--line);
}
.pts-item {
  display: flex; gap: 10px; align-items: center;
  padding: 4px 8px;
  border-right: 1px solid var(--line);
}
.pts-item:last-child { border-right: 0; }
.pts-ico {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--red-50); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pts-h { font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.pts-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.2; }

/* Info column */
.pdp-info {
  background: #fff; border-radius: 12px;
  padding: 22px;
  border: 1px solid var(--line);
}
.pdp-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pdp-brand-tag {
  background: var(--ink); color: #fff !important;
  padding: 4px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.pdp-sku {
  font-size: 11.5px; color: var(--muted);
  font-family: ui-monospace, monospace;
}
.pdp-title {
  font-size: 22px; font-weight: 800; line-height: 1.3;
  margin: 0 0 14px; color: var(--ink);
  letter-spacing: -0.005em;
}
.pdp-rating-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-2);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pdp-rating-row .stars { color: #f5a524; display: inline-flex; gap: 1px; }
.pdp-rating-row .rating-link { color: var(--ink-2); text-decoration: underline; }
.pdp-rating-row .rating-sep { opacity: .4; }
.pdp-rating-row .rating-sold { color: var(--muted); }
.pdp-rating-row .rating-stock { color: #15803d; font-weight: 600; }

/* Price hero — có khung, padding gọn */
.pdp-price-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  padding: 10px 14px;
  margin: 0 0 12px;
}
.pph-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.pph-label { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pph-now { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; color: var(--red); white-space: nowrap; }
.pph-now .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: inherit; }
.pph-was {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400 !important;
  letter-spacing: 0;
  margin-left: 4px;
}
.pph-was .woocommerce-Price-amount,
.pph-was .woocommerce-Price-currencySymbol {
  color: inherit !important;
  font-size: inherit;
  font-weight: 400 !important;
}
.pph-disc { background: var(--red); color: #fff !important; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.pph-installment { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.pph-installment svg { width: 16px; height: 16px; color: var(--red); }
.pph-installment strong { font-weight: 700; color: var(--red); }
@media (max-width: 480px) {
  .pph-now { font-size: 19px; }
  .pph-was { font-size: 12px; margin-left: 0; }
}

/* Spec chips grid */
.pdp-spec-chips {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 18px;
}
.pdp-spec-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}
.pdp-spec-chip.wide { grid-column: 1 / -1; }
.pdp-spec-chip .psc-ic {
  background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700;
  padding: 4px 8px; border-radius: 4px;
  letter-spacing: 0.04em;
  flex-shrink: 0; min-width: 36px; text-align: center;
}
.pdp-spec-chip .psc-l { font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; line-height: 1; }
.pdp-spec-chip .psc-v { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 2px; }

/* Variant block */
.pdp-variant-block { margin-bottom: 16px; }
.pvb-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 700; margin-bottom: 10px;
}
.pvb-label span:first-child { color: var(--ink); }
.pvb-count { font-size: 11px; color: var(--muted); font-weight: 500; }
.variant-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.variant-card {
  position: relative;
  border: 2px solid var(--line); border-radius: 10px;
  padding: 16px 14px; cursor: pointer;
  background: #fff;
  text-align: center;
  transition: all .15s;
}
.variant-card:hover { border-color: var(--red); }
.variant-card.active {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 4px 12px rgba(221,51,51,.08);
}
.vc-check { display: none; }
.variant-card.active .vc-check {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 8px; left: 8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--red); color: #fff;
  box-shadow: 0 2px 5px rgba(221,51,51,.35);
}
.variant-card.active .vc-check svg { width: 12px; height: 12px; }
.vc-body { padding-top: 0; }
.vc-prices { display: none; }
.vc-label {
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
  color: var(--ink); margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Key info boxes (2 box: short_desc + variation_desc) */
.pdp-key-info {
  padding: 14px 18px; margin: 12px 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2);
  font-size: 13.5px; line-height: 2;
  color: var(--ink);
}
.pdp-key-info ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.pdp-key-info ul li {
  position: relative;
  padding-left: 0;
}
.pdp-key-info--variation ul li::before { display: none; }
.pdp-key-info ul li strong { font-weight: 700; color: var(--ink); }
.pdp-spec-icon { width: 16px; text-align: center; color: var(--red); font-size: 15px; flex-shrink: 0; margin-right: 5px; vertical-align: middle; }
.pdp-key-info--variation { background: #fff; }
.pdp-key-info--side {
  background: #fff;
  padding: 16px 18px;
  margin: 0;
}

/* Buybar */
.pdp-buybar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pdp-buybar .qty {
  display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px;
  overflow: hidden; height: 52px;
}
.pdp-buybar .qty button { width: 38px; background: #fff; border: 0; font-size: 18px; color: var(--ink); cursor: pointer; }
.pdp-buybar .qty input {
  width: 46px; border: 0; text-align: center;
  font: inherit; font-size: 14px; font-weight: 700;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background: #fff; color: var(--ink); appearance: none; -moz-appearance: textfield;
}
.pdp-buybar .qty input::-webkit-outer-spin-button,
.pdp-buybar .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-buy-now {
  width: 100%;
  padding: 16px 20px; height: 52px;
  background: linear-gradient(135deg, var(--red), #b82525);
  color: #fff !important;
  border: 0; border-radius: 8px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 6px 16px rgba(221,51,51,.28);
}
.btn-buy-now:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(221,51,51,.4); color: #fff !important; }
.btn-add-cart {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 10px;
  padding: 13px;
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink) !important;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none !important;
}
.btn-add-cart:hover { background: var(--ink); color: #fff !important; }

.btn-call-order {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 10px; padding: 13px;
  background: var(--red-50, #fde8e8);
  border: 1.5px solid rgba(221,51,51,.25);
  color: var(--red-600, #c42828) !important;
  border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .15s; text-decoration: none !important;
}
.btn-call-order:hover { background: rgba(221,51,51,.12); color: var(--red-600, #c42828) !important; }
.btn-call-order strong { font-weight: 800; }
[data-theme="dark"] .btn-call-order,
[data-theme="dark"] .btn-call-order:hover { color: #f87171 !important; }
[data-theme="dark"] .pdp-rating-row .rating-stock { color: #4ade80; }

.btn-text--short { display: none; }
@media (max-width: 480px) {
  .btn-text--full { display: none; }
  .btn-text--short { display: inline; }
}
.btn-add-cart-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px;
  padding: 16px 20px;
  background: var(--ink); color: #fff !important;
  border: 0; border-radius: 8px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 6px 16px rgba(20,20,20,.18);
}
.btn-add-cart-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(20,20,20,.26); color: #fff !important; }
[data-theme="dark"] .btn-add-cart-primary {
  background: var(--bg-3);
  color: var(--ink) !important;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
[data-theme="dark"] .btn-add-cart-primary:hover {
  background: var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

/* Side cards */
.pdp-side { display: flex; flex-direction: column; gap: 14px; }
.pdp-side-card {
  background: #fff; border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
}
.pdp-gift-card { background: #fff; border-color: var(--line); }
.psc-title-modern {
  font-size: 13px; font-weight: 800;
  color: var(--ink); letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  margin-bottom: 14px;
}
.ptm-icon { font-size: 16px; }
.ptm-icon-svg { width: 18px; height: 18px; color: var(--red); }
.ptm-icon-fa { color: var(--red); font-size: 16px; width: 20px; text-align: center; }

.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.gift-item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: #fff; border-radius: 5px; }
.gift-img { width: 80px; height: 80px; object-fit: contain; }
.gift-name { font-size: 12px; color: var(--ink); font-weight: 600; margin-top: 2px; }
.gift-price { font-size: 11.5px; color: var(--red); font-weight: 700; text-decoration: line-through; opacity: .85; }

.benefit-list-modern {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13px; color: var(--ink-2); line-height: 1.4;
}
.benefit-list-modern li { display: flex; gap: 8px; align-items: flex-start; }
.bl-check { width: 16px; height: 16px; color: #16a34a; flex-shrink: 0; margin-top: 1px; }
.benefit-list-modern strong { color: var(--ink); font-weight: 700; }

/* Hotline card — styled like benefit card */
.pdp-hotline-card { border-color: var(--line); }
.phc-h {
  font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,.08); margin-bottom: 0;
}
.phc-h i { color: var(--red); font-size: 16px; width: 20px; text-align: center; }
.phc-sub { display: none; }
.phc-block { padding: 10px 0; border-top: 1px solid var(--line); }
.phc-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.phc-lbl i { color: var(--muted); font-size: 13px; width: 14px; text-align: center; }
.phc-lbl svg { width: 13px; height: 13px; }
.phc-phone { display: block; font-size: 16px; font-weight: 800; letter-spacing: 0.01em; font-family: ui-monospace, monospace; text-decoration: none !important; color: var(--red) !important; }
.phc-phone:hover { text-decoration: underline !important; }
.phc-phone-2 { margin-top: 2px; }
.phc-hours { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Tabs */
.pdp-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.pdp-tabs .tab {
  padding: 13px 22px; font-size: 15.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .035em;
  color: var(--muted); cursor: pointer;
  border: 0; background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s ease, border-color .2s ease;
}
.pdp-tabs .tab:hover { color: var(--ink); }
.pdp-tabs .tab.active { color: var(--red); border-color: var(--red); }

/* Mobile: 3 tab chia đều 1 hàng, không wrap lệch dòng (trước đây xấu) */
@media (max-width: 600px) {
  .pdp-tabs { flex-wrap: nowrap; gap: 2px; align-items: stretch; }
  .pdp-tabs .tab {
    flex: 1 1 0; min-width: 0;
    padding: 9px 4px; font-size: 12px; letter-spacing: .01em;
    line-height: 1.2; text-align: center;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 4px;
  }
}
@media (max-width: 360px) {
  .pdp-tabs .tab { font-size: 11px; padding: 8px 2px; }
}

/* Description grid */
.desc-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
@media (max-width: 900px) { .desc-grid { grid-template-columns: 1fr; } }
.desc-main { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.desc-main p { margin: 0 0 14px; }
.desc-main strong { color: var(--ink); }
.desc-h { font-size: 17px; font-weight: 700; color: var(--ink); margin: 22px 0 10px; }
.desc-bullets { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.desc-bullets li { font-size: 14px; }
.desc-sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 22px;
  align-self: start;
  position: sticky; top: 148px;
}
.desc-sb-title { font-size: 15.5px; font-weight: 800; letter-spacing: 0.035em; text-transform: uppercase; color: var(--red); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin: 0 0 12px; line-height: 1.3; }
.desc-sb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.desc-sb-table td { padding: 9px 4px; vertical-align: top; line-height: 1.45; }
.desc-sb-table td:first-child { color: var(--muted); width: 95px; font-weight: 500; }
.desc-sb-table td:last-child { color: var(--ink); font-weight: 600; }
.desc-sb-table tr { border-bottom: 1px dashed var(--line); }
.desc-sb-table tr:last-child { border-bottom: 0; }

/* Reviews */
.reviews-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.reviews-grid--full { grid-template-columns: 1fr; }
@media (max-width: 768px) { .reviews-grid { grid-template-columns: 1fr; } }
.reviews-summary { text-align: center; padding: 20px; background: var(--bg-2); border-radius: 10px; height: fit-content; }
.reviews-list-col { min-width: 0; }
.reviews-list-col .devvn-woo-reviews-wrap,
.reviews-list-col .devvn-woocommerce-reviews { width: 100% !important; max-width: 100% !important; }

/* Related products — shortcode plugin output dùng class Flatsome (row + large-columns-N).
   Theme không load Flatsome nên cần grid mapping custom. */
.pdp .row.large-columns-5,
.pdp .row.large-columns-4,
.pdp .row.large-columns-3 {
  display: grid;
  gap: 16px;
  margin: 16px 0 0;
}
.pdp .row.large-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pdp .row.large-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pdp .row.large-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .pdp .row.medium-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pdp .row.medium-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pdp .row.small-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pdp .row > .col,
.pdp .row > article,
.pdp .row > .product-small { min-width: 0; }
/* Flatsome inline width style trên col — override */
.pdp .row > [style*="width"] { width: 100% !important; max-width: 100% !important; flex: unset; }
.review-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
.ri-head { display: flex; gap: 8px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.ri-head .stars { color: #f5a524; display: inline-flex; gap: 1px; }
.ri-date { color: var(--muted); }
.ri-text { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.empty-state { padding: 40px 20px; text-align: center; background: var(--bg-2); border-radius: 10px; }
.es-icon { font-size: 40px; margin-bottom: 10px; }
.es-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.es-sub { font-size: 13px; color: var(--muted); max-width: 320px; margin: 0 auto; line-height: 1.5; }

/* Q&A */
.qna-wrap { display: flex; flex-direction: column; gap: 18px; }
.qna-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.qna-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.qna-sub { font-size: 13px; color: var(--muted); }
.qna-list { display: flex; flex-direction: column; gap: 14px; }
.qa-item { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: #fff; }
.qa-q, .qa-a { display: flex; gap: 12px; }
.qa-q { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.qa-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.qa-avatar-q { background: #eef2ff; color: #4338ca; }
.qa-avatar-a { background: var(--red-50); color: var(--red); }
.qa-body { flex: 1; min-width: 0; }
.qa-text { font-size: 14px; line-height: 1.6; color: var(--ink); margin-bottom: 6px; }
.qa-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qa-shop { color: var(--red); font-weight: 700; }
.qna-form { background: var(--bg-2); border-radius: 10px; padding: 20px; margin-top: 8px; scroll-margin-top: 144px; }
.qna-form h4 { margin: 0 0 12px; font-size: 15px; color: var(--ink); }
.qna-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); resize: vertical; }
.qna-form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 14px; flex-wrap: wrap; }
.qna-form-note { font-size: 12px; color: var(--muted); }
.qna-form .btn { background: var(--red); color: #fff !important; padding: 10px 22px; border: 0; border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer; }
.qna-form .btn:disabled { opacity: .6; cursor: not-allowed; }
.qna-author-input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); margin-top: 8px; }
.qna-form-msg { margin-top: 10px; padding: 10px 14px; border-radius: 6px; font-size: 13px; }
.qna-form-msg--success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.qna-form-msg--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* PDP tab panel padding */
.pdp-tabs-section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.pdp-tab-panel { padding: 4px 0; }

/* Hide Woo default elements em đã rewrite */
.pdp .product_title,
.pdp .woocommerce-product-rating,
.pdp .woocommerce-product-details__short-description,
.pdp .cart > .quantity,
.pdp .price,
.pdp form.cart .single_add_to_cart_button:not(.btn-buy-now),
.pdp .product_meta { display: none; }

/* ============ PDP Description — Xem thêm (clamp = chiều cao sidebar) ============ */
.desc-main {
  position: relative;
  overflow: hidden;
  transition: max-height .3s ease;
}
/* Constrain media + caption — content WP có thể chứa <img width="2048"> hoặc
   [caption width="2048"] (render thành <div style="width:2058px">) → cần override
   để fit container. Chỉ target MEDIA + CAPTION wrapper, KHÔNG touch text. */
.desc-main img,
.desc-main a img,
.desc-main figure img {
  max-width: 100% !important;
  height: auto !important;
}
.desc-main .wp-caption,
.desc-main .wp-caption-text {
  max-width: 100% !important;
  width: auto !important;
}
.desc-main figure { max-width: 100%; }
.desc-main.is-expanded {
  max-height: none !important;
}
.desc-readmore-shade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 60px 0 8px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 70%);
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.desc-main.is-expanded .desc-readmore-shade {
  position: static;
  padding: 12px 0 0;
  background: transparent;
}
.desc-readmore-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #fff;
  border: 1.5px solid var(--red);
  color: var(--red);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.desc-readmore-btn:hover { background: var(--red); color: #fff; }
.desc-main.is-expanded .desc-readmore-btn svg { transform: rotate(180deg); }

/* ACF spec table — reset inline style + nice formatting */
.desc-sb-acf table { width: 100% !important; border-collapse: collapse; font-size: 13px; }
.desc-sb-acf table tr { border-bottom: 1px dashed var(--line); }
.desc-sb-acf table tr:last-child { border-bottom: 0; }
.desc-sb-acf td { padding: 9px 4px !important; vertical-align: top; line-height: 1.45; height: auto !important; }
.desc-sb-acf td:first-child { color: var(--muted); width: 95px !important; font-weight: 500; }
.desc-sb-acf td:first-child strong { color: var(--ink); font-weight: 700; }
.desc-sb-acf td:last-child { color: var(--ink); font-weight: 500; }

/* Spec table — multi-option list (CPU/RAM/SSD có nhiều options) */
.desc-sb-table .opts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.desc-sb-table .opts li { padding-left: 12px; position: relative; }
.desc-sb-table .opts li::before { content: '•'; position: absolute; left: 0; color: var(--red); }
.desc-sb-table td { font-size: 12.5px; line-height: 1.5; }

/* Ẩn Q&A của devvn-woocommerce-reviews — dùng tab Hỏi & Đáp riêng của theme */
.hp-devvn-faq-hidden { display: none !important; }

/* ============================================================ */
/* ===  DARK MODE OVERRIDES — woocommerce.css                === */
/* === (Xem barem trong main.css để hiểu quy tắc token)      === */
/* ============================================================ */

/* PDP Gallery */
[data-theme="dark"] .pdp-gallery-card { background: var(--surface); }

/* Long description images — border-radius */
.desc-main img,
.desc-main__inner img,
.pdp-tab-panel img { border-radius: 8px; max-width: 100%; height: auto; }

/* Global WooCommerce image border-radius */
.woocommerce img,
.woocommerce-page img { border-radius: 6px; }

/* PDP Trust strip */
[data-theme="dark"] .pdp-trust-strip { background: var(--surface); }

/* PDP Info column (pixel-perfect layout) */
[data-theme="dark"] .pdp-info { background: var(--surface); }

/* Price hero box */
[data-theme="dark"] .pdp-price-hero { background: var(--surface); }

/* Variant cards */
[data-theme="dark"] .variant-card,
[data-theme="dark"] .variant-card.active { background: var(--surface); }

/* Key info boxes */
[data-theme="dark"] .pdp-key-info--variation,
[data-theme="dark"] .pdp-key-info--side { background: var(--surface); }

/* Qty buttons + input */
[data-theme="dark"] .pdp-buybar .qty button,
[data-theme="dark"] .pdp-buybar .qty input { background: var(--surface); color: var(--ink); }

/* Side cards (gift, benefit, hotline wrapper) */
[data-theme="dark"] .pdp-side-card,
[data-theme="dark"] .pdp-gift-card { background: var(--surface); }
[data-theme="dark"] .gift-item { background: var(--bg-2); }

/* Spec sidebar (description tab) */
[data-theme="dark"] .desc-sidebar { background: var(--surface); }

/* Tab section wrapper */
[data-theme="dark"] .pdp-tabs-section { background: var(--surface); }

/* Q&A items */
[data-theme="dark"] .qa-item { background: var(--surface); }
[data-theme="dark"] .qna-form textarea,
[data-theme="dark"] .qna-author-input { background: var(--bg-3); color: var(--ink); }
[data-theme="dark"] .qa-avatar-q { background: rgba(99,102,241,.18); color: #a5b4fc; }

/* Read-more shade gradient — đổi #fff → var(--surface) */
[data-theme="dark"] .desc-readmore-shade {
  background: linear-gradient(to bottom, rgba(13,17,23,0) 0%, var(--surface) 70%);
}
[data-theme="dark"] .desc-readmore-btn { background: var(--surface); }

/* form fields input/textarea chưa có trong hp-field (devvn review form, etc.) */
[data-theme="dark"] .pdp-buybar .qty { background: var(--surface); }

/* Brand tag — background: var(--ink) flips to #f5f7fa in dark mode */
[data-theme="dark"] .pdp-brand-tag { background: var(--bg-3); color: var(--ink) !important; }

/* Tables inside product description (plain HTML tables from editor) */
[data-theme="dark"] .desc-main__inner table thead tr,
[data-theme="dark"] .desc-main__inner table th { background: var(--bg-3) !important; color: var(--ink) !important; }
[data-theme="dark"] .desc-main__inner table tr:nth-child(odd) { background: var(--bg-2); }
[data-theme="dark"] .desc-main__inner table tr:nth-child(even) { background: var(--bg-3); }
[data-theme="dark"] .desc-main__inner table td,
[data-theme="dark"] .desc-main__inner table th { border-color: var(--line) !important; color: var(--ink); }

/* ============================================================
   CART PAGE
   ============================================================ */

/* Cart layout: form left + totals right */
.woocommerce-cart .hp-main { padding: 24px 0; }
.woocommerce-cart .cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .woocommerce-cart .cart-layout { grid-template-columns: 1fr; } }

/* Cart table */
.woocommerce-cart-form { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--line); }
.woocommerce-cart-form table { width: 100%; border-collapse: collapse; }
.woocommerce-cart-form th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px 12px; border-bottom: 1px solid var(--line); }
.woocommerce-cart-form td { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
.woocommerce-cart-form .product-thumbnail img { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: var(--bg-2); }
.woocommerce-cart-form .product-name a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.woocommerce-cart-form .product-name a:hover { color: var(--red); }
.woocommerce-cart-form .product-remove a { color: var(--muted); font-size: 20px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; }
.woocommerce-cart-form .product-remove a:hover { background: var(--red-50); color: var(--red); }
.woocommerce-cart-form .product-price, .woocommerce-cart-form .product-subtotal { font-weight: 600; color: var(--ink); }
.woocommerce-cart-form .product-subtotal { color: var(--red); font-weight: 700; }

/* Cart qty input */
.woocommerce-cart-form .qty {
  width: 56px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 6px; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--bg-3); color: var(--ink);
}
.woocommerce-cart-form .qty:focus { border-color: var(--red); outline: 0; }

/* Cart actions row */
.woocommerce-cart-form .actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 14px; }
.woocommerce-cart-form .coupon { display: flex; gap: 8px; flex: 1; }
.woocommerce-cart-form .coupon input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 14px; background: var(--bg-3); color: var(--ink); }
.woocommerce-cart-form .coupon input:focus { border-color: var(--red); outline: 0; }
.woocommerce-cart-form button[name="apply_coupon"],
.woocommerce-cart-form button[name="update_cart"] {
  padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-3); color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.woocommerce-cart-form button[name="apply_coupon"]:hover,
.woocommerce-cart-form button[name="update_cart"]:hover { border-color: var(--red); color: var(--red); }

/* Cart totals */
.cart_totals {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--line);
  position: sticky; top: 130px;
}
.cart_totals h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.cart_totals th { font-weight: 600; color: var(--muted); width: 40%; }
.cart_totals .order-total td { font-size: 17px; font-weight: 800; color: var(--red); border-bottom: 0; }
.cart_totals .order-total th { border-bottom: 0; color: var(--ink); font-weight: 700; }

/* Proceed to checkout — placeholder, definitive rule at bottom */
.wc-proceed-to-checkout { margin-top: 14px; }

/* WC notices */
.woocommerce-message, .woocommerce-error, .woocommerce-info {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
  font-size: 14px; list-style: none; border: 0; border-left: 4px solid;
}
/* Ẩn WC icon ::before — icon font (WooCommerce glyph) đè text trong custom theme */
.woocommerce-message::before, .woocommerce-error::before, .woocommerce-info::before { display: none !important; }
.woocommerce-message { background: #f0fdf4; color: #15803d; border-color: #16a34a; }
.woocommerce-error   { background: #fef2f2; color: #b91c1c; border-color: var(--red); }
.woocommerce-info    { background: #eff6ff; color: #1d4ed8; border-color: #3b82f6; }
[data-theme="dark"] .woocommerce-message { background: rgba(22,163,74,.12); color: #4ade80; border-color: #16a34a; }
[data-theme="dark"] .woocommerce-error   { background: rgba(221,51,51,.12); color: #f87171; border-color: var(--red); }
[data-theme="dark"] .woocommerce-info    { background: rgba(59,130,246,.12); color: #93c5fd; border-color: #3b82f6; }

/* Checkout coupon form: input + button cùng 1 hàng */
/* Form coupon ở checkout: WC ẩn sẵn (display:none inline), chỉ bung khi bấm
   "Có mã giảm giá?" → KHÔNG ép display:flex luôn hiện. Chỉ flex-hoá khi WC đã mở
   (jQuery slideDown set inline display:block). */
.checkout_coupon[style*="display: block"],
.checkout_coupon[style*="display:block"] { display: flex !important; gap: 8px; align-items: flex-start; }
.checkout_coupon .form-row-first { flex: 1 1 auto; margin: 0 !important; padding: 0 !important; }
.checkout_coupon .form-row-last  { flex: 0 0 auto; margin: 0 !important; padding: 0 !important; }
.checkout_coupon .form-row-first input.input-text {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; background: var(--bg-3); color: var(--ink);
}
.checkout_coupon .form-row-first input.input-text:focus { border-color: var(--red); outline: 0; }
.checkout_coupon button[name="apply_coupon"] {
  padding: 10px 16px; background: var(--ink); color: #fff; border: 0; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.checkout_coupon button[name="apply_coupon"]:hover { background: var(--red); }

/* ============================================================
   CHECKOUT — WC native form fields override
   ============================================================ */

/* WC inputs trong billing/shipping form */
.woocommerce-checkout .woocommerce-form-row input.input-text,
.woocommerce-checkout .woocommerce-form-row select,
.woocommerce-checkout .woocommerce-form-row textarea,
.woocommerce-checkout p.form-row input.input-text,
.woocommerce-checkout p.form-row select {
  background: var(--bg-3); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: 14px;
  width: 100%; transition: border-color .15s, box-shadow .15s;
}
.woocommerce-checkout .woocommerce-form-row input.input-text:focus,
.woocommerce-checkout .woocommerce-form-row select:focus,
.woocommerce-checkout p.form-row input.input-text:focus {
  border-color: var(--red); outline: 0;
  box-shadow: 0 0 0 3px rgba(221,51,51,.12);
}
.woocommerce-checkout .woocommerce-form-row label,
.woocommerce-checkout p.form-row label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 4px;
}
.woocommerce-checkout .woocommerce-form-row abbr { color: var(--red); }

/* Select2 dark mode */
[data-theme="dark"] .select2-container--default .select2-selection--single {
  background: var(--bg-3); border-color: var(--line); color: var(--ink);
}
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ink); }
[data-theme="dark"] .select2-dropdown { background: var(--bg-2); border-color: var(--line); }
[data-theme="dark"] .select2-results__option { color: var(--ink); }
[data-theme="dark"] .select2-container--default .select2-results__option--highlighted { background: var(--red); color: #fff; }
[data-theme="dark"] .select2-search__field { background: var(--bg-3); color: var(--ink); border-color: var(--line); }

/* Place order button */
#place_order {
  display: block; width: 100%;
  padding: 15px 20px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), #b82525);
  color: #fff !important; font-weight: 700; font-size: 15px;
  text-align: center; border: 0; cursor: pointer;
  box-shadow: 0 6px 16px rgba(221,51,51,.28);
  transition: box-shadow .2s, transform .15s;
}
#place_order:hover { box-shadow: 0 8px 22px rgba(221,51,51,.4); transform: translateY(-1px); }

/* ============================================================
   MY ACCOUNT PAGE
   ============================================================ */

.woocommerce-account .hp-main { padding: 0; }
.woocommerce-account .woocommerce { display: block; }

/* Navigation */
.woocommerce-MyAccount-navigation ul {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line);
  overflow: hidden;
}
.woocommerce-MyAccount-navigation li a {
  display: block; padding: 12px 18px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.woocommerce-MyAccount-navigation li:last-child a { border-bottom: 0; }
.woocommerce-MyAccount-navigation li a:hover { background: var(--bg-2); color: var(--red); }
.woocommerce-MyAccount-navigation li.is-active a {
  background: var(--red-50); color: var(--red); font-weight: 700;
  border-left: 3px solid var(--red);
}
[data-theme="dark"] .woocommerce-MyAccount-navigation li.is-active a {
  background: rgba(221,51,51,.12); color: var(--red);
}

/* Content area */
.woocommerce-MyAccount-content {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px 28px; border: 1px solid var(--line);
}
.woocommerce-MyAccount-content h2, .woocommerce-MyAccount-content h3 {
  font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 16px;
}
.woocommerce-MyAccount-content p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }

/* Orders table */
.woocommerce-orders-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.woocommerce-orders-table th {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: 8px 12px 12px; border-bottom: 2px solid var(--line);
  text-align: left;
}
.woocommerce-orders-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.woocommerce-orders-table tr:last-child td { border-bottom: 0; }
.woocommerce-orders-table .woocommerce-button {
  display: inline-block; padding: 6px 14px;
  border-radius: 6px; background: var(--bg-3);
  color: var(--ink); font-size: 12.5px; font-weight: 600;
  text-decoration: none; transition: background .15s, color .15s;
}
.woocommerce-orders-table .woocommerce-button:hover { background: var(--red); color: #fff; }

/* Address boxes */
.woocommerce-Addresses .woocommerce-Address {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px 22px;
}
.woocommerce-Addresses address { font-style: normal; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.woocommerce-Addresses .edit { margin-top: 12px; display: inline-block; }

/* Edit account / login form fields */
.woocommerce-EditAccountForm .woocommerce-form-row input,
.woocommerce-form--login .woocommerce-form-row input,
.lost_reset_password input {
  background: var(--bg-3); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: 14px;
  width: 100%; transition: border-color .15s;
}
.woocommerce-EditAccountForm .woocommerce-form-row input:focus,
.woocommerce-form--login .woocommerce-form-row input:focus {
  border-color: var(--red); outline: 0;
}
.woocommerce-EditAccountForm .woocommerce-form-row label,
.woocommerce-form--login .woocommerce-form-row label,
.lost_reset_password label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 4px;
}
.woocommerce-form--login { max-width: 480px; }
.woocommerce-form--login .woocommerce-button,
.woocommerce-EditAccountForm button[type="submit"],
.lost_reset_password button[type="submit"] {
  padding: 11px 28px; border-radius: 8px; border: 0;
  background: linear-gradient(135deg, var(--red), #b82525);
  color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: box-shadow .2s;
}
.woocommerce-form--login .woocommerce-button:hover,
.woocommerce-EditAccountForm button[type="submit"]:hover { box-shadow: 0 6px 16px rgba(221,51,51,.32); }

/* Status badges */
.woocommerce-orders-table .wc-order-status,
.woocommerce-order-status {
  display: inline-block; padding: 3px 10px;
  border-radius: 100px; font-size: 12px; font-weight: 700;
}
.woocommerce-order-status--processing,
mark.order-status.processing { background: #dbeafe; color: #1d4ed8; }
.woocommerce-order-status--completed,
mark.order-status.completed  { background: #dcfce7; color: #15803d; }
.woocommerce-order-status--pending,
mark.order-status.pending    { background: #fef9c3; color: #854d0e; }
.woocommerce-order-status--cancelled,
mark.order-status.cancelled  { background: #fee2e2; color: #b91c1c; }
[data-theme="dark"] mark.order-status.processing { background: rgba(29,78,216,.18); color: #93c5fd; }
[data-theme="dark"] mark.order-status.completed  { background: rgba(21,128,61,.18); color: #4ade80; }
[data-theme="dark"] mark.order-status.pending    { background: rgba(133,77,14,.18); color: #fde047; }
[data-theme="dark"] mark.order-status.cancelled  { background: rgba(185,28,28,.18); color: #f87171; }

/* ============================================================
   CART PAGE — 2-col grid layout (WC native structure)
   ============================================================ */

/* WC shortcode wraps in .woocommerce — reset grid, cart-page/.cart-grid handles layout */
.woocommerce-cart .woocommerce {
  display: block;
}

/* Cart form — column 1 */
.woocommerce-cart-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--line);
}
[data-theme="dark"] .woocommerce-cart-form { background: var(--bg); }
.woocommerce-cart-form table { width: 100%; border-collapse: collapse; }
.woocommerce-cart-form th {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
  padding: 8px 10px 12px; border-bottom: 1px solid var(--line);
  text-align: left;
}
.woocommerce-cart-form td {
  padding: 14px 10px; border-bottom: 1px solid var(--line);
  vertical-align: middle; color: var(--ink);
}
.woocommerce-cart-form .product-thumbnail img {
  width: 72px; height: 72px; object-fit: contain;
  border-radius: 8px; background: var(--bg-2); display: block;
}
.woocommerce-cart-form .product-name a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.woocommerce-cart-form .product-name a:hover { color: var(--red); }
.woocommerce-cart-form .product-remove a {
  color: var(--muted); font-size: 20px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
}
.woocommerce-cart-form .product-remove a:hover { background: var(--red-50); color: var(--red); }
.woocommerce-cart-form .product-subtotal .woocommerce-Price-amount { color: var(--red); font-weight: 700; }

/* Cart qty input in table */
.woocommerce-cart-form .qty,
.woocommerce-cart-form input[type="number"].qty {
  width: 56px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 6px; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--bg-3) !important; color: var(--ink) !important;
}
.woocommerce-cart-form .qty:focus { border-color: var(--red); outline: 0; }

/* Cart actions row */
.woocommerce-cart-form td.actions {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; border-bottom: 0; padding-top: 14px;
}
.woocommerce-cart-form .coupon {
  display: flex; gap: 8px; flex: 1; min-width: 220px;
}
.woocommerce-cart-form .coupon .input-text {
  flex: 1; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font: inherit; font-size: 14px;
  background: var(--bg-3); color: var(--ink);
}
.woocommerce-cart-form .coupon .input-text:focus { border-color: var(--red); outline: 0; }

/* Cart collaterals — override WooCommerce core float/width */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals { float: none !important; width: auto !important; }
.cart-collaterals { min-width: 0; }
.cart_totals {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--line);
  position: sticky; top: 130px;
}
[data-theme="dark"] .cart_totals { background: var(--bg); }
.cart_totals h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; color: var(--ink); }
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td {
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--ink);
}
.cart_totals th { font-weight: 600; color: var(--muted); width: 40%; }
.cart_totals .order-total td { font-size: 17px; font-weight: 800; color: var(--red); border-bottom: 0; }
.cart_totals .order-total th { border-bottom: 0; color: var(--ink); font-weight: 700; }

/* Proceed to checkout — definitive rule at bottom */

/* ============================================================
   CHECKOUT — Billing/Shipping 2-col + payment
   ============================================================ */

.col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) { .col2-set { grid-template-columns: 1fr; } }

/* WC native form row */
/* ---- Checkout form fields — chuẩn hoá height + spacing ---- */
/* Ẩn label, dùng placeholder */
.woocommerce-checkout .woocommerce-form-row label:not(.woocommerce-form__label-for-checkbox),
.woocommerce-checkout p.form-row > label:not(.woocommerce-form__label-for-checkbox) { display: none; }

/* Spacing — reset margin, để grid gap xử lý */
.woocommerce-checkout .woocommerce-form-row,
.woocommerce-checkout p.form-row { margin: 0 !important; padding: 0; }

/* Tất cả input text — height cố định 44px */
.woocommerce-checkout .woocommerce-form-row input.input-text,
.woocommerce-checkout p.form-row input.input-text {
  display: block; width: 100%; box-sizing: border-box;
  height: 44px; padding: 0 14px;
  background: var(--bg-3) !important; color: var(--ink) !important;
  border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 14px; line-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
.woocommerce-checkout .woocommerce-form-row input.input-text::placeholder,
.woocommerce-checkout p.form-row input.input-text::placeholder { color: var(--muted); font-size: 13.5px; }
.woocommerce-checkout .woocommerce-form-row input.input-text:focus,
.woocommerce-checkout p.form-row input.input-text:focus {
  border-color: var(--red); outline: 0;
  box-shadow: 0 0 0 3px rgba(221,51,51,.12);
}
.woocommerce-checkout .woocommerce-form-row abbr { color: var(--red); }

/* Ward select — height match Select2 province dropdown */
.woocommerce-checkout p.form-row select#billing_city,
.woocommerce-checkout p.form-row select#shipping_city {
  height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg-3); color: var(--ink); font-size: 14px;
  appearance: auto; width: 100%; box-sizing: border-box;
}
.woocommerce-checkout p.form-row select#billing_city:focus,
.woocommerce-checkout p.form-row select#shipping_city:focus {
  border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(221,51,51,.12);
}
/* State + city fields: thêm gap phía dưới để visual đều với các hàng khác */
.woocommerce-checkout #billing_state_field,
.woocommerce-checkout #billing_city_field,
.woocommerce-checkout #shipping_state_field,
.woocommerce-checkout #shipping_city_field { margin-bottom: 6px !important; }

/* Ward/district select — disabled khi chưa chọn tỉnh */
.woocommerce-checkout p.form-row select#billing_city:disabled,
.woocommerce-checkout p.form-row select#shipping_city:disabled { opacity: .5; cursor: not-allowed; }
/* Select2 disabled state cho ward */
.woocommerce-checkout #billing_city_field .select2-container--disabled .select2-selection--single,
.woocommerce-checkout #shipping_city_field .select2-container--disabled .select2-selection--single {
  opacity: .5; cursor: not-allowed;
}

/* Select2 override cho VN province dropdown */
.woocommerce-checkout .select2-container { width: 100% !important; }
.woocommerce-checkout .select2-container--default .select2-selection--single {
  height: 44px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg-3) !important; display: flex; align-items: center;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: normal; color: var(--ink); padding: 0 14px; font-size: 14px;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; right: 8px; }
.woocommerce-checkout .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(221,51,51,.12);
}
.select2-dropdown { border: 1.5px solid var(--red); border-radius: 10px; overflow: hidden; }
.select2-results__option--highlighted { background: var(--red) !important; }
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13.5px;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--red); outline: none; }

/* Select2 — global fallback */
.select2-container--default .select2-selection--single {
  height: 42px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-3) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 42px; padding: 0 12px; color: var(--ink) !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
[data-theme="dark"] .select2-dropdown { background: var(--bg-2); border-color: var(--line); }
[data-theme="dark"] .select2-results__option { color: var(--ink); background: var(--bg-2); }
[data-theme="dark"] .select2-container--default .select2-results__option--highlighted { background: var(--red); color: #fff; }
[data-theme="dark"] .select2-search__field { background: var(--bg-3) !important; color: var(--ink); border-color: var(--line); }

/* Order review table */
.woocommerce-checkout-review-order-table {
  width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink);
}
.woocommerce-checkout-review-order-table th { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.woocommerce-checkout-review-order-table .order-total td { color: var(--red); font-weight: 800; font-size: 16px; }

/* Payment methods */
.wc_payment_methods { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wc_payment_method {
  border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden;
  transition: border-color .15s;
}
.wc_payment_method:has(input:checked) { border-color: var(--red); }
.wc_payment_method > label {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink);
}
.wc_payment_method > label img { max-height: 24px; margin-left: auto; }
.wc_payment_method > input[type="radio"] { accent-color: var(--red); width: 16px; height: 16px; flex-shrink: 0; }
.payment_box {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 13.5px; color: var(--muted);
}
[data-theme="dark"] .payment_box { background: var(--bg-3); }

/* Place order button */
#place_order {
  display: block; width: 100%;
  padding: 15px 20px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), #b82525) !important;
  color: #fff !important; font-weight: 700; font-size: 15px;
  text-align: center; border: 0; cursor: pointer;
  box-shadow: 0 6px 16px rgba(221,51,51,.28);
  transition: box-shadow .2s, transform .15s;
}
#place_order:hover { box-shadow: 0 8px 22px rgba(221,51,51,.4); transform: translateY(-1px); }

/* ============================================================
   PDP — Sticky bar + qty stepper + btn states
   ============================================================ */

.pdp-qty-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.pdp-qty-stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--surface);
}
.pdp-qty-btn {
  width: 38px; height: 40px;
  background: transparent; border: 0;
  font-size: 18px; color: var(--ink); cursor: pointer;
  transition: background .15s, color .15s;
}
.pdp-qty-btn:hover { background: var(--red-50); color: var(--red); }
.pdp-qty-input {
  width: 48px; text-align: center;
  border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 8px 4px; font: inherit; font-size: 15px; font-weight: 700;
  background: var(--surface); color: var(--ink);
  -moz-appearance: textfield;
}
.pdp-qty-input::-webkit-inner-spin-button,
.pdp-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-qty-input:focus { outline: none; background: var(--bg-2); }
.pdp-in-stock { color: #16a34a; font-size: 13px; font-weight: 600; }
.pdp-out-stock { color: var(--muted); font-size: 13px; }

/* Button loading state */
.btn-add-cart-primary .btn-spinner,
.btn-buy-now .btn-spinner { display: none; }
.btn-add-cart-primary.loading,
.btn-buy-now.loading { opacity: .65; pointer-events: none; }
.btn-add-cart-primary.loading > svg,
.btn-buy-now.loading > svg { display: none; }
.btn-add-cart-primary.loading .btn-spinner,
.btn-buy-now.loading .btn-spinner {
  display: inline-block;
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: hp-spin 0.7s linear infinite;
}
@keyframes hp-spin { to { transform: rotate(360deg); } }



/* ============================================================
   CART PAGE — div-based grid layout (cart.php rewrite)
   ============================================================ */

/* 5-column grid: [product] [price] [qty] [subtotal] [remove] */
.hp-cart-items {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}
[data-theme="dark"] .hp-cart-items { background: var(--bg); }

.hp-cart-head {
  display: grid;
  grid-template-columns: 1fr 120px 140px 120px 44px;
  gap: 0;
  padding: 10px 16px 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.hp-cart-head span {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}

.hp-cart-row {
  display: grid;
  grid-template-columns: 1fr 120px 140px 120px 44px;
  gap: 0;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.hp-cart-row:last-of-type { border-bottom: 0; }

/* Product cell: thumb + meta side by side */
.hp-cart-row__product {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.hp-cart-row__thumb {
  flex-shrink: 0; width: 72px; height: 72px;
  border-radius: 8px; overflow: hidden;
  background: var(--bg-2);
}
.hp-cart-row__thumb img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.hp-cart-row__thumb a { display: block; width: 100%; height: 100%; }
.hp-cart-row__meta { min-width: 0; }
.hp-cart-row__name {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--ink);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hp-cart-row__name:hover { color: var(--red); }
.hp-cart-row__price-m { display: none; }

/* Price / subtotal */
.hp-cart-row__price { font-size: 14px; font-weight: 600; color: var(--ink); }
.hp-cart-row__sub .woocommerce-Price-amount { font-size: 14px; font-weight: 700; color: var(--red); }
.hp-cart-row__sub { color: var(--red); font-weight: 700; }

/* Qty input in cart */
.hp-cart-row__qty .quantity { display: inline-block; }
.hp-cart-row__qty .qty,
.hp-cart-row__qty input[type="number"] {
  width: 60px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 6px; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--bg-3) !important; color: var(--ink) !important;
  -moz-appearance: textfield;
}
.hp-cart-row__qty .qty:focus { border-color: var(--red); outline: 0; }
.hp-cart-row__qty input::-webkit-inner-spin-button,
.hp-cart-row__qty input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Remove button */
.hp-cart-row__remove .remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  color: var(--muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.hp-cart-row__remove .remove:hover { background: var(--red-50); color: var(--red); }

/* Actions row: coupon + update button */
.hp-cart-actions {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-top: 0; margin-top: -1px;
}
[data-theme="dark"] .hp-cart-actions { background: var(--bg); }

.hp-cart-coupon {
  display: flex; gap: 8px; flex: 1; min-width: 220px;
}
.hp-cart-coupon .input-text {
  flex: 1; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font: inherit; font-size: 14px;
  background: var(--bg-3); color: var(--ink);
}
.hp-cart-coupon .input-text:focus { border-color: var(--red); outline: 0; }
.hp-cart-update {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}

/* Mobile: hide header, stack price into meta */
@media (max-width: 700px) {
  .hp-cart-head { display: none; }
  .hp-cart-row {
    grid-template-columns: 1fr 44px;
    grid-template-areas:
      "product remove"
      "qty     sub";
    gap: 8px;
    padding: 12px;
  }
  .hp-cart-row__product { grid-area: product; }
  .hp-cart-row__qty     { grid-area: qty; }
  .hp-cart-row__sub     { grid-area: sub; text-align: right; }
  .hp-cart-row__remove  { grid-area: remove; }
  .hp-cart-row__price   { display: none; }
  .hp-cart-row__price-m { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
  .hp-cart-actions { flex-direction: column; align-items: stretch; }
  .hp-cart-coupon { min-width: 0; }
}


/* ============================================================
   CHECKOUT — 2-col layout dùng CSS Grid (không dùng float)
   ============================================================ */

/* Ẩn các field không dùng — không chiếm grid space */
.woocommerce-checkout #billing_company_field,
.woocommerce-checkout #shipping_company_field,
.woocommerce-checkout #billing_country_field,
.woocommerce-checkout #shipping_country_field,
.woocommerce-checkout #billing_address_2_field,
.woocommerce-checkout #shipping_address_2_field { display: none !important; }

/* Wrap toàn bộ billing fields trong 1 grid 2 cột */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

/* Reset mọi margin/padding trên p.form-row trong grid */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > p,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > p { margin: 0 !important; padding: 0; }

/* form-row-first / form-row-last: mỗi cái 1 cột (default) */
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
  float: none !important; width: auto !important;
  clear: none !important; margin: 0 !important;
}

/* form-row-wide + các field full-width: span 2 cột */
.woocommerce-checkout .form-row-wide,
.woocommerce-checkout #billing_address_1_field,
.woocommerce-checkout #billing_address_2_field,
.woocommerce-checkout #billing_phone_field,
.woocommerce-checkout #billing_email_field,
.woocommerce-checkout #shipping_address_1_field,
.woocommerce-checkout #shipping_address_2_field,
.woocommerce-checkout #shipping_phone_field {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: 1fr;
  }
  .woocommerce-checkout .form-row-first,
  .woocommerce-checkout .form-row-last,
  .woocommerce-checkout .form-row-wide { grid-column: 1 / -1; }
}
/* Billing/shipping col2-set: two-column grid */
.woocommerce-checkout .col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
@media (max-width: 768px) {
  .woocommerce-checkout .col2-set { grid-template-columns: 1fr; }
}
/* Inside billing column, also use 2-col grid for paired fields */
.woocommerce-checkout #billing_address_1_field,
.woocommerce-checkout #billing_city_field,
.woocommerce-checkout #shipping_address_1_field,
.woocommerce-checkout #shipping_city_field {
  clear: both;
}

/* ============================================================
   HP STORE NEW DESIGN — Cart, Checkout, Success, My Account
   (from HPStore4Page design system)
   ============================================================ */

/* ---- BTN ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; background: var(--red); color: #fff;
  font-size: 13.5px; font-weight: 600; transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap; border: 0; cursor: pointer;
}
.btn:hover { background: var(--red-600, #c42828); box-shadow: var(--shadow-md); color: #fff; }
.btn:active { transform: scale(.98); }
.btn.large { padding: 14px 22px; font-size: 15px; }
.btn.small { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn.ghost { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btn.ghost:hover { background: var(--red-50); box-shadow: none; color: var(--red); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #000; }
.btn.outline { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line); }
.btn.outline:hover { background: var(--red-50); border-color: var(--red); color: var(--red); box-shadow: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---- CART PAGE ---- */
.cart-page { padding-bottom: 40px; }
.cart-page-head { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 0 22px; flex-wrap: wrap; gap: 12px; }
.cart-page-head h1 { font-size: 28px; font-weight: 900; margin: 0; letter-spacing: -.01em; }
.cart-page-head h1 small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.cart-count-chip { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; margin-left: 10px; vertical-align: middle; letter-spacing: 0; }
.cart-page-head .clear { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; }
.cart-page-head .clear:hover { color: var(--red); }

.cart-grid { display: grid; grid-template-columns: 1fr 400px; gap: 24px; align-items: start; }
.cart-grid > * { min-width: 0; }

.cart-list { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
[data-theme="dark"] .cart-list { background: var(--bg); }
.cart-list-head {
  display: grid; grid-template-columns: 22px 120px 1fr 96px 76px 96px 32px;
  gap: 12px; align-items: center;
  padding: 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.cart-list-head > div { text-align: center; }
.cart-list-head > div:nth-child(3) { text-align: center; }
.cart-row { display: grid; grid-template-columns: 22px 120px 1fr 96px 76px 96px 32px; gap: 12px; padding: 14px 6px; align-items: center; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.cart-row:last-child { border-bottom: 0; }
.cart-row:hover { background: var(--bg-2); }
.cart-row .pick { width: 12px; height: 12px; border: 1.5px solid var(--line); border-radius: 3px; cursor: pointer; display: grid; place-items: center; background: #fff; flex-shrink: 0; }
.cart-row .pick.on { border-color: var(--red); background: var(--red); color: #fff; }
.cart-row .thumb { aspect-ratio: 1/1; border-radius: 10px; background: var(--bg-2); padding: 8px; border: 1px solid var(--line); overflow: hidden; }
.cart-row .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-row .thumb svg { width: 100%; height: 100%; }
.cart-row .info .brand { font-size: 10.5px; color: var(--ok); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; }
.cart-row .info .brand::before { content: ''; display: inline-block; width: 12px; height: 12px; background: var(--ok); border-radius: 50%; flex-shrink: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5 11-11'/%3E%3C/svg%3E"); background-size: contain; }
.cart-row .info h4 { font-size: 13px; font-weight: 700; margin: 3px 0 4px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cart-row .info .specs { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.cart-row .info .specs span.tag { background: var(--bg-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; font-weight: 600; color: var(--ink-2); }
.cart-row .info .badge-line { margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cart-row .info .stock-tag { font-size: 11px; color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.cart-row .info .gift-tag { font-size: 11px; color: var(--info); background: var(--info-50); padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.cart-row .pick { display: flex; align-items: center; justify-content: center; }
.cart-row .thumb { display: flex; justify-content: center; }
.cart-row .price-cell { text-align: center; }
.cart-row .price-cell .now { font-size: 13.5px; font-weight: 800; color: var(--red); }
.cart-row .price-cell .now .woocommerce-Price-amount { font-size: 13.5px; }
.cart-row .price-cell .old { font-size: 10.5px; font-weight: 400; color: var(--muted); text-decoration: line-through; }
.cart-row .price-cell .old .woocommerce-Price-amount { font-size: 10.5px; }
.cart-row .qty-cell { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.cart-row .sum-cell { font-size: 13.5px; font-weight: 800; color: var(--red); white-space: nowrap; text-align: center; }
.cart-row .sum-cell .woocommerce-Price-amount { font-size: 13.5px; }
.cart-row .remove-btn { width: 32px; height: 32px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; border: 0; background: none; cursor: pointer; }
.cart-row .remove-btn:hover { background: var(--red-50); color: var(--red); }

.qty-bx { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; height: 34px; width: 76px; }
.qty-bx button { width: 28px; background: #fff; font-size: 15px; color: var(--ink); transition: all .12s; border: 0; cursor: pointer; flex-shrink: 0; }
[data-theme="dark"] .qty-bx button { background: var(--bg-2); }
.qty-bx button:hover { background: var(--red-50); color: var(--red); }
.qty-bx input { flex: 1; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); width: 100%; font-weight: 700; background: #fff; color: var(--ink); }
[data-theme="dark"] .qty-bx input { background: var(--bg-2); color: var(--ink); }
.qty-bx input:focus { outline: 0; }

.cart-actions { display: flex; justify-content: space-between; align-items: center; padding: 12px 6px; background: var(--bg-2); border-top: 1px solid var(--line); flex-wrap: wrap; gap: 10px; }
[data-theme="dark"] .cart-actions { background: var(--bg-3); }
.cart-actions .left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cart-actions-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ca-link { color: var(--ink-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; text-decoration: none; }
.ca-link:hover { color: var(--red); }
.ca-link.sep::before { content: ""; display: inline-block; width: 1px; height: 13px; background: var(--line); margin: 0 6px; vertical-align: middle; }
.ca-update { flex-shrink: 0; background: linear-gradient(135deg, var(--red), #b82525) !important; color: #fff !important; border-color: transparent !important; }
.ca-update:hover { background: linear-gradient(135deg, #c42828, #9e1f1f) !important; color: #fff !important; box-shadow: 0 6px 16px rgba(221,51,51,.35); }
.ca-update[disabled] { opacity: .45; pointer-events: none; }

.cart-extras { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.extra-card { background: #fff; border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
[data-theme="dark"] .extra-card { background: var(--bg); }
.extra-card .ec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.extra-card .ec-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--red-50); color: var(--red); display: grid; place-items: center; flex-shrink: 0; }
.extra-card .ec-head h4 { font-size: 14.5px; font-weight: 800; margin: 0; }
.extra-card .ec-head p { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.extra-card .ec-head .right { margin-left: auto; font-size: 12px; color: var(--red); font-weight: 700; }

.voucher-row { display: flex; gap: 8px; }
.voucher-row input { flex: 1; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; font-size: 13px; }
[data-theme="dark"] .voucher-row input { background: var(--bg-2); color: var(--ink); }
.voucher-row input::placeholder { color: var(--muted-2); }
.voucher-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.voucher-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: linear-gradient(135deg, var(--red-50), #fff); border: 1px dashed var(--red);
  border-radius: 8px; font-size: 12px; color: var(--ink-2); font-weight: 600;
  transition: all .15s; cursor: pointer;
}
.voucher-chip:hover { background: var(--red); color: #fff; border-style: solid; }
.voucher-chip strong { color: var(--red); font-weight: 800; }
.voucher-chip:hover strong { color: #fff; }

.ship-estimator { display: grid; grid-template-columns: 1fr 1fr 130px; gap: 8px; }
.ship-estimator select, .ship-estimator input { padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
[data-theme="dark"] .ship-estimator select, [data-theme="dark"] .ship-estimator input { background: var(--bg-2); }
.ship-estimator button { background: var(--ink); color: #fff; border-radius: 9px; font-weight: 600; font-size: 13px; border: 0; cursor: pointer; }
.ship-estimator button:hover { background: var(--red); }
.ship-result { margin-top: 10px; padding: 12px 14px; background: var(--ok-50); border: 1px solid #b9e6cf; border-radius: 10px; font-size: 12.5px; color: #0e7a3d; display: flex; gap: 8px; align-items: center; }

.upsell-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.upsell-card { display: flex; gap: 12px; padding: 12px; background: var(--bg-2); border-radius: 12px; align-items: center; cursor: pointer; transition: all .15s; }
[data-theme="dark"] .upsell-card { background: var(--bg-3); }
.upsell-card:hover { background: #fff; box-shadow: var(--shadow-md); }
.upsell-card .thumb { width: 60px; height: 60px; border-radius: 8px; background: #fff; padding: 8px; flex-shrink: 0; border: 1px solid var(--line); display: grid; place-items: center; }
.upsell-card .thumb svg { width: 100%; height: 100%; }
.upsell-card h5 { font-size: 12.5px; font-weight: 700; margin: 0; line-height: 1.3; }
.upsell-card .price { color: var(--red); font-weight: 800; font-size: 12.5px; margin-top: 2px; }
.upsell-card .price small { color: var(--muted); text-decoration: line-through; font-weight: 500; margin-left: 4px; }
.upsell-card .add { width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; margin-left: auto; flex-shrink: 0; border: 0; cursor: pointer; }
.upsell-card .add:hover { background: var(--red-600, #c42828); }

.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.trust-card { background: #fff; border-radius: 12px; padding: 16px 14px; text-align: center; border: 1px solid var(--line); }
[data-theme="dark"] .trust-card { background: var(--bg); }
.trust-card .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--red-50); color: var(--red); display: inline-grid; place-items: center; margin-bottom: 8px; }
.trust-card h5 { font-size: 12px; font-weight: 800; margin: 0; }
.trust-card p { font-size: 11px; color: var(--muted); margin: 3px 0 0; line-height: 1.4; }

/* ---- ORDER SUMMARY (sidebar, cart + checkout) ---- */
.order-summary {
  background: #fff; border-radius: var(--radius-lg); padding: 22px;
  position: sticky; top: 134px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
[data-theme="dark"] .order-summary { background: var(--bg); }
.order-summary h3 { font-size: 16px; font-weight: 800; margin: 0 0 6px; display: flex; align-items: center; justify-content: space-between; }
.order-summary h3 .count { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.os-mini { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.os-mini:last-of-type { border-bottom: 0; }
.os-mini .thumb { width: 52px; height: 52px; border-radius: 8px; background: var(--bg-2); padding: 6px; border: 1px solid var(--line); flex-shrink: 0; position: relative; }
.os-mini .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.os-mini .thumb .qb { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.os-mini .n { font-size: 12.5px; font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.os-mini .v { font-size: 11px; color: var(--muted); margin-top: 3px; }
.os-mini .p { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--red); white-space: nowrap; align-self: center; }
.os-list { max-height: 264px; overflow: auto; margin: 8px -15px; padding: 0 15px; }
.os-list::-webkit-scrollbar { width: 4px; }
.os-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.os-coupon { display: flex; gap: 6px; margin: 12px 0; }
.os-coupon input { flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 12.5px; background: var(--bg-2); color: var(--ink); }
.os-coupon button { padding: 9px 14px; background: var(--ink); color: #fff; border-radius: 8px; font-size: 12.5px; font-weight: 700; border: 0; cursor: pointer; }
.os-coupon button:hover { background: var(--red); }

.os-applied { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--ok-50); border: 1px dashed #58b58c; border-radius: 8px; font-size: 12px; color: #0e7a3d; margin-bottom: 12px; }
.os-applied strong { color: #064d28; }
.os-applied .x { margin-left: auto; color: #0e7a3d; cursor: pointer; }

.os-totals { padding: 12px 0; border-top: 1px dashed var(--line); }
.os-totals .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12.5px; color: var(--ink-2); }
.os-totals .row .muted { color: var(--muted); }
.os-totals .row.disc span:last-child { color: var(--ok); font-weight: 700; }
.os-totals .row.total { font-size: 13px; font-weight: 800; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); color: var(--ink); }
.os-totals .row.total span:last-child { color: var(--red); font-size: 15px; }

/* Agree checkbox */
.os-agree { margin: 14px 0 2px; }
.os-agree-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.os-agree-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.os-agree-box {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px;
  border: 2px solid var(--line); border-radius: 5px; background: var(--bg-3);
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.os-agree-box::after { content: ''; display: none; width: 5px; height: 9px; border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg) translateY(-1px); }
.os-agree-label input:checked ~ .os-agree-box { background: var(--red); border-color: var(--red); }
.os-agree-label input:checked ~ .os-agree-box::after { display: block; }
.os-agree-text { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.os-agree-text a.os-policy-link { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.os-agree-text a.os-policy-link:hover { opacity: .8; }

/* Policy modal */
#os-policy-modal { display: none; position: fixed; inset: 0; z-index: 99999; }
#os-policy-modal.is-open { display: flex; align-items: center; justify-content: center; }
.os-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.os-modal-box {
  position: relative; z-index: 1; background: var(--bg);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25);
  width: min(600px, 92vw); max-height: 80vh; display: flex; flex-direction: column;
  animation: fadeInDown .2s ease;
}
.os-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.os-modal-head h4 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.os-modal-close { background: var(--bg-3); border: 0; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.os-modal-close:hover { background: var(--line); }
.os-modal-body { overflow-y: auto; padding: 20px; flex: 1; }
.os-modal-loading { text-align: center; padding: 40px; color: var(--muted); font-size: 22px; }
.os-modal-content { font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.os-modal-content h1, .os-modal-content h2, .os-modal-content h3 { font-size: 15px; font-weight: 700; margin: 16px 0 6px; }
.os-modal-content p { margin: 0 0 10px; }
.os-modal-content ul, .os-modal-content ol { padding-left: 20px; margin: 0 0 10px; }
[data-theme="dark"] .os-modal-box { background: var(--bg-2); }

.os-cta { width: 100%; margin-top: 14px; padding: 15px; font-size: 14.5px; font-weight: 800; background: linear-gradient(135deg, var(--red), #b82525); color: #fff; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow-pop); transition: all .15s; border: 0; cursor: pointer; }
.os-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(221,51,51,.5); color: #fff; }
.os-cta[disabled] { opacity: .5; pointer-events: none; }

/* .wc-proceed-to-checkout no longer used in cart-totals.php — direct .os-cta link instead */
.wc-proceed-to-checkout { display: block; }

/* BUG-2: .woocommerce-cart-form padding conflicts with .cart-list — reset when both classes present */
.woocommerce-cart-form.cart-list {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
[data-theme="dark"] .woocommerce-cart-form.cart-list {
  background: transparent !important;
}
.os-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.os-actions .wc-proceed-to-checkout { margin-top: 0; }
.os-back {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 16px;
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink-2) !important;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none !important;
  transition: all .15s;
}
.os-back:hover { border-color: var(--red); color: var(--red) !important; background: var(--red-50); }

.os-pays { display: flex; gap: 6px; justify-content: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.os-pays span { padding: 4px 8px; background: var(--bg-2); border-radius: 4px; font-size: 9.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .03em; }

.os-secure { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.4; }
.os-secure svg { color: var(--ok); flex-shrink: 0; }

/* ---- CHECKOUT PAGE ---- */
.ckp { padding-bottom: 40px; }

.ck-stepper { display: flex; justify-content: center; align-items: center; gap: 0; padding: 22px 0 30px; }
.ck-step { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; position: relative; }
.ck-step .n { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: var(--muted); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
[data-theme="dark"] .ck-step .n { background: var(--bg-2); }
.ck-step.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.ck-step.active .n { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 4px var(--red-50); }
.ck-step.active { color: var(--ink); }
.ck-step.done { color: var(--ink-2); }
.ck-stepper .ck-line { width: 64px; height: 2px; background: var(--line); margin: 0 16px; border-radius: 2px; flex-shrink: 0; }
.ck-stepper .ck-line.done { background: var(--ok); }

.ck-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.ck-grid > * { min-width: 0; }

.ck-block { background: #fff; border-radius: var(--radius-lg); padding: 22px 26px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
[data-theme="dark"] .ck-block { background: var(--bg); }
.ck-block h3 { font-size: 17px; font-weight: 800; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; }
.ck-block h3 .b-num { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; box-shadow: var(--shadow-pop); flex-shrink: 0; }

.field { display: flex; flex-direction: column; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field label .req { color: var(--red); margin-left: 2px; }
.field input, .field select, .field textarea {
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  transition: all .15s; font: inherit;
}
[data-theme="dark"] .field input, [data-theme="dark"] .field select, [data-theme="dark"] .field textarea { background: var(--bg-2); }
.field textarea { resize: vertical; min-height: 64px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.opt-card { display: flex; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .15s; align-items: center; background: #fff; margin-bottom: 8px; }
[data-theme="dark"] .opt-card { background: var(--bg-2); }
.opt-card:hover { border-color: var(--red); }
.opt-card.active { border-color: var(--red); background: linear-gradient(135deg, var(--red-50), #fff); box-shadow: 0 4px 14px rgba(221,51,51,.1); }
.opt-card .radio { width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; }
.opt-card.active .radio { border-color: var(--red); }
.opt-card.active .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.opt-card .ic-bx { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-2); display: grid; place-items: center; flex-shrink: 0; color: var(--ink-2); }
.opt-card.active .ic-bx { background: var(--red); color: #fff; }
.opt-card .main { flex: 1; }
.opt-card .t { font-size: 13.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.opt-card .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.opt-card .pr { font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.opt-card .pr.free { color: var(--ok); }

.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tog { width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: all .2s; flex-shrink: 0; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: all .2s; }
.tog.on { background: var(--red); }
.tog.on::after { left: 18px; }

.toggle-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .info { flex: 1; }
.toggle-row .info strong { font-size: 13.5px; font-weight: 700; display: block; }
.toggle-row .info p { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.ck-extra-ic { margin-right: 7px; color: var(--red); }

/* Gift wrap panel */
.gift-panel {
  display: none; background: var(--bg-3); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin: 4px 0 10px;
  animation: fadeInDown .2s ease;
}
.gift-panel textarea {
  display: block; width: 100%; padding: 10px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 13.5px;
  resize: vertical; min-height: 80px; box-sizing: border-box; font-family: inherit;
}
.gift-panel textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(221,51,51,.12); }
.gift-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.gift-hint i { margin-right: 4px; }

/* VAT panel */
.vat-panel {
  display: none; background: var(--bg-3); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 14px 16px; margin: 4px 0 10px;
  animation: fadeInDown .2s ease;
}
.vat-lookup-row { display: flex; gap: 8px; }
.vat-lookup-row input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font-size: 14px;
}
.vat-lookup-row input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(221,51,51,.12); }
.vat-lookup-row button {
  padding: 10px 16px; background: var(--red); color: #fff; border: 0;
  border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: opacity .15s;
}
.vat-lookup-row button:hover { opacity: .85; }
#vat-company-result { margin-top: 10px; font-size: 13px; }
.vat-found { display: flex; flex-direction: column; gap: 4px; }
.vat-found-name { display: flex; align-items: center; gap: 7px; }
.vat-found-name i { color: #22c55e; font-size: 15px; flex-shrink: 0; }
.vat-found-name strong { font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.vat-found-addr { font-size: 12px; color: var(--muted); padding-left: 22px; }
.vat-found-meta { font-size: 11.5px; color: var(--muted); padding-left: 22px; margin-top: 2px; }
.vat-status-ok { color: #22c55e; }
.vat-status-ok i { font-size: 9px; margin-right: 3px; }
.vat-notfound { color: var(--red); }
.vat-notfound i { margin-right: 4px; }
.vat-loading { color: var(--muted); }
.vat-extra-fields { margin-top: 10px; display: none; }
.vat-extra-fields input {
  display: block; width: 100%; padding: 10px 14px; margin-bottom: 8px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg);
  color: var(--ink); font-size: 13.5px; box-sizing: border-box;
}
.vat-extra-fields input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(221,51,51,.12); }
.vat-manual { margin-top: 8px; display: none; }
.vat-manual-note { font-size: 12px; color: var(--muted); margin: 0; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ck-back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; padding: 8px 0; transition: color .15s; }
.ck-back-btn:hover { color: var(--red); }

/* ---- SUCCESS / THANKYOU PAGE ---- */
.succ { padding: 40px 0 60px; }
.succ-card {
  max-width: 760px; margin: 0 auto; background: #fff; border-radius: var(--radius-xl);
  padding: 50px 48px; box-shadow: var(--shadow); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
[data-theme="dark"] .succ-card { background: var(--bg); }
.succ-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
}
.succ-head { text-align: center; }
.succ-check {
  width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%;
  background: linear-gradient(135deg, #10c66c, #0a8b4d); color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(16,198,108,.5);
  animation: succ-pop .6s var(--ease, cubic-bezier(.2,.7,.2,1));
}
@keyframes succ-pop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.succ-head h1 { font-size: 30px; font-weight: 900; margin: 0 0 8px; letter-spacing: -.02em; }
.succ-head p { color: var(--muted); font-size: 14.5px; margin: 0 auto; max-width: 520px; }
.confetti { position: absolute; pointer-events: none; border-radius: 99px; }

.succ-orderbox { display: flex; gap: 14px; justify-content: center; margin: 22px 0; padding: 18px 22px; background: linear-gradient(135deg, var(--red-50), #fff); border-radius: 14px; border: 1px dashed var(--red); flex-wrap: wrap; }
.succ-orderbox .kv { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.succ-orderbox .kv .l { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.succ-orderbox .kv .v { font-size: 14.5px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.succ-orderbox .kv .v.id { color: var(--red); font-family: ui-monospace, monospace; }
.succ-orderbox .div { width: 1px; background: var(--line); align-self: stretch; }

.succ-timeline { margin: 28px 0; padding: 22px 24px; background: var(--bg-2); border-radius: 14px; }
[data-theme="dark"] .succ-timeline { background: var(--bg-3); }
.succ-timeline h4 { font-size: 13.5px; font-weight: 800; margin: 0 0 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.succ-timeline h4 .live { font-size: 10.5px; font-weight: 800; color: var(--ok); background: var(--ok-50); padding: 2px 7px; border-radius: 4px; display: inline-flex; align-items: center; gap: 4px; }
.succ-timeline h4 .live::before { content: ""; width: 6px; height: 6px; background: var(--ok); border-radius: 50%; animation: pulse 1.6s infinite; }
.timeline-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.tl-step { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding-top: 6px; }
.tl-step .dot { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: var(--muted); display: grid; place-items: center; position: relative; z-index: 2; }
[data-theme="dark"] .tl-step .dot { background: var(--bg-2); }
.tl-step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-step.active .dot { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 5px var(--red-50); }
.tl-step .t { font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.3; color: var(--ink); }
.tl-step .time { font-size: 10.5px; color: var(--muted); }
.tl-step.future .t { color: var(--muted); }
.tl-step + .tl-step::before { content: ""; position: absolute; left: -50%; top: 18px; width: 100%; height: 2px; background: var(--line); }
.tl-step.done + .tl-step::before { background: var(--ok); }

.succ-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.det-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
[data-theme="dark"] .det-card { background: var(--bg-2); }
.det-card h5 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.det-card h5 svg { color: var(--red); }
.det-card .v { font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.det-card .v strong { font-weight: 700; }

.succ-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 14px; }
.action-card { text-align: center; padding: 16px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .15s; text-decoration: none; display: block; color: var(--ink); }
[data-theme="dark"] .action-card { background: var(--bg-3); }
.action-card:hover { background: #fff; border-color: var(--red); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
.action-card .ic { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--red); display: inline-grid; place-items: center; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.action-card h5 { font-size: 12.5px; font-weight: 800; margin: 0 0 3px; }
.action-card p { font-size: 11px; color: var(--muted); margin: 0; }

.succ-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ---- MY ACCOUNT PAGE ---- */
.acc { padding: 0 0 40px; }

.acc-head {
  background: linear-gradient(135deg, #1a1f2e, #0f1419 60%, #2b1010);
  color: #fff; border-radius: 0; padding: 28px 0; margin-bottom: 0;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.acc-head > * { position: relative; z-index: 1; }
.acc-head-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: start;
}
.acc-head::before {
  content: ""; position: absolute; top: -50%; right: -10%; width: 60%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(221,51,51,.3), transparent 60%);
  pointer-events: none;
}
.acc-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), #b82525);
  display: grid; place-items: center; font-size: 32px; font-weight: 900; color: #fff;
  border: 3px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 24px rgba(221,51,51,.4);
  position: relative; z-index: 1;
}
.acc-head .who { position: relative; z-index: 1; }
.acc-head .who h1 { font-size: 24px; font-weight: 900; margin: 0 0 4px; letter-spacing: -.01em; color: #fff; }
.acc-head .who .since { font-size: 12.5px; color: rgba(255,255,255,.65); }
.acc-head .who .tier {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  background: var(--gold-grad, linear-gradient(135deg,#fbbf24,#f59e0b 50%,#b45309)); color: #5d3a00; font-size: 11.5px; font-weight: 800;
  border-radius: 99px; margin-top: 8px; letter-spacing: .04em;
}
.acc-tier-progress { position: relative; z-index: 1; }
.acc-tier-progress .lbl { font-size: 11.5px; color: rgba(255,255,255,.7); margin-bottom: 6px; display: flex; justify-content: space-between; }
.acc-tier-progress .lbl strong { color: var(--gold); }
.acc-tier-progress .bar { width: 260px; height: 8px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.acc-tier-progress .bar .fill { height: 100%; background: var(--gold-grad, linear-gradient(135deg,#fbbf24,#f59e0b 50%,#b45309)); border-radius: 99px; }
.acc-tier-progress .next { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 6px; }

.acc-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; margin-top: 24px; }

.acc-nav { background: #fff; border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); position: sticky; top: 134px; }
[data-theme="dark"] .acc-nav { background: var(--bg); }
.acc-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .12s; position: relative;
}
.acc-nav-item:hover { background: var(--bg-2); color: var(--red); }
.acc-nav-item.active { background: var(--red-50); color: var(--red); }
.acc-nav-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--red); border-radius: 2px; }
.acc-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.acc-nav-item.active svg, .acc-nav-item:hover svg { color: var(--red); }
.acc-nav-item .cnt { margin-left: auto; background: var(--bg-2); padding: 1px 8px; border-radius: 99px; font-size: 11px; color: var(--muted); }
.acc-nav-item.active .cnt { background: var(--red); color: #fff; }
.acc-nav-sep { height: 1px; background: var(--line-2); margin: 8px 6px; }
.acc-nav-item.danger { color: var(--muted); }
.acc-nav-item.danger:hover { color: var(--red); }

.acc-main { display: flex; flex-direction: column; gap: 18px; }
/* Empty notices-wrapper không tạo gap trong flex */
.acc-main > .woocommerce-notices-wrapper:empty { display: none; }
.acc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card {
  background: #fff; border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line); position: relative; overflow: hidden;
}
[data-theme="dark"] .stat-card { background: var(--bg); }
.stat-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px; }
.stat-card .ic.red { background: var(--red-50); color: var(--red); }
.stat-card .ic.gold { background: #fef3c7; color: #b45309; }
.stat-card .ic.green { background: var(--ok-50); color: var(--ok); }
.stat-card .ic.blue { background: var(--info-50); color: var(--info); }
.stat-card .v { font-size: 24px; font-weight: 900; letter-spacing: -.01em; line-height: 1; }
.stat-card .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.stat-card .delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ok); font-weight: 700; margin-top: 6px; }

.acc-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); overflow: hidden; }
[data-theme="dark"] .acc-card { background: var(--bg); }
.acc-card-head { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
.acc-card-head h3 { font-size: 16px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.acc-card-head .see-all { font-size: 12.5px; color: var(--red); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.acc-card-head .see-all:hover { gap: 6px; }
.acc-card-body { padding: 18px 22px; }
.acc-card-body.flush { padding: 0; }

.order-tab { width: 100%; border-collapse: collapse; }
.order-tab th, .order-tab td { padding: 11px 20px; text-align: left; font-size: 13px; vertical-align: top; }
.order-tab thead th { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .order-tab thead th { background: var(--bg-3); }
.order-tab tbody tr { border-bottom: 1px solid var(--line-2); transition: background .12s; }
.order-tab tbody tr:last-child { border-bottom: 0; }
.order-tab tbody tr:hover { background: var(--bg-2); }
.order-tab .o-id { font-family: ui-monospace, monospace; font-weight: 700; color: var(--ink); }
.order-tab .o-items { display: flex; gap: 6px; align-items: center; }
.order-tab .o-items .mt { width: 36px; aspect-ratio: 1/1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.order-tab .o-items .mt svg { width: 100%; height: 100%; }
.order-tab .o-prod { font-size: 12.5px; font-weight: 600; }
.order-tab .o-prod small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; margin-top: 2px; }
.order-tab .o-total { font-weight: 800; color: var(--ink); white-space: nowrap; line-height: 1.4; }
.order-tab .o-items-count { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.order-tab .o-action { font-size: 12px; color: var(--red); font-weight: 700; }
.order-tab .o-action:hover { text-decoration: underline; }

.o-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.o-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.o-status.delivered { background: var(--ok-50); color: var(--ok); }
.o-status.delivered::before { background: var(--ok); }
.o-status.shipping { background: var(--info-50); color: var(--info); }
.o-status.shipping::before { background: var(--info); }
.o-status.processing { background: var(--warn-50, #fff7e6); color: #b45309; }
.o-status.processing::before { background: var(--warn); }
.o-status.cancelled { background: #fee2e2; color: #b91c1c; }
.o-status.cancelled::before { background: #b91c1c; }

.acc-addr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.acc-voucher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.voucher-mini {
  display: flex; gap: 0; border-radius: 12px; overflow: hidden;
  border: 1px dashed var(--red); background: linear-gradient(135deg, #fff, var(--red-50));
  position: relative;
}
[data-theme="dark"] .voucher-mini { background: var(--bg-2); }
.voucher-mini .left {
  width: 90px; background: linear-gradient(135deg, var(--red), #b82525); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 8px;
  text-align: center; position: relative;
}
.voucher-mini .left::before, .voucher-mini .left::after {
  content: ""; position: absolute; right: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-2);
}
.voucher-mini .left::before { top: -7px; }
.voucher-mini .left::after { bottom: -7px; }
.voucher-mini .left .pct { font-size: 22px; font-weight: 900; line-height: 1; }
.voucher-mini .left .lbl { font-size: 10px; font-weight: 700; letter-spacing: .04em; margin-top: 3px; opacity: .9; }
.voucher-mini .body { flex: 1; padding: 12px 14px; }
.voucher-mini .body h5 { font-size: 13px; font-weight: 800; margin: 0 0 4px; }
.voucher-mini .body p { font-size: 11.5px; color: var(--muted); margin: 0; line-height: 1.4; }
.voucher-mini .body .exp { font-size: 10.5px; color: var(--red); font-weight: 700; margin-top: 6px; }

/* ---- MY ACCOUNT — WC default content wrapper ---- */
.acc-view-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--line);
  white-space: nowrap; transition: all .12s;
}
.acc-view-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.acc-pg-btn {
  display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--ink); transition: all .12s;
}
.acc-pg-btn:hover { background: var(--ink); color: #fff; }

/* WC default content inside .acc-main — wrap dengan card style */
.acc-main .woocommerce-MyAccount-content > *:not(.acc-card) { padding: 0; }
.acc-main .woocommerce-notices-wrapper { margin-bottom: 12px; }

/* Form edit account / edit address */
.acc-main .woocommerce-EditAccountForm,
.acc-main .woocommerce-address-fields,
.acc-main .edit-account {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 24px 28px;
}
[data-theme="dark"] .acc-main .woocommerce-EditAccountForm,
[data-theme="dark"] .acc-main .woocommerce-address-fields,
[data-theme="dark"] .acc-main .edit-account { background: var(--bg); }

.acc-main .woocommerce-EditAccountForm fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin: 20px 0 0; }
.acc-main .woocommerce-EditAccountForm legend { font-weight: 700; padding: 0 8px; font-size: 14px; }
.acc-main .woocommerce-form-row { margin-bottom: 14px; }
.acc-main .woocommerce-form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.acc-main .woocommerce-form-row input.input-text,
.acc-main .woocommerce-form-row select {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  font-size: 14px; transition: border-color .15s;
}
.acc-main .woocommerce-form-row input.input-text:focus,
.acc-main .woocommerce-form-row select:focus { border-color: var(--ink); outline: none; }
.acc-main .woocommerce-form-row.form-row-first,
.acc-main .woocommerce-form-row.form-row-last { display: inline-block; width: calc(50% - 6px); }
.acc-main .woocommerce-form-row.form-row-first { margin-right: 10px; }
.acc-main .button.woocommerce-Button,
.acc-main input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 24px; border-radius: 9px; font-size: 14px; font-weight: 700;
  background: var(--red); color: #fff; border: 0; cursor: pointer;
  transition: background .15s; margin-top: 8px;
}
.acc-main .button.woocommerce-Button:hover,
.acc-main input[type="submit"]:hover { background: var(--red-600); }

/* My addresses */
.acc-main .woocommerce-Addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.acc-main .woocommerce-Address {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 22px 24px;
}
[data-theme="dark"] .acc-main .woocommerce-Address { background: var(--bg); }
.acc-main .woocommerce-Address header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.acc-main .woocommerce-Address header h3 { font-size: 15px; font-weight: 700; margin: 0; }
.acc-main .woocommerce-Address address { font-style: normal; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.acc-main .woocommerce-Address .edit { font-size: 12.5px; font-weight: 700; color: var(--red); }

/* Dashboard */
.acc-main .woocommerce-MyAccount-content p { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); margin-bottom: 10px; }
.acc-main .woocommerce-MyAccount-content p a { color: var(--red); font-weight: 600; }
.acc-main > p:first-child,
.acc-main .woocommerce-MyAccount-content > p:first-child {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 20px 24px;
}
[data-theme="dark"] .acc-main > p:first-child,
[data-theme="dark"] .acc-main .woocommerce-MyAccount-content > p:first-child { background: var(--bg); }

@media (max-width: 720px) {
  .acc-main .woocommerce-Addresses { grid-template-columns: 1fr; }
  .acc-main .woocommerce-form-row.form-row-first,
  .acc-main .woocommerce-form-row.form-row-last { display: block; width: 100%; margin-right: 0; }
}

/* ---- BREADCRUMBS (cart/checkout pages) ---- */
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 12px 0 18px; }
.crumbs a { color: var(--muted); font-weight: 600; cursor: pointer; }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { width: 14px; height: 14px; opacity: .5; }
.crumbs .cur { color: var(--ink); font-weight: 700; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
  .cart-grid, .ck-grid { grid-template-columns: 1fr; }
  .acc-grid { grid-template-columns: 1fr; }
  .acc-nav { position: relative; top: auto; }
  .order-summary { position: relative; top: auto; }
  .acc-head { grid-template-columns: auto 1fr; }
  .acc-tier-progress { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cart-list-head { display: none; }
  .cart-row { grid-template-columns: 80px 1fr 32px; row-gap: 8px; }
  .acc-stats { grid-template-columns: repeat(2, 1fr); }
  .succ-actions { grid-template-columns: repeat(2, 1fr); }
  .succ-details { grid-template-columns: 1fr; }
  .succ-orderbox .div { display: none; }
  .upsell-grid { grid-template-columns: 1fr; }
  .succ-card { padding: 32px 20px; }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .pay-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ck-stepper { gap: 0; }
  .ck-stepper .ck-line { width: 28px; margin: 0 6px; }
  .ck-step { font-size: 11px; gap: 6px; }
}
@media (max-width: 400px) {
  .ck-stepper .ck-line { width: 14px; margin: 0 3px; }
  .ck-step { font-size: 10px; gap: 4px; }
  .ck-step .n { width: 26px; height: 26px; font-size: 11px; }
}

/* Dark mode tweaks for new design sections */
[data-theme="dark"] .qty-bx { border-color: var(--line); }
[data-theme="dark"] .succ-orderbox { background: linear-gradient(135deg, rgba(221,51,51,.08), var(--bg)); }
[data-theme="dark"] .os-applied { background: rgba(18,161,80,.1); color: #4ade80; border-color: rgba(18,161,80,.3); }
[data-theme="dark"] .os-applied strong { color: #4ade80; }
[data-theme="dark"] .os-applied .x { color: #4ade80; }
[data-theme="dark"] .ship-result { background: rgba(18,161,80,.1); color: #4ade80; border-color: rgba(18,161,80,.3); }
[data-theme="dark"] .acc-head .who h1 { color: #fff; }

/* ---- MINI CART (cart drawer) strikethrough prices ---- */
.woocommerce-mini-cart-item .mc-qty-price { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.woocommerce-mini-cart-item .mc-qty { color: var(--muted); font-weight: 600; }
.woocommerce-mini-cart-item .mc-price { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.woocommerce-mini-cart-item .mc-now { font-weight: 800; color: var(--red); font-size: 13px; }
.woocommerce-mini-cart-item .mc-old { font-size: 10.5px; color: var(--muted); text-decoration: line-through; }
.woocommerce-mini-cart-item .mc-name { font-weight: 600; font-size: 13px; }
[data-theme="dark"] .woocommerce-mini-cart-item .mc-now { color: var(--red); }

/* ---- BREADCRUMB — style WC woocommerce-breadcrumb like .crumbs ---- */
.woocommerce-breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 12.5px; color: var(--muted); padding: 12px 0 18px; margin: 0; list-style: none;
}
.woocommerce-breadcrumb a { color: var(--muted); font-weight: 600; text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--red); }
.woocommerce-breadcrumb .separator { opacity: .5; }

/* ---- CK-FINAL: place-order bar at bottom of checkout left column ---- */
.ck-final { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.ck-final .back { color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; flex-shrink: 0; }
.ck-final .back:hover { color: var(--red); }
.ck-final .place {
  flex: 1; display: flex !important; justify-content: space-between !important; align-items: center !important;
  padding: 15px 20px !important; background: linear-gradient(135deg, var(--red), #b82525) !important;
  color: #fff !important; border-radius: 11px !important; font-size: 14.5px !important; font-weight: 800 !important;
  box-shadow: var(--shadow-pop); transition: all .15s; border: 0 !important; cursor: pointer; gap: 12px;
}
.ck-final .place:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(221,51,51,.5); }
.ck-final .place .woocommerce-Price-amount { color: #fff !important; font-size: 15px !important; }
.ck-final .place .woocommerce-Price-currencySymbol { color: #fff !important; }

/* ---- DARK MODE — remaining cart/checkout elements ---- */
[data-theme="dark"] .cart-list-head { background: var(--bg-3); }
[data-theme="dark"] .cart-row { border-color: var(--line); }
[data-theme="dark"] .cart-row:hover { background: var(--bg-3); }
[data-theme="dark"] .cart-row .pick { background: var(--bg-2); border-color: var(--line); }
[data-theme="dark"] .cart-row .thumb { background: var(--bg-3); border-color: var(--line); }
[data-theme="dark"] .cart-actions { background: var(--bg-3); border-color: var(--line); }
[data-theme="dark"] .order-summary { background: var(--bg); border-color: var(--line); }
[data-theme="dark"] .os-list { scrollbar-color: var(--line) transparent; }
[data-theme="dark"] .os-totals { border-color: var(--line); }
[data-theme="dark"] .os-totals .row.total { border-color: var(--line); }
[data-theme="dark"] .ck-block { background: var(--bg); border-color: var(--line); }
[data-theme="dark"] .succ-card { background: var(--bg); border-color: var(--line); }
[data-theme="dark"] .qty-bx input { background: var(--bg); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .qty-bx button { background: var(--bg-2); color: var(--ink); }
[data-theme="dark"] .opt-card { background: var(--bg-2); border-color: var(--line); }
[data-theme="dark"] .opt-card.active { background: linear-gradient(135deg, rgba(221,51,51,.12), var(--bg-2)); }
[data-theme="dark"] .woocommerce-breadcrumb a { color: var(--muted); }
[data-theme="dark"] .cart-page-head h1 { color: var(--ink); }
[data-theme="dark"] .os-mini .thumb { background: var(--bg-3); border-color: var(--line); }
[data-theme="dark"] .os-mini .thumb .qb { border-color: var(--bg); }
[data-theme="dark"] .det-card { background: var(--bg-2); border-color: var(--line); }
[data-theme="dark"] .succ-orderbox { border-color: rgba(221,51,51,.3); }
[data-theme="dark"] .woocommerce-checkout p.form-row input.input-text,
[data-theme="dark"] .woocommerce-checkout .woocommerce-form-row input.input-text,
[data-theme="dark"] .woocommerce-checkout p.form-row select { background: var(--bg-2); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .woocommerce-checkout #ship-to-different-address label { color: var(--ink); }

/* ============================================================
   MY ACCOUNT — LOGIN PAGE (logged-out state)
   ============================================================ */
.acc-login-wrap {
  max-width: 480px; margin: 0 auto; padding: 40px 0 80px;
}
.acc-login-wrap .woocommerce-form--login,
.acc-login-wrap .woocommerce-form-register {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 32px;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
[data-theme="dark"] .acc-login-wrap .woocommerce-form--login,
[data-theme="dark"] .acc-login-wrap .woocommerce-form-register { background: var(--bg); }

/* WooCommerce native form inputs (login/register khi chưa có .acc-login-wrap wrapper) */
[data-theme="dark"] .woocommerce-form-login,
[data-theme="dark"] .woocommerce-form-register { background: var(--bg); }
[data-theme="dark"] .woocommerce input[type="text"],
[data-theme="dark"] .woocommerce input[type="email"],
[data-theme="dark"] .woocommerce input[type="password"],
[data-theme="dark"] .woocommerce input[type="tel"],
[data-theme="dark"] .woocommerce input[type="number"],
[data-theme="dark"] .woocommerce .woocommerce-Input {
  background: var(--bg-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
[data-theme="dark"] .woocommerce .woocommerce-button:not(.btn):not(.button-primary) {
  background: var(--bg-3) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line);
}

.acc-login-wrap h2 { font-size: 18px; font-weight: 800; margin: 0 0 20px; }

/* ============================================================
   MY ACCOUNT — SỔ ĐỊA CHỈ (my-address.php override)
   ============================================================ */
.acc-addr-desc { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-bottom: 18px; }
.acc-addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.acc-addr-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 0; overflow: hidden;
}
[data-theme="dark"] .acc-addr-card { background: var(--bg); }
.acc-addr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
[data-theme="dark"] .acc-addr-head { background: var(--bg-3); }
.acc-addr-head h3 { font-size: 14px; font-weight: 700; margin: 0; }
.acc-addr-edit { font-size: 12.5px; font-weight: 700; color: var(--red); white-space: nowrap; }
.acc-addr-edit:hover { text-decoration: underline; }
.acc-addr-card address {
  font-style: normal; font-size: 14px; line-height: 1.85;
  color: var(--ink-2); padding: 18px 20px;
}
.acc-addr-empty { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .acc-addr-grid { grid-template-columns: 1fr; } }

/* ============================================================
   VIEW ORDER PAGE (view-order.php override)
   ============================================================ */

/* Ẩn WC default mark highlight */
.acc-main mark.order-number,
.acc-main mark.order-date,
.acc-main mark.order-status { background: transparent; color: var(--ink); }

/* Header card */
.vw-head-card .acc-card-body { padding: 20px 24px; }
.vw-back {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--muted); text-decoration: none; margin-bottom: 10px;
}
.vw-back:hover { color: var(--red); }
.vw-back svg { flex-shrink: 0; }
.vw-order-title {
  font-size: 20px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.vw-order-date {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--ink-2);
}

/* WC order-details section → card style */
.woocommerce-order-details {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden; margin-bottom: 0;
}
[data-theme="dark"] .woocommerce-order-details { background: var(--bg); }
.woocommerce-order-details__title {
  font-size: 15px !important; font-weight: 800 !important; margin: 0 !important;
  padding: 16px 22px !important; border-bottom: 1px solid var(--line);
  color: var(--ink) !important; background: var(--bg-2) !important;
}
[data-theme="dark"] .woocommerce-order-details__title { background: var(--bg-3) !important; }

/* Order items table */
.woocommerce-table--order-details { width: 100%; border-collapse: collapse; }
.woocommerce-table--order-details th,
.woocommerce-table--order-details td { padding: 12px 22px; text-align: left; font-size: 14px; }
.woocommerce-table--order-details thead th {
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); background: var(--bg-2);
}
.woocommerce-table--order-details tbody tr { border-top: 1px solid var(--line-2); }
.woocommerce-table--order-details tbody tr:first-child { border-top: 0; }
.woocommerce-table--order-details tfoot tr { border-top: 1px solid var(--line-2); }
.woocommerce-table--order-details tfoot th { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.woocommerce-table--order-details tfoot td { font-size: 13px; color: var(--ink); font-weight: 700; }
.woocommerce-table--order-details tfoot .order-total th,
.woocommerce-table--order-details tfoot .order-total td { font-size: 15px; font-weight: 800; color: var(--red); }
.woocommerce-table--order-details .woocommerce-table__product-name a { color: var(--red); font-weight: 600; }
.woocommerce-table--order-details .product-quantity { color: var(--muted); font-size: 13px; }

/* Địa chỉ trong view-order (order-details-customer.php override) */
.woocommerce-customer-details { margin-bottom: 0; }
.vw-addr-grid {
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
.vw-addr-grid.has-shipping { grid-template-columns: 1fr 1fr; }
.vw-addr-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden;
}
[data-theme="dark"] .vw-addr-card { background: var(--bg); }
.vw-addr-head {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 22px; background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 800; color: var(--ink);
}
[data-theme="dark"] .vw-addr-head { background: var(--bg-3); }
.vw-addr-card address {
  font-style: normal; font-size: 14px; line-height: 1.85; color: var(--ink-2);
  padding: 16px 20px; margin: 0;
}
.vw-addr-meta {
  display: flex; align-items: center; gap: 6px; margin: 4px 0 0;
  font-size: 13px; color: var(--ink-2);
}
@media (max-width: 640px) { .vw-addr-grid.has-shipping { grid-template-columns: 1fr; } }

/* Order details — override os-mini for full-page context */
.vw-od-body .os-list { max-height: none; overflow: visible; margin: 0; padding: 0; }
.vw-od-body .os-mini { padding: 16px 0; align-items: center; gap: 20px; }
.vw-od-body .os-mini .thumb { width: 120px; height: 120px; flex-shrink: 0; }
.vw-od-body .os-mini .n { font-size: 14px; display: block; overflow: visible; white-space: normal; }
.vw-od-body .os-mini .v { font-size: 12.5px; }
.vw-od-body .os-mini .p { font-size: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.vw-od-body .os-mini .p del.orig { font-size: 12px; color: var(--muted); font-weight: 500; }
.vw-od-body .os-mini .p del.orig .woocommerce-Price-amount.amount { font-size: 1.1em; }
.vw-od-body .vw-od-info { flex: 1; min-width: 0; }
.vw-od-card .acc-card-head { display: flex; align-items: center; justify-content: space-between; }
.vw-od-count { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.vw-od-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.vw-od-body .os-totals { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.vw-note-row span:last-child { font-size: 13.5px; color: var(--ink-2); font-style: italic; }

/* Notes section */
.vw-notes { list-style: none; margin: 0; padding: 0; }
.vw-notes li { padding: 14px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.vw-notes li:last-child { border-bottom: 0; }
.vw-notes li:first-child { padding-top: 0; }
.vw-note-date { font-size: 12px; color: var(--muted); }
.vw-notes p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Order actions (cancel, pay, etc.) */
.woocommerce-order-details + .woocommerce-order-actions,
.woocommerce-customer-details + .woocommerce-order-actions { margin-top: 0; }
.woocommerce-order-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.woocommerce-order-actions .button { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 700; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; transition: all .12s; }
.woocommerce-order-actions .button:hover { background: var(--ink); color: #fff; }

@media (max-width: 640px) {
  .woocommerce-customer-details .woocommerce-columns { grid-template-columns: 1fr !important; }
  .woocommerce-customer-details .woocommerce-column + .woocommerce-column { border-left: 0; border-top: 1px solid var(--line); }
}

/* Orders table — cột đầu flush không padding trái */
.order-tab th:first-child, .order-tab td:first-child { padding-left: 20px !important; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Phase 2 (WooCommerce pages)
   ═══════════════════════════════════════════════════════════════════ */

/* -------------------------------------------------------------------
   2a. MyAccount Orders — table → card tại <= 600px
   ------------------------------------------------------------------- */
@media (max-width: 600px) {
  .order-tab { display: block; }
  .order-tab thead { display: none; }
  .order-tab tbody { display: block; }
  .order-tab tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--surface);
  }
  /* Col 1: order # → row1 left */
  .order-tab td:nth-child(1) {
    grid-column: 1; grid-row: 1;
    padding: 0 0 4px; border: 0;
    font-size: 15px;
  }
  /* Col 5: view button → row1 right */
  .order-tab td:nth-child(5) {
    grid-column: 2; grid-row: 1 / 4;
    padding: 0 0 0 10px; border: 0;
    display: flex; align-items: flex-start; justify-content: flex-end;
  }
  /* Col 3: status → row2 */
  .order-tab td:nth-child(3) {
    grid-column: 1; grid-row: 2;
    padding: 3px 0; border: 0;
  }
  /* Col 4: total + item count → row3 */
  .order-tab td:nth-child(4) {
    grid-column: 1; grid-row: 3;
    padding: 4px 0 0; border: 0;
    font-size: 14px;
  }
  /* Col 2: date → hidden (info already in header) */
  .order-tab td:nth-child(2) { display: none; }

  /* Remove the flush first-child override on mobile */
  .order-tab td:first-child { padding-left: 0 !important; }

  /* Pagination buttons full width */
  .acc-pg-btn { flex: 1; justify-content: center; }
}

/* -------------------------------------------------------------------
   2b. View Order — os-mini stack tại <= 600px
   ------------------------------------------------------------------- */
@media (max-width: 600px) {
  .vw-od-body .os-mini {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 0;
  }
  .vw-od-body .os-mini .thumb {
    width: 80px; height: 80px;
    flex-shrink: 0;
  }
  .vw-od-body .vw-od-info { width: 100%; }
  .vw-od-body .os-mini .p {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
  }
  .vw-od-body .os-mini .p del.orig { font-size: 12px; }
  /* View order header card */
  .vw-head-card .acc-card-body { padding: 16px; }
  .vw-order-title { font-size: 17px; gap: 8px; }
  /* Actions */
  .vw-od-actions { gap: 8px; }
  .vw-od-actions .acc-view-btn,
  .vw-od-actions a { font-size: 12.5px; padding: 7px 14px; }
}

/* -------------------------------------------------------------------
   2c. Cart table → card layout tại <= 640px
   ------------------------------------------------------------------- */
@media (max-width: 640px) {
  .woocommerce-cart-form table,
  .woocommerce-cart-form thead,
  .woocommerce-cart-form tbody,
  .woocommerce-cart-form tr { display: block; }

  .woocommerce-cart-form thead { display: none; }

  .woocommerce-cart-form tr {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 0 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    border-top: 0;
  }
  /* Remove × → top-right, spans full width but align right */
  .woocommerce-cart-form .product-remove {
    grid-column: 2; grid-row: 1;
    text-align: right; padding: 0 0 4px;
    border: 0;
  }
  /* Thumbnail → left, spans rows 1-4 */
  .woocommerce-cart-form .product-thumbnail {
    grid-column: 1; grid-row: 1 / 5;
    padding: 0; border: 0;
  }
  .woocommerce-cart-form .product-thumbnail img {
    width: 80px; height: 80px;
  }
  /* Name */
  .woocommerce-cart-form .product-name {
    grid-column: 2; grid-row: 2;
    padding: 0 0 4px; border: 0;
    font-size: 13.5px;
  }
  /* Unit price */
  .woocommerce-cart-form .product-price {
    grid-column: 2; grid-row: 3;
    padding: 2px 0; border: 0;
    font-size: 13px; color: var(--muted);
  }
  /* Qty + subtotal side by side */
  .woocommerce-cart-form .product-quantity {
    grid-column: 2; grid-row: 4;
    padding: 4px 0 0; border: 0;
    display: flex; align-items: center; gap: 10px;
  }
  .woocommerce-cart-form .product-subtotal {
    grid-column: 2; grid-row: 4;
    padding: 4px 0 0; border: 0;
    margin-left: auto;
    font-size: 14px; font-weight: 700;
  }
  /* Qty + subtotal in one row */
  .woocommerce-cart-form tr {
    grid-template-rows: auto auto auto auto;
  }
  /* Actions row full-width */
  .woocommerce-cart-form .actions {
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    grid-column: 1 / -1;
  }
  .woocommerce-cart-form .coupon { flex-direction: column; }
  .woocommerce-cart-form .coupon input { min-width: 0; }
}

/* -------------------------------------------------------------------
   2d. Checkout — payment grid + form padding tại <= 480px
   ------------------------------------------------------------------- */
@media (max-width: 480px) {
  .hp-payment-grid { grid-template-columns: 1fr; }
  .hp-checkout .ck-block { padding: 16px; }
  .hp-checkout .ck-block__head { padding: 12px 16px; }
  .checkout-layout .order-review-sidebar { padding: 16px; }
}

/* -------------------------------------------------------------------
   2e. PDP — buybar + variant cards tại <= 480px
   ------------------------------------------------------------------- */
@media (max-width: 480px) {
  /* Gallery thumbnails: scroll ngang */
  .pdp-gallery .thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .pdp-gallery .thumbs .t { flex-shrink: 0; }

  /* Buybar 2 nút → 2 cột ngang bằng nhau */
  .pdp-buybar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .btn-buy-now, .btn-add-cart-primary { width: 100%; }

  /* Variant cards grid tối thiểu 2 cột, không tràn */
  .vc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* PDP tabs nav scroll ngang */
  .pdp-tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
  }
  .pdp-tabs-nav a { white-space: nowrap; flex-shrink: 0; }

  /* Key info box padding */
  .pdp-key-info--side { padding: 14px; }
}

/* -------------------------------------------------------------------
   2f. PDP — Fold / narrow phones ~344px
   ------------------------------------------------------------------- */
@media (max-width: 380px) {
  .pdp-info {
    padding: 18px 14px;
  }

  .pdp-kicker {
    gap: 8px;
    flex-wrap: wrap;
  }

  .pdp-title {
    font-size: 19px;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .pdp-rating-row {
    gap: 6px;
    font-size: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  .pdp-price-hero {
    padding: 10px 12px;
  }

  .pph-row {
    flex-wrap: wrap;
    align-items: baseline;
    row-gap: 4px;
  }

  .pph-label {
    font-size: 13px;
  }

  .pph-now {
    font-size: 18px;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.1;
  }

  .pph-was {
    flex: 0 0 calc(100% - 42px);
    margin-left: 42px;
    font-size: 11.5px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .variant-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .variant-card {
    padding: 12px 14px;
  }

  .vc-label {
    font-size: 12px;
    line-height: 1.45;
  }

  .pdp-key-info {
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.8;
  }

  .pdp-key-info ul {
    gap: 6px;
  }

  .pdp-buybar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .btn-buy-now,
  .btn-add-cart-primary {
    min-width: 0;
    height: 48px;
    padding: 10px 8px;
    font-size: 12.5px;
    gap: 6px;
    letter-spacing: 0;
  }

  .btn-buy-now svg,
  .btn-add-cart-primary svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .btn-buy-now span,
  .btn-add-cart-primary .btn-text--full,
  .btn-add-cart-primary .btn-text--short {
    white-space: nowrap;
  }

  .btn-call-order {
    padding: 12px 10px;
    font-size: 12.5px;
    gap: 6px;
    text-align: center;
    flex-wrap: wrap;
  }

  .btn-call-order strong {
    white-space: nowrap;
  }
}

/* -------------------------------------------------------------------
   WooCommerce general — table overflow tại <= 640px
   ------------------------------------------------------------------- */
@media (max-width: 640px) {
  /* Order detail items table — scroll ngang fallback */
  .woocommerce-table--order-details {
    display: block; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .woocommerce-table--order-details th,
  .woocommerce-table--order-details td { white-space: nowrap; }
  .woocommerce-table--order-details .woocommerce-table__product-name a {
    white-space: normal; min-width: 160px; display: block;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   Z Fold 280px — WooCommerce
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 320px) {
  /* PDP */
  .pdp-buybar { gap: 6px; }
  .btn-buy-now, .btn-add-cart-primary { font-size: 12px; padding: 10px 8px; }
  .variant-cards { grid-template-columns: 1fr; }
  .variant-card { padding: 10px 12px; }
  .pdp-key-info--side { padding: 12px; }

  /* Orders card */
  .order-tab tr { padding: 12px; }
  .order-tab td { font-size: 12.5px; }

  /* Account cards */
  .acc-card-head h3 { font-size: 13.5px; }
  .acc-card-body { padding: 14px 14px; }

  /* Cart */
  .woocommerce-cart-form tr { grid-template-columns: 70px 1fr; gap: 0 10px; }
  .woocommerce-cart-form .product-thumbnail img { width: 70px; height: 70px; }

  /* Checkout */
  .hp-checkout .ck-block { padding: 12px; }
}

/* Z Fold 280px — additional overflow containment */
@media (max-width: 320px) {
  /* Shop sidebar + main: prevent filter plugin content from breaking grid */
  .hp-shop, .hp-shop__sidebar, .hp-shop__main,
  .hp-shop__heading { max-width: 100%; overflow-x: hidden; }

  /* Cart: contain form and cart items */
  .woocommerce-cart .cart-layout,
  .woocommerce-cart-form,
  .woocommerce-cart-form table { max-width: 100%; overflow-x: hidden; }

  /* PDP tabs + description section */
  .pdp-tabs, .pdp-tabs-content,
  .desc-main-wrap, .desc-main, .desc-main__inner { max-width: 100%; overflow-x: hidden; }

  /* General WC content containment */
  .woocommerce, .woocommerce-page { overflow-x: hidden; }
}

/* ============================================================
 * Dark mode: devvn-woocommerce-reviews plugin
 * Tất cả text trong review tab → ink color cho dark mode.
 * Loại trừ star icons (giữ vàng) + filter pill active + reply link.
 * ============================================================ */

/* Rating bar track — plugin dùng !important → phải match specificity */
[data-theme="dark"] #reviews.devvn-style3 .devvn_scala_rating,
[data-theme="dark"] .devvn_scala_rating { background: var(--bg-3) !important; }

/* Filter chips (5★, 4★, ... Có video, Có ảnh) */
[data-theme="dark"] .devvn_filter_btn:not(.devvn_filter_btn_active) {
  background: var(--bg-3) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
[data-theme="dark"] .devvn_filter_btn { color: var(--ink) !important; }

/* Review section heading + sub-text */
[data-theme="dark"] .woocommerce-Reviews-title,
[data-theme="dark"] .woocommerce-Reviews .star_box_right_desc,
[data-theme="dark"] .woocommerce-Reviews .star_box_right h3,
[data-theme="dark"] .woocommerce-Reviews .star-average,
[data-theme="dark"] .woocommerce-Reviews .devvn_num_reviews { color: var(--ink) !important; }

/* Review summary box + comment box backgrounds */
[data-theme="dark"] .devvn_review_summary,
[data-theme="dark"] .devvn_cmt_box,
[data-theme="dark"] .comment_container.devvn_review_box,
[data-theme="dark"] .devvn-style3-header-box { background: var(--bg-2) !important; color: var(--ink) !important; }

/* Review item — author name, verified badge, content text */
[data-theme="dark"] .woocommerce-review__author,
[data-theme="dark"] .woocommerce-review__published-date,
[data-theme="dark"] .comment_container .meta,
[data-theme="dark"] .devvn_review_top,
[data-theme="dark"] .devvn_review_mid,
[data-theme="dark"] .devvn_review_bottom,
[data-theme="dark"] .comment-text,
[data-theme="dark"] .commentlist .description,
[data-theme="dark"] .comment_container .description,
[data-theme="dark"] .devvn_cmt_content { color: var(--ink) !important; }

/* Verified "Đã mua hàng" — keep success green */
[data-theme="dark"] .woocommerce-review__verified { color: var(--ok) !important; }

/* Reply link "Trả lời" / "thích" / "Sửa" — giữ link colors theo theme */
[data-theme="dark"] .comment-reply-link,
[data-theme="dark"] .comment-reply-title { color: var(--ink) !important; }

/* "Đánh giá ngay" button — gradient đỏ đã có; chỉ ensure không bị override màu xám */
[data-theme="dark"] .btn-reviews-now { color: #fff !important; }

[data-theme="dark"] .note_review a { color: var(--red) !important; }

/* Review mid — <p> và .description bên trong cũng cần override */
[data-theme="dark"] .devvn_review_mid p,
[data-theme="dark"] .devvn_review_mid .description { color: var(--ink) !important; }

/* Quick tag chips — rgba(0,0,0,.4) vô hình trên dark bg */
[data-theme="dark"] .review_quick_tag span {
  color: var(--muted) !important;
  border-color: var(--line) !important;
}

/* "Xem tất cả N phản hồi" toggle — #555 mất trên dark bg */
[data-theme="dark"] .devvn-style3-toggle-replies { color: var(--muted) !important; }
[data-theme="dark"] .devvn-style3-toggle-replies:hover { color: var(--ink) !important; }

/* ============================================================
 * Cart coupon — nút "Áp dụng" class="btn dark"
 * .btn.dark dùng background:var(--ink) → trắng trong dark mode
 * ============================================================ */
[data-theme="dark"] .btn.dark {
  background: var(--bg-3);
  color: var(--ink) !important;
  border: 1px solid var(--line);
}
[data-theme="dark"] .btn.dark:hover {
  background: var(--line);
  color: var(--ink) !important;
}


/* ============================================================
 * PDP Gallery — cursor + lightbox
 * ============================================================ */
#pdp-main-wrap { cursor: zoom-in; }

/* Lightbox overlay */
.hp-lb {
  position: fixed; inset: 0; z-index: 100020;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .24s ease;
}
.hp-lb.hp-lb--visible { opacity: 1; }
.hp-lb__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.88); backdrop-filter: blur(4px);
}
.hp-lb__inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  max-width: 95vw; max-height: 95vh;
}
.hp-lb__img-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.hp-lb__img {
  display: block;
  max-width: min(92vw, 1200px); max-height: 90vh;
  border-radius: 10px; object-fit: contain;
  transition: opacity .18s ease;
  background: #111;
}
.hp-lb__close {
  position: fixed; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; cursor: pointer; z-index: 2;
  background: rgba(255,255,255,.15); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.hp-lb__close:hover { background: rgba(255,255,255,.3); }
.hp-lb__arrow {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff;
  font-size: 32px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; user-select: none;
}
.hp-lb__arrow:hover { background: rgba(255,255,255,.3); }
.hp-lb__counter {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 13px; padding: 4px 14px; border-radius: 20px;
}
.hp-lb__spinner {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
}
.hp-lb__spinner::after {
  content: ''; width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: lb-spin .7s linear infinite;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }

body.hp-lb--open { overflow: hidden; }

@media (max-width: 600px) {
  .hp-lb__arrow { width: 38px; height: 38px; font-size: 24px; }
  .hp-lb__img { max-width: 98vw; max-height: 85vh; border-radius: 6px; }
  .hp-lb__inner { gap: 6px; }
}

/* Related products heading */
/* Đóng khung trắng giống .pdp-tabs-section (cùng kiểu card/tab) */
.pdp-related { margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
[data-theme="dark"] .pdp-related { background: var(--surface); }
.pdp-related__heading {
  font-size: 18px; font-weight: 800; color: var(--red);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 22px; padding-bottom: 12px; position: relative;
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .pdp-related__heading { color: #ff5050; }
/* Accent đỏ ngắn dưới chữ (thay gạch đỏ full-width cũ) */
.pdp-related__heading::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 54px; height: 3px; background: var(--red); border-radius: 2px;
  transition: width .25s ease;
}
/* Hover: accent bar nở rộng (animation nhẹ, không đụng transform reveal) */
.pdp-related__heading:hover::after { width: 88px; }

/* PDP gallery — video thumbnail */
.pdp-gallery-card .thumbs .t--video { cursor: pointer; }
.pdp-gallery-card .thumbs .t--video img { object-fit: cover; padding: 0; }
.pdp-gallery-card .thumbs .t--video .t__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(0,0,0,.35);
  transition: background .15s;
  pointer-events: none;
}
.pdp-gallery-card .thumbs .t--video:hover .t__play { background: rgba(0,0,0,.55); }
.pdp-gallery-card .thumbs .t--video .t__play svg {
  background: rgba(221,51,51,.95);
  border-radius: 50%;
  padding: 6px;
  width: 32px; height: 32px;
}

/* YouTube video lightbox */
.hp-vlb {
  position: fixed; inset: 0; z-index: 100010;
  opacity: 0; transition: opacity .24s;
  display: flex; align-items: center; justify-content: center;
}
.hp-vlb--visible { opacity: 1; }
.hp-vlb__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.9); }
.hp-vlb__inner {
  position: relative; z-index: 1;
  width: 92vw; max-width: 1280px;
}
.hp-vlb__frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.hp-vlb__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.hp-vlb__close {
  position: absolute; top: -42px; right: 0;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.1);
  border: 0; border-radius: 50%;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.hp-vlb__close:hover { background: rgba(255,255,255,.2); }

/* ============================================================
 * Login/Register page — /my-account/ (Hưng Phát redesign)
 * ============================================================ */
.hp-login {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}
.hp-login__brand { text-align: center; margin-bottom: 36px; }
.hp-login__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.hp-login__logo-img { max-height: 64px; width: auto; }
.hp-login__tagline { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

.hp-login__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.hp-login--2col .hp-login__grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 768px) {
  .hp-login--2col .hp-login__grid { grid-template-columns: 1fr; }
}
.hp-login--1col .hp-login__grid { max-width: 480px; margin: 0 auto; }

.hp-login__card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}
[data-theme="dark"] .hp-login__card {
  background: var(--bg-2);
  border-color: var(--line);
}
.hp-login__card--register {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border-color: rgba(221, 51, 51, .15);
}
[data-theme="dark"] .hp-login__card--register {
  background: linear-gradient(135deg, rgba(221, 51, 51, .08) 0%, var(--bg-2) 100%);
}

.hp-login__card-head { margin-bottom: 24px; }
.hp-login__card-head h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hp-login__card-head h2 i { color: var(--red); font-size: 22px; }
.hp-login__card-head p { color: var(--muted); font-size: 13.5px; margin: 0; }

.hp-login__form { display: flex; flex-direction: column; gap: 16px; }
.hp-login__field { display: flex; flex-direction: column; gap: 6px; }
.hp-login__field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hp-login__field label i { color: var(--muted); font-size: 12px; width: 14px; text-align: center; }
.hp-login__field label .required { color: var(--red); }
.hp-login__field input[type="text"],
.hp-login__field input[type="email"],
.hp-login__field input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14.5px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.hp-login__field input:focus {
  outline: 0;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(221, 51, 51, .12);
}

.hp-login__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 4px 0;
}
.hp-login__remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink);
  cursor: pointer;
}
.hp-login__forgot {
  font-size: 13px; color: var(--red); text-decoration: none; font-weight: 600;
}
.hp-login__forgot:hover { text-decoration: underline; }

.hp-login__submit {
  width: 100%;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--red), #b71c1c);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  transition: transform .15s, box-shadow .15s;
}
.hp-login__submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(221, 51, 51, .35); }
.hp-login__submit--register {
  background: linear-gradient(135deg, #1a2e4a, #2563eb);
}
.hp-login__submit--register:hover { box-shadow: 0 4px 12px rgba(37, 99, 235, .35); }

.hp-login__note {
  background: rgba(37, 99, 235, .08);
  border-left: 3px solid #2563eb;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hp-login__note i { color: #2563eb; margin-top: 2px; }

/* Benefits row */
.hp-login__benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding: 20px;
  background: var(--bg-2);
  border-radius: 12px;
}
[data-theme="dark"] .hp-login__benefits { background: var(--bg-3); }
@media (max-width: 720px) {
  .hp-login__benefits { grid-template-columns: repeat(2, 1fr); }
}
.hp-login__benefit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.hp-login__benefit i { color: var(--red); font-size: 22px; margin-bottom: 4px; }
.hp-login__benefit strong { color: var(--ink); font-size: 13.5px; }

/* ============================================================
 * Dark mode: red TEXT contrast fix (PDP elements)
 * #d42626 trên --surface (#0d1117) chỉ ~3.3:1 — fail WCAG AA.
 * Override sang #ff5050 (5.3:1 trên #0d1117, 4.7:1 trên #151a21).
 * ============================================================ */
[data-theme="dark"] .phc-phone { color: #ff5050 !important; }
[data-theme="dark"] .pdp-tabs .tab.active,
[data-theme="dark"] .hp-pdp-tabs__nav button.is-active { color: #ff5050; border-color: #ff5050; }
[data-theme="dark"] .desc-sb-title { color: #ff5050; }
[data-theme="dark"] .desc-readmore-btn { color: #ff5050; border-color: #ff5050; }
[data-theme="dark"] .hp-login__benefit i { color: #ff5050; }
[data-theme="dark"] .pdp-tabs-section .woocommerce-Price-amount,
[data-theme="dark"] .pdp-tabs-section b,
[data-theme="dark"] .pdp-tabs-section bdi { color: #ff5050; }

/* ============================================================
 * A11y: pagination touch target đủ lớn (Lighthouse target-size)
 * .page-numbers mặc định WC quá nhỏ trên mobile.
 * ============================================================ */
/* Dùng !important + selector khớp WC vì WC core đặt min-width:1em/display:block specificity cao */
.woocommerce nav.woocommerce-pagination ul,
.woocommerce-pagination ul.page-numbers {
  display: flex !important; flex-wrap: wrap; gap: 8px; border: 0;
  justify-content: center;
}
.woocommerce nav.woocommerce-pagination ul li,
.woocommerce-pagination ul.page-numbers li { margin: 0; border: 0; }
.woocommerce nav.woocommerce-pagination ul li a.page-numbers,
.woocommerce nav.woocommerce-pagination ul li span.page-numbers,
.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
  min-width: 44px !important; min-height: 44px !important;
  padding: 8px 10px !important; box-sizing: border-box;
  display: inline-flex !important; align-items: center; justify-content: center;
}

/* ============================================================
 *  Mô tả danh mục ở cuối trang — read-more (mặc định cao 500px)
 * ============================================================ */
.hp-cat-desc { margin: 30px 0 8px; text-align: center; } /* center nút Xem thêm */
.hp-cat-desc__inner {
  max-height: 500px; overflow: hidden; position: relative; text-align: left;
  line-height: 1.75; color: var(--ink-2, #444); font-size: 15px;
}
.hp-cat-desc.is-expanded .hp-cat-desc__inner { max-height: none; }
/* gradient mờ đáy khi đang thu gọn */
.hp-cat-desc:not(.is-expanded):not(.is-short) .hp-cat-desc__inner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(transparent, var(--bg, #fff)); pointer-events: none;
}
.hp-cat-desc__inner h2, .hp-cat-desc__inner h3 { color: var(--ink); }
.hp-cat-desc__inner img { max-width: 100%; height: auto; border-radius: 8px; }
.hp-cat-desc__toggle {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid var(--red, #d42626); color: var(--red, #d42626);
  font-weight: 700; font-size: 14px; padding: 9px 22px; border-radius: 8px; cursor: pointer;
  transition: background .15s, color .15s;
}
.hp-cat-desc__toggle:hover { background: var(--red, #d42626); color: #fff; }
