/* product-layout.css — High-fidelity Product Details Page layout matching reference design. */

.screen-reader-text,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.product-page-main {
  margin-top: 10px;
  margin-bottom: 60px;
}

/* Breadcrumbs */
.acc-breadcrumb {
  background: transparent;
  padding: 16px 0 8px;
  font-size: 13px;
  color: #64748b;
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crumb-link {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: color .15s;
}

.crumb-link:hover {
  color: #1769e8;
}

.crumb-sep {
  color: #64748b;
  font-size: 14px;
}

.crumb-current {
  color: #0f172a;
  font-weight: 650;
}

/* Top 2-Column Product Detail */
.product-top-grid {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 8px;
}

/* Left Gallery */
.product-gallery-wrap {
  position: relative;
  min-width: 0;
}

.gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  aspect-ratio: 4/3;
  border: 1px solid #edf0f5;
  box-shadow: 0 1px 3px rgba(15,23,42,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(23,105,232,0.9);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.gallery-slide-img.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  color: #1e293b;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 6;
  transition: background-color .18s, color .18s, transform .18s;
  padding: 0;
}

.gallery-arrow:hover {
  background: #fff;
  color: #1769e8;
  transform: translateY(-50%) scale(1.06);
}

.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.thumb-item {
  width: 78px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  flex: none;
  transition: border-color .18s;
  padding: 0;
  background: #fff;
}

.thumb-item:hover {
  border-color: #93c5fd;
}

.thumb-item.is-active {
  border-color: #1769e8;
  box-shadow: 0 0 0 1px #1769e8;
}

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

/* Right Purchase Details */
.product-info-wrap {
  position: relative;
  min-width: 0;
}

.product-badges-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  line-height: 1.2;
}

.badge-hot {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.badge-discount {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 800;
  padding: 4px 8px;
}

.badge-genuine {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.product-h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 850;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -.6px;
}

.product-short-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.6;
  max-width: 620px;
}

.product-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #475569;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #eab308;
}

.rating-stars strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.rating-count {
  color: #64748b;
  font-size: 13px;
}

.stat-divider {
  color: #cbd5e1;
}

.stat-sold strong {
  color: #0f172a;
  font-weight: 800;
}

.price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 20px;
  padding: 12px 18px;
  background: #fafbfc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.price-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 13px;
  color: #475569;
}

.price-meta:not(:has(> :not([hidden]))) {
  display: none;
}

.price-plan {
  font-weight: 700;
  color: #0f172a;
}

.price-permonth {
  font-weight: 650;
  color: #1769e8;
}

.price-main {
  font-size: 30px;
  font-weight: 850;
  color: #dc2626;
  letter-spacing: -.6px;
}

.price-original {
  font-size: 15px;
  color: #475569;
  text-decoration: line-through;
}

.price-save {
  background: #fef2f2;
  color: #b91c1c;
  font-size: 11.5px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #fecaca;
}

/* Options */
.option-group {
  margin-bottom: 16px;
}

.option-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.option-radios {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-pill {
  position: relative;
  min-height: 44px;
  padding: 6px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s, box-shadow .18s;
  user-select: none;
}

.radio-pill:hover {
  border-color: #cbd5e1;
}

.radio-pill.is-selected {
  border-color: #1769e8;
  background: #eff6ff;
  color: #1769e8;
  box-shadow: 0 0 0 1px #1769e8;
}

.radio-pill > input[type="radio"],
.radio-pill-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}

.radio-pill.is-unavailable {
  background: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: pointer;
}

.radio-pill.is-unavailable:hover {
  border-color: #94a3b8;
  background: #fff;
}

.radio-pill.is-unavailable.is-selected {
  background: #eff6ff;
  border-color: #1769e8;
  color: #1769e8;
}

.radio-pill:has(.radio-pill-input:disabled) {
  text-decoration: line-through;
  cursor: not-allowed;
  background: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
  color: #64748b;
}

.radio-pill:has(.radio-pill-input:disabled):hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.radio-pill:has(.radio-pill-input:disabled) .duration-discount {
  text-decoration: none;
}

.radio-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: grid;
  place-items: center;
  transition: border-color .18s, background-color .18s;
}

.radio-pill.is-selected .radio-dot {
  border-color: #1769e8;
  background: #1769e8;
}

.radio-pill.is-selected .radio-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* Duration pills */
.option-duration-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.duration-pill {
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color .18s, background-color .18s, color .18s;
}

