/* Product detail page (classes wired in views/product/show.php) */
.product-detail .product-description {
  font-size: 0.975rem;
  line-height: 1.65;
  color: var(--t-muted);
}
.product-detail .product-description p + p {
  margin-top: 0.65rem;
}
.product-detail h1.text-3xl {
  letter-spacing: 0.02em;
}

.product-detail .text-xs.uppercase.tracking-wider {
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--t-muted-2);
}

.product-detail .product-breadcrumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(249, 250, 251, 0.92));
  border-bottom-color: var(--line-soft);
  backdrop-filter: blur(8px);
}

html[data-theme="dark"] .product-detail .product-breadcrumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.product-detail .product-gallery-frame {
  border-radius: var(--radius-xl);
  border-color: var(--line-soft);
  background: linear-gradient(180deg, var(--surface-muted), #f9fafb);
  box-shadow: var(--shadow-md), var(--inset-light);
}

html[data-theme="dark"] .product-detail .product-gallery-frame {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-color: var(--t-border);
  box-shadow: var(--shadow-md), var(--inset-light);
}

.product-detail .product-gallery-stage {
  background: radial-gradient(120% 90% at 50% 20%, rgba(239, 206, 0, 0.06), transparent 55%), var(--surface-muted);
}

html[data-theme="dark"] .product-detail .product-gallery-stage {
  background: radial-gradient(120% 90% at 40% 15%, rgba(239, 206, 0, 0.08), transparent 55%), rgba(0, 0, 0, 0.2);
}

.product-detail #product-main-image {
  transition: transform 0.55s var(--ease-out);
}

.product-detail #product-main-image:hover {
  transform: scale(1.01);
}

.product-detail .product-gallery-thumb {
  border-radius: var(--radius-md);
  border-color: var(--line-soft);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}

.product-detail .product-gallery-thumb:hover {
  border-color: rgba(17, 24, 39, 0.14);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.product-detail .product-gallery-thumb:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--t-focus), var(--shadow-md);
}

html[data-theme="dark"] .product-detail .product-gallery-thumb {
  border-color: var(--t-border);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35), var(--inset-light);
}

html[data-theme="dark"] .product-detail .product-gallery-thumb:hover {
  border-color: rgba(239, 206, 0, 0.35);
}