.duration-pill:hover {
  border-color: #cbd5e1;
}

.duration-pill.is-selected {
  background: #1769e8;
  color: #fff;
  border-color: #1769e8;
  font-weight: 750;
}

.duration-pill .check-icon {
  display: none;
}

.duration-pill.is-selected .check-icon {
  display: block;
}

.duration-discount {
  font-size: 11px;
  font-weight: 800;
  color: #b91c1c;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
}

.duration-pill.is-selected .duration-discount {
  background: #fee2e2;
  color: #b91c1c;
}

/* Quantity & CTAs */
.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.qty-row[hidden] {
  display: none !important;
}

.qty-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  height: 44px;
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.qty-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.qty-input {
  width: 42px;
  height: 36px;
  border: 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  background: transparent;
}

.actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) 46px;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-buy-now {
  height: 46px;
  border-radius: 10px;
  background: #1769e8;
  color: #fff;
  font-weight: 750;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(23,105,232,0.35);
  transition: transform .18s, box-shadow .18s;
  text-decoration: none;
}

.btn-buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(23,105,232,0.48);
}

.btn-buy-now:active {
  transform: translateY(0);
}

.btn-buy-now::before {
  content: "";
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 225deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.6) 45deg,
    transparent 90deg
  );
  animation: magic-btn-spin 3.5s linear infinite;
  z-index: -1;
}

.btn-buy-now::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 8.5px;
  background: #1769e8;
  z-index: -1;
  transition: background .18s;
}

.btn-buy-now:hover::after {
  background: #0f5bd3;
}

@keyframes magic-btn-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-add-cart {
  height: 46px;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s;
  text-decoration: none;
}

.btn-add-cart:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-wishlist {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .18s, color .18s, background-color .18s;
  padding: 0;
}

.btn-wishlist:hover {
  border-color: #f43f5e;
  color: #f43f5e;
  background: #fff1f2;
}

.mini-trust-row {
  list-style: none;
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 550;
  color: #64748b;
  flex-wrap: wrap;
}

.mini-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-trust-item svg {
  flex: none;
}

/* Features Strip (4 columns) */
.features-strip {
  margin-top: 32px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #f0f7ff;
  border: 1px solid #e0eeff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  border-right: 1px solid #dbeafe;
}

.feature-item:last-child {
  border-right: none;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: #1769e8;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 1px 3px rgba(23,105,232,0.1);
}

.feature-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.25;
}

.feature-copy span {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Tabs & Sidebar Layout */
.product-content-layout {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  background: #f1f5f9;
  color: #475569;
  transition: background-color .18s, color .18s;
}

.tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tab-btn.is-active {
  background: #1769e8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(23,105,232,0.25);
}

.tab-panel {
  display: none;
  border-radius: 14px;
  border: 1px solid #edf1f7;
  background: #fff;
  padding: 26px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.02);
}

.tab-panel.is-active {
  display: block;
}

.tab-desc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 28px;
  align-items: center;
}

.tab-desc-grid.tab-desc-grid--no-media {
  grid-template-columns: 1fr;
}

.tab-desc-text h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
}

.tab-desc-text p {
  font-size: 13.5px;
  line-height: 1.65;
  color: #475569;
  margin: 0 0 18px;
}

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}

.check-circle {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #e8f8ee;
  color: #16a34a;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}

.desc-graphic-img {
  width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 16px rgba(15,23,42,0.06);
  border: 1px solid #eef2f6;
  object-fit: cover;
  aspect-ratio: 4/3;
  background: #f8fafc;
}
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 16px rgba(124,58,237,0.12);
}

/* Product Full Article & Table of Contents (TOC) */
.tab-article-divider {
  border: 0;
  border-top: 1px solid #eef2f6;
  margin: 30px 0 26px;
}

.product-full-article {
  margin-top: 10px;
}

.product-toc-box {
  margin-bottom: 28px;
}

.acc-toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.acc-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.acc-toc__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-toc__icon {
  color: #1769e8;
  flex: none;
}

.acc-toc__title {
  font-size: 15px;
  font-weight: 750;
  color: #0f172a;
}

.acc-toc__toggle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  transition: background-color .18s, color .18s, border-color .18s;
  padding: 0;
}

.acc-toc__toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.acc-toc__chevron {
  transition: transform .2s ease;
  transform: rotate(180deg);
}

.acc-toc__chevron.is-collapsed {
  transform: rotate(0deg);
}

.acc-toc__nav {
  transition: opacity .2s ease, max-height .2s ease;
}

.acc-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acc-toc__item {
  margin: 0;
  padding: 0;
}

.acc-toc__item--h2 > .acc-toc__link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 650;
  color: #1e293b;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s, background-color .15s;
}

.acc-toc__item--h2 > .acc-toc__link:hover,
.acc-toc__item--h2 > .acc-toc__link.is-active {
  color: #1769e8;
  background: #eff6ff;
}

.acc-toc__sublist {
  list-style: none;
  padding-left: 20px;
  margin: 4px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acc-toc__item--h3 > .acc-toc__link {
  display: inline-block;
  font-size: 12.5px;
  color: #64748b;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 5px;
  transition: color .15s, background-color .15s;
}

.acc-toc__item--h3 > .acc-toc__link:hover,
.acc-toc__item--h3 > .acc-toc__link.is-active {
  color: #1769e8;
  background: #eff6ff;
}

/* Article Prose Typography & Elements */
.acc-prose {
  font-size: 14.5px;
  line-height: 1.75;
  color: #334155;
}

.acc-prose h2.acc-desc-heading,
.acc-prose h2 {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #f1f5f9;
  line-height: 1.35;
  scroll-margin-top: 90px;
}

.acc-prose h3.acc-desc-heading,
.acc-prose h3 {
  font-size: 16.5px;
  font-weight: 750;
  color: #1e293b;
  margin: 24px 0 10px;
  line-height: 1.4;
  scroll-margin-top: 90px;
}

.acc-prose p {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: #334155;
}

.acc-prose strong {
  font-weight: 750;
  color: #0f172a;
}

.acc-prose a {
  color: #1769e8;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color .15s;
}

.acc-prose a:hover {
  color: #0d47a1;
}

.acc-prose ul,
.acc-prose ol {
  margin: 0 0 18px 24px;
  padding: 0;
}

.acc-prose ul {
  list-style-type: disc;
}

.acc-prose ol {
  list-style-type: decimal;
}

.acc-prose li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: #334155;
}

/* Modern Clean Table Styling */
.acc-prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin: 22px 0 26px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  font-size: 13.5px;
}

.acc-prose thead th {
  background: #f8fafc;
  font-size: 13px;
  font-weight: 750;
  color: #1e293b;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1.5px solid #e2e8f0;
  line-height: 1.4;
}

.acc-prose tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.5;
}

.acc-prose tbody tr:last-child td {
  border-bottom: 0;
}

.acc-prose tbody tr:nth-child(even) {
  background: #fafbfc;
}

/* Guide steps */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1769e8;
  color: #fff;
  font-weight: 750;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex: none;
}

/* Sidebar Card: Vì sao chọn ACCBAOHANH */
.why-acc-card {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid #e0eeff;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,0.03);
}

.why-acc-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.why-acc-title svg {
  color: #1769e8;
  flex: none;
}

.why-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.why-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #334155;
  font-weight: 550;
  line-height: 1.45;
}

.why-social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #64748b;
}

.why-social-proof strong {
  display: block;
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 800;
}

.why-avatars-img {
  width: 80px;
  height: 32px;
  object-fit: contain;
  flex: none;
}

.why-acc-btn {
  margin-top: 16px;
  width: 100%;
}

.check-circle-sm {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #e8f8ee;
  color: #16a34a;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
}

.why-social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #64748b;
}

.why-social-proof strong {
  color: #0f172a;
  font-weight: 800;
}

/* 2-Column: Reviews & FAQ */
.reviews-faq-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.review-card, .faq-card {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid #edf1f7;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,0.02);
}

.card-heading {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 18px;
}

.score-overview {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.score-big .num {
  font-size: 38px;
  font-weight: 850;
  color: #0f172a;
}

.score-big .den {
  font-size: 18px;
  color: #94a3b8;
  font-weight: 600;
}

.stars-row {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
}

.review-total {
  font-size: 12.5px;
  color: #64748b;
}

.rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #475569;
}

.bar-star {
  width: 28px;
  flex: none;
  font-weight: 650;
}

.bar-track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: #f1f5f9;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: #1769e8;
}