/* Active thumb: JS adds .ring-2 .ring-gray-900 */
html[data-theme="dark"] .product-detail .product-gallery-thumb.ring-2.ring-gray-900 {
  border-color: rgba(239, 206, 0, 0.5);
  box-shadow: 0 0 0 2px rgba(239, 206, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
}

.product-detail .product-trust-hints .rounded-xl {
  border-radius: var(--radius-md);
  border-color: var(--line-soft);
  background: linear-gradient(180deg, #fff, #fafafa);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}

.product-detail .product-trust-hints .rounded-xl:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}

html[data-theme="dark"] .product-detail .product-trust-hints .rounded-xl {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border-color: var(--t-border);
  box-shadow: var(--shadow-md), var(--inset-light);
}

.product-detail .buy-box {
  border-radius: var(--radius-xl);
  border-color: var(--line-soft);
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
  box-shadow: var(--shadow-lg), var(--inset-light);
}

html[data-theme="dark"] .product-detail .buy-box {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border-color: var(--t-border);
  box-shadow: var(--shadow-lg), var(--inset-light);
}

.product-detail .price-panel {
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(239, 206, 0, 0.06), rgba(17, 24, 39, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 14px 40px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .product-detail .price-panel {
  background: linear-gradient(135deg, rgba(239, 206, 0, 0.1), rgba(93, 83, 48, 0.08));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 55px rgba(0, 0, 0, 0.45);
}

.product-detail #product-main-price {
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.product-detail .stock-badge {
  border: 1px solid rgba(16, 185, 129, 0.22);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.1);
}

html[data-theme="dark"] .product-detail .stock-badge {
  background: rgba(16, 185, 129, 0.12);
  color: rgba(167, 243, 208, 0.95);
  border-color: rgba(16, 185, 129, 0.28);
}

/* Express checkout on PDP: full width of column (buy bar or legacy buy-box) */
.product-detail .wallet-express-root[data-wallet-placement="pdp"] {
  width: 100%;
  max-width: 100%;
}

.product-detail .wallet-express-root[data-wallet-placement="pdp"] #wallet-stripe-express,
.product-detail .wallet-express-root[data-wallet-placement="pdp"] #wallet-paypal-buttons {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.product-detail .wallet-express-root[data-wallet-placement="pdp"] #wallet-stripe-express > div,
.product-detail .wallet-express-root[data-wallet-placement="pdp"] #wallet-paypal-buttons > div {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.product-detail .wallet-express-root[data-wallet-placement="pdp"] iframe {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Stacked express wallets (PDP buy column, basket sidebar) — full width hosts */
.wallet-express-root--stack {
  margin-top: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.wallet-express-host-stack {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.wallet-express-root--footer {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
}
.wallet-express-host-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.product-detail .product-add-form button[type="submit"] {
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #111827, #0b1220);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28), var(--inset-light);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), filter var(--t) var(--ease);
}

.product-detail .product-add-form button[type="submit"]:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.product-detail .product-add-form button[type="submit"]:active {
  transform: translateY(0);
}

html[data-theme="dark"] .product-detail .product-add-form button[type="submit"] {
  background: linear-gradient(180deg, #efce00, #c9b000);
  color: #111827;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), 0 0 20px rgba(239, 206, 0, 0.12);
}

html[data-theme="dark"] .product-detail .product-add-form button[type="submit"]:hover {
  filter: brightness(1.04);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.48);
}

.product-detail .product-section-title {
  color: var(--brand-deep);
}

.product-detail .key-points-card h2 {
  color: var(--brand-deep);
}

.product-detail .product-enquiry-card {
  border-radius: var(--radius-xl);
  border-color: var(--brand-deep-tint);
  background: linear-gradient(145deg, rgba(239, 206, 0, 0.08), #ffffff 55%, rgba(93, 83, 48, 0.04));
  box-shadow: var(--shadow-md), var(--inset-light);
}

.product-detail .product-enquiry-heading {
  color: var(--brand-deep);
  letter-spacing: 0.02em;
}

.product-detail .product-enquiry-link {
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #111827;
  border: 1px solid rgba(93, 83, 48, 0.18);
  box-shadow: 0 8px 22px rgba(93, 83, 48, 0.12);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}

.product-detail .product-enquiry-link:hover {
  background: var(--brand-hover);
  border-color: rgba(93, 83, 48, 0.22);
  box-shadow: 0 12px 28px rgba(93, 83, 48, 0.14);
  transform: translateY(-1px);
}

.product-detail .product-enquiry-link:active {
  transform: translateY(0);
}

html[data-theme="dark"] .product-detail .product-enquiry-card {
  background: linear-gradient(145deg, rgba(239, 206, 0, 0.1), rgba(255, 255, 255, 0.05));
  border-color: rgba(93, 83, 48, 0.28);
}

html[data-theme="dark"] .product-detail .product-enquiry-heading {
  color: #f0e6b8;
}

html[data-theme="dark"] .product-detail .product-enquiry-link {
  color: #111827;
  border-color: rgba(93, 83, 48, 0.25);
}

html[data-theme="dark"] .product-detail .product-enquiry-link:hover {
  border-color: rgba(239, 206, 0, 0.45);
}

.product-detail .express-checkout .rounded-full.bg-white {
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.product-detail .product-section {
  border-radius: var(--radius-xl);
  border-color: var(--line-soft);
  background: linear-gradient(180deg, #fff, #fcfcfd);
  box-shadow: var(--shadow-md), var(--inset-light);
}

html[data-theme="dark"] .product-detail .product-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
  border-color: var(--t-border);
  box-shadow: var(--shadow-md), var(--inset-light);
}

.product-detail .product-meta-tile {
  border-radius: var(--radius-md);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.product-detail .product-meta-tile:hover {
  border-color: rgba(17, 24, 39, 0.16);
  box-shadow: var(--shadow-sm);
}

/* Quantity input: keep light field on dark PDP for readability */
html[data-theme="dark"] .product-add-form input[name="quantity"] {
  background-color: #ffffff;
  color: #111827;
  text-align: center;
  border-radius: var(--radius-md);
  border-color: rgba(17, 24, 39, 0.12);
}

.product-detail .product-extra-option {
  border-radius: var(--radius-md);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.product-detail .product-extra-option:hover {
  border-color: rgba(17, 24, 39, 0.14);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] #vat-toggle.bg-gray-900 #vat-toggle-knob {
  background-color: rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] #vat-toggle.bg-gray-300 {
  background-color: rgba(255, 255, 255, 0.18);
}

/* Rich text inside PDP */
.product-description ul {
  list-style: disc;
  padding-left: 1.25rem;
}
.product-description ol {
  list-style: decimal;
  padding-left: 1.25rem;
}
.product-description a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.product-description h1,
.product-description h2,
.product-description h3 {
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: inherit;
  font-family: inherit;
  letter-spacing: normal;
}
.product-description p {
  margin-bottom: 0.5rem;
}
.product-description p:last-child {
  margin-bottom: 0;
}
.product-description {
  max-width: 100%;
}

@media (max-width: 767px) {
  .product-detail aside .lg\:sticky > div:first-child {
    border-radius: var(--radius-lg);
  }
}