.bar-pct {
  width: 34px;
  text-align: right;
  color: #64748b;
  font-weight: 600;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 12px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
  transition: transform .2s ease, color .2s ease;
  flex: none;
}

.faq-answer {
  display: none;
  padding-top: 8px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

.faq-answer p {
  margin: 0;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  color: #1769e8;
}

/* Related Products Grid Matching Reference Design */
.related-products-section {
  margin-top: 48px;
  margin-bottom: 30px;
}

.rel-product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.rel-product-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  padding: 16px 18px 18px;
  text-decoration: none;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.rel-product-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 14px;
}

.rel-brand-logo {
  display: flex;
  align-items: center;
}

.rel-logo-coursera {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.coursera-text {
  font-size: 15.5px;
  font-weight: 850;
  letter-spacing: -0.6px;
  color: #0056D2;
}

.rel-badge-discount {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.2;
}

.rel-badge-hot {
  display: inline-block;
  background: #0284c7;
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.2;
}

.rel-product-title {
  font-size: 14px;
  font-weight: 750;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.35;
  transition: color .18s;
}

.rel-product-card:hover .rel-product-title {
  color: #1769e8;
}

.rel-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 8px;
}

.rel-price-sale {
  font-size: 14.5px;
  font-weight: 850;
  color: #dc2626;
  letter-spacing: -0.3px;
}

.rel-price-reg {
  font-size: 12px;
  color: #475569;
  text-decoration: line-through;
}

.rel-rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  margin-top: auto;
}

.rel-star {
  color: #eab308;
  font-size: 12px;
}

.rel-rating-row strong {
  color: #0f172a;
  font-weight: 750;
}

.rel-count {
  color: #475569;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 1200px) {
  .rel-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .rel-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .rel-product-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 1080px) {
  .product-top-grid {
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 28px;
  }
  .features-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .feature-item {
    border-right: none;
  }
  .product-content-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .reviews-faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .product-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .gallery-main {
    max-width: 520px;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .product-page-main {
    margin-top: 0;
  }
  .product-h1 {
    font-size: 24px;
  }
  .price-main {
    font-size: 26px;
  }
  .actions-row {
    grid-template-columns: 1fr 1fr;
  }
  .features-strip {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }
  .tab-desc-grid {
    grid-template-columns: 1fr;
  }
  .tab-desc-graphic {
    display: none;
  }
  .tab-btn {
    padding: 0 12px;
    font-size: 12.5px;
  }
  .tab-panel {
    padding: 18px;
  }
}

/* ==========================================================
   Hardening: overflow, contrast, focus, tap targets, contract
   ========================================================== */

/* Overflow containment */
.tabs-column,
.sidebar-column {
  min-width: 0;
}

.gallery-thumbs {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tab-nav {
  max-width: 100%;
}

.tab-panel {
  min-width: 0;
  overflow-wrap: anywhere;
}

.acc-prose {
  min-width: 0;
  overflow-wrap: anywhere;
}

.acc-prose img,
.acc-prose video,
.acc-prose iframe {
  max-width: 100%;
}

.acc-prose img,
.acc-prose video {
  height: auto;
}

.acc-prose iframe {
  border: 0;
}

.acc-prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.acc-prose pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Price total line (qty > 1) */
.price-box {
  flex-wrap: wrap;
}

.price-total {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.price-total[hidden] {
  display: none;
}

.price-total strong,
#displayTotal {
  color: #0f172a;
  font-weight: 800;
}

/* Disabled CTAs (no valid variation chosen yet) */
.btn-buy-now[disabled],
.btn-buy-now[aria-disabled="true"],
.btn-add-cart[disabled],
.btn-add-cart[aria-disabled="true"] {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-buy-now[disabled],
.btn-buy-now[aria-disabled="true"] {
  background: #cbd5e1;
  color: #334155;
}

.btn-add-cart[disabled],
.btn-add-cart[aria-disabled="true"] {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.btn-buy-now[disabled]:hover,
.btn-buy-now[aria-disabled="true"]:hover {
  background: #cbd5e1;
  transform: none;
}

.btn-add-cart[disabled]:hover,
.btn-add-cart[aria-disabled="true"]:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* Zalo CTA */
.btn-zalo-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin: -6px 0 18px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #0757cf;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s, border-color .18s;
}

.btn-zalo-chat svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: #0068ff;
}

.btn-zalo-chat:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Notices */
.product-notices:empty,
.product-notices:not(:has(.woocommerce-error, .woocommerce-info, .product-notice--error, .product-notice)) {
  display: none;
}

.product-notices {
  margin-bottom: 14px;
}

.product-notices ul,
.product-notices ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-notices .woocommerce-error,
.product-notices .woocommerce-message,
.product-notices .woocommerce-info,
.product-notices .wc-block-components-notice-banner,
.product-notice {
  display: block;
  margin: 0 0 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.product-notices .woocommerce-message,
.product-notices .wc-block-components-notice-banner.is-success,
.woocommerce-message:has(.added-to-cart),
.woocommerce-message:has(.wc-forward) {
  display: none !important;
}

.product-notices .woocommerce-error,
.product-notices .wc-block-components-notice-banner.is-error,
.product-notice--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.product-notices .button,
.product-notices .wc-forward {
  float: none;
  margin-left: 8px;
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
}

.product-notices .woocommerce-error::before,
.product-notices .woocommerce-message::before,
.product-notices .woocommerce-info::before {
  display: none;
}

/* Account username field (inc/woocommerce.php) */
.acc-account-upgrade-wrapper {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.acc-account-upgrade-wrapper label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.acc-account-upgrade-wrapper .required {
  color: #b91c1c;
  text-decoration: none;
}

.acc-account-upgrade-wrapper input[type="text"],
.acc-account-upgrade-wrapper input[type="email"],
.acc-account-upgrade-wrapper .acc-input-field {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  box-shadow: none;
  transition: border-color .18s, box-shadow .18s;
}

.acc-account-upgrade-wrapper input::placeholder {
  color: #64748b;
}

.acc-account-upgrade-wrapper input:focus,
.acc-account-upgrade-wrapper input:focus-visible {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
  border-color: #1769e8;
}

.acc-account-upgrade-wrapper small,
.acc-account-upgrade-wrapper .description {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
}

.acc-account-upgrade-wrapper.has-error input,
.acc-account-upgrade-wrapper.has-error .acc-input-field {
  border-color: #dc2626;
  background: #fef2f2;
}

.acc-account-upgrade-wrapper.has-error input:focus-visible {
  outline-color: #dc2626;
}

.acc-account-upgrade-wrapper.has-error .acc-field-error,
.acc-account-upgrade-wrapper.has-error .error,
.acc-account-upgrade-wrapper.has-error small {
  color: #b91c1c;
  font-weight: 600;
}

/* Related products (homepage card renderer) */
.rel-products-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.rel-products-grid > * {
  min-width: 0;
}

.rel-products-grid .product-card {
  overflow: hidden;
}

.rel-products-grid .old-price {
  color: #475569;
  font-size: 12px;
}

.rel-products-grid .product-description,
.rel-products-grid .product-title {
  overflow-wrap: anywhere;
}

/* Focus rings */
.radio-pill:has(> input[type="radio"]:focus-visible),
.radio-pill:has(.radio-pill-input:focus-visible),
.tab-btn:focus-visible,
.qty-btn:focus-visible,
.gallery-arrow:focus-visible,
.thumb-item:focus-visible,
.faq-question:focus-visible,
#acc-toc-toggle:focus-visible,
.acc-toc__toggle:focus-visible,
.acc-toc__link:focus-visible,
.btn-buy-now:focus-visible,
.btn-add-cart:focus-visible,
.btn-zalo-chat:focus-visible,
.acc-prose a:focus-visible,
.crumb-link:focus-visible {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
}

.qty-control:focus-within {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
}

.qty-input:focus-visible {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
  border-radius: 6px;
}

.qty-btn:focus-visible {
  outline-offset: 2px;
}

.faq-question:focus-visible {
  border-radius: 6px;
}

/* Tap targets */
.faq-question {
  min-height: 44px;
}

.acc-toc__link {
  min-height: 36px;
}

@media (max-width: 860px), (pointer: coarse) {
  .gallery-arrow {
    width: 44px;
    height: 44px;
  }
  .qty-control {
    height: 44px;
  }
  .qty-btn {
    width: 44px;
    height: 44px;
  }
  .qty-input {
    width: 48px;
    height: 44px;
  }
  .acc-toc__toggle {
    width: 44px;
    height: 44px;
  }
  .acc-toc__item--h2 > .acc-toc__link,
  .acc-toc__item--h3 > .acc-toc__link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
  }
  .acc-toc__list,
  .acc-toc__sublist {
    gap: 2px;
  }
  .tab-btn,
  .radio-pill,
  .faq-question {
    min-height: 44px;
  }
  .thumb-item {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 1200px) {
  .rel-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .rel-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .product-top-grid {
    gap: 24px;
  }
}

/* Related cards reuse the homepage renderer; lift its links to touch-sized targets. */
@media (max-width: 860px), (pointer: coarse) {
  .related-products-section .view-all,
  .rel-products-grid .product-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .rel-products-grid .product-title a {
    display: block;
    padding-block: 6px;
  }
}

/* ==========================================================
   Template hooks (HardenTemplate)
   ========================================================== */
#displayRegPrice[hidden],
#displaySave[hidden],
.price-total[hidden] {
  display: none !important;
}

.product-short-desc p {
  margin: 0 0 8px;
}

.product-short-desc p:last-child {
  margin-bottom: 0;
}

.option-label {
  display: block;
}

.radio-pill-text {
  min-width: 0;
}

/* Flatsome-style notices: ul > li > .message-container */
.product-notices .woocommerce-notices-wrapper {
  margin: 0;
}

.product-notices ul.woocommerce-error,
.product-notices ul.woocommerce-message,
.product-notices ul.woocommerce-info {
  list-style: none;
}

.product-notices li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-notices .message-container {
  display: block;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.product-notices .message-container::before,
.product-notices li::before {
  display: none;
}

.product-notice {
  margin: 0 0 8px;
}

/* Content layout without aside */
.product-content-layout--solo {
  grid-template-columns: minmax(0, 1fr);
}

.tab-panel:focus-visible {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
}

/* Support card in sidebar */
.support-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #475569;
}

.support-line a {
  color: #0757cf;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 24px;
}

.support-line a:focus-visible {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
  border-radius: 4px;
}

.why-acc-card .btn-zalo-chat {
  margin: 14px 0 0;
}

/* Reviews & FAQ single column */
.reviews-faq-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.review-item {
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.review-item:first-child {
  padding-top: 0;
}

.review-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.review-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 4px;
}

.review-author {
  font-size: 13.5px;
  font-weight: 750;
  color: #0f172a;
}

.review-date {
  font-size: 12px;
  color: #475569;
}

.review-stars {
  display: flex;
  gap: 2px;
  color: #eab308;
  margin-bottom: 6px;
}

.review-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  overflow-wrap: anywhere;
}


/* Username field real markup: .acc-field-label / .acc-field-desc / .acc-input-field */
.acc-account-upgrade-wrapper .acc-field-label {
  margin-bottom: 4px;
}

.acc-account-upgrade-wrapper .acc-field-desc {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}

.acc-account-upgrade-wrapper .acc-field-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #15803d;
  background: #f0fdf4;
  padding: 8px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
}

.acc-account-upgrade-wrapper .acc-field-hint svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: #16a34a;
  margin-top: 1px;
}

.acc-account-upgrade-wrapper input[aria-invalid="true"] {
  border-color: #dc2626;
  background: #fef2f2;
}

.acc-account-upgrade-wrapper.has-error .acc-field-label,
.acc-account-upgrade-wrapper.has-error .acc-field-desc {
  color: #b91c1c;
}

.product-notice--js {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

/* Support card rows: 44px tap height for links */
.support-line {
  min-height: 44px;
  align-items: center;
}

.support-line a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

/* Let the 2px-offset focus rings of qty controls render outside the box */
.qty-control {
  overflow: visible;
}

.qty-control .qty-btn:first-child {
  border-radius: 7px 0 0 7px;
}

.qty-control .qty-btn:last-child {
  border-radius: 0 7px 7px 0;
}

/* ==========================================================
   Plan picker (cards), collapsible article, sticky buy bar
   ========================================================== */
.plan-picker {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.plan-picker > legend {
  padding: 0;
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
  user-select: none;
}

.plan-card:hover {
  border-color: #cbd5e1;
}

.plan-card.is-best {
  position: relative;
}

.plan-card.is-best::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background-image: radial-gradient(
    circle at 50% 50%,
    transparent 15%,
    #1769e8 50%,
    transparent 85%
  );
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: magic-shine 7s infinite linear;
  pointer-events: none;
  z-index: 2;
}

.plan-card.is-best:not(.is-selected) {
  border-color: #93c5fd;
}

@keyframes magic-shine {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

.plan-card.is-selected {
  border-color: #1769e8;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #1769e8;
}

.plan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(23, 105, 232, 0.08),
    transparent 65%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.plan-card:hover::after {
  opacity: 1;
}

.plan-card.is-soldout {
  border-style: dashed;
  background: #f8fafc;
  cursor: not-allowed;
}

.plan-card-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}

.plan-card:has(.plan-card-input:focus-visible) {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
}

.plan-card.is-selected .radio-dot {
  border-color: #1769e8;
  background: #1769e8;
}

.plan-card.is-selected .radio-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.plan-card-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.plan-flag {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.plan-flag--best {
  background: #d1fae5;
  color: #065f46;
}

.plan-flag--soldout {
  background: #e2e8f0;
  color: #334155;
}

.plan-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-card-head .radio-dot {
  flex: none;
}

.plan-card-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.plan-card-type {
  font-size: 14px;
  font-weight: 750;
  color: #0f172a;
}

.plan-card-term {
  font-size: 13px;
  font-weight: 650;
  color: #475569;
}

.plan-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.plan-card-now {
  font-size: 18px;
  font-weight: 850;
  color: #dc2626;
  letter-spacing: -.3px;
}

.plan-card-reg {
  font-size: 12.5px;
  color: #475569;
}

.plan-card-month {
  font-size: 12.5px;
  font-weight: 700;
  color: #1769e8;
}

.plan-card-note {
  font-size: 12px;
  line-height: 1.4;
  color: #475569;
}

.acc-account-upgrade-wrapper[hidden] {
  display: none !important;
}

/* Collapsible article */
.article-clamp {
  position: relative;
}

.article-clamp.is-collapsed {
  max-height: 460px;
  overflow: hidden;
}

.article-clamp.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}

.article-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #1769e8;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}

.article-toggle:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.article-toggle:focus-visible {
  outline: 2px solid #1769e8;
  outline-offset: 2px;
}

.article-toggle svg {
  transition: transform .2s ease;
}

.article-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Submit in flight */
.btn-buy-now.is-loading,
.btn-add-cart.is-loading {
  cursor: progress;
}

.btn-buy-now.is-loading::after,
.btn-add-cart.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: acc-spin .7s linear infinite;
}

.product-buy-form.is-submitting .btn-buy-now,
.product-buy-form.is-submitting .btn-add-cart {
  pointer-events: none;
}

@keyframes acc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile sticky buy bar: rendered by single-product.php, hidden on desktop. */
.acc-sticky-buy {
  display: none;
}

@media (max-width: 860px) {
  .acc-sticky-buy.is-visible {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
  }

  body.has-acc-sticky {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .acc-sticky-buy__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .acc-sticky-buy__plan {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 650;
    color: #475569;
  }

  .acc-sticky-buy__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }

  .acc-sticky-buy__price strong {
    font-size: 18px;
    font-weight: 850;
    color: #dc2626;
    white-space: nowrap;
  }

  .acc-sticky-buy__price del {
    font-size: 12.5px;
    color: #475569;
    white-space: nowrap;
  }

  .acc-sticky-buy__price del[hidden] {
    display: none;
  }

  .acc-sticky-buy__btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #1769e8;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(23, 105, 232, 0.28);
  }

  .acc-sticky-buy__btn:hover {
    background: #0f5bd3;
  }

  .acc-sticky-buy__btn:focus-visible {
    outline: 2px solid #1769e8;
    outline-offset: 2px;
  }

  .acc-sticky-buy__btn[disabled] {
    background: #cbd5e1;
    color: #334155;
    box-shadow: none;
    cursor: not-allowed;
  }

  /* Keep focused fields clear of the fixed bar. */
  .acc-account-upgrade-wrapper,
  .plan-picker {
    scroll-margin-bottom: 96px;
  }
}

@media (max-width: 640px) {
  .actions-row {
    grid-template-columns: 1fr 46px;
    gap: 10px;
  }
  .actions-row .btn-buy-now {
    grid-column: 1 / -1;
  }
  .features-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .feature-item {
    border-right: none;
    border-bottom: 1px solid #dbeafe;
    padding-bottom: 10px;
  }
  .feature-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .tab-desc-grid {
    grid-template-columns: 1fr;
  }
  .reviews-faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-buy-now.is-loading::after,
  .btn-add-cart.is-loading::after {
    animation: none;
  }
}
