/* ==========================================================================
   PRODUCT DETAIL RESKIN — design-tokens.json bound
   Scoped under #wp--skip-link--target to beat unlayered/!important WC CSS
   (see product-detail.css header note). Loaded AFTER product-detail.css.
   1. TOKENS
   2. RESET-ISH / BASE TEXT
   3. LAYOUT — RESPONSIVE COLUMNS
   4. GALLERY
   5. SUMMARY (title/price/excerpt/qty/CTA/meta)
   6. TABS (incl. mobile horizontal scroll)
   7. DETAILS PANEL (description/reviews/form)
   8. FOCUS / STATES
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
#wp--skip-link--target {
  --bg: oklch(100% 0 0);
  --surface: oklch(97% 0 0);
  --fg: oklch(15% 0 0);
  --muted: oklch(45% 0 0);
  --border: oklch(90% 0 0);
  --accent: oklch(76% 0.105 81);
  --accent-hover: oklch(69.9% 0.13 77);
  --accent-active: oklch(60% 0.125 75);
  --font-display: "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Helvetica Neue", system-ui, sans-serif;
}

/* ==========================================================================
   2. RESET-ISH / BASE TEXT
   ========================================================================== */
#wp--skip-link--target {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
}

#wp--skip-link--target .woocommerce-breadcrumb {
  color: var(--muted);
  font-family: var(--font-body);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

#wp--skip-link--target .woocommerce-breadcrumb a {
  color: var(--muted);
}

#wp--skip-link--target .woocommerce-breadcrumb a:hover {
  color: var(--fg);
}

/* ==========================================================================
   3. LAYOUT — RESPONSIVE COLUMNS
   Fix: at a mid viewport the gallery's fixed 512px basis squeezes the
   summary column (title/price/CTA) instead of both stacking cleanly.
   Stack to a single column before that squeeze happens, not only at
   classic mobile widths.
   ========================================================================== */
#wp--skip-link--target .wp-block-columns.alignwide {
  gap: 48px;
}

@media (max-width: 1023px) {
  #wp--skip-link--target .wp-block-columns.alignwide {
    flex-direction: column !important;
    flex-wrap: wrap !important;
  }

  #wp--skip-link--target .wp-block-columns.alignwide>.wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   4. GALLERY
   ========================================================================== */
#wp--skip-link--target .woocommerce-product-gallery {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

#wp--skip-link--target .woocommerce-product-gallery__image {
  max-width: 100%;
}

#wp--skip-link--target .woocommerce-product-gallery__image img {
  border-radius: 6px;
  max-width: 100% !important;
  height: auto !important;
  width: 100% !important;
}

#wp--skip-link--target .woocommerce-product-gallery__image .zoomImg {
  max-width: none !important;
}

#wp--skip-link--target .woocommerce-product-gallery__trigger span[aria-hidden] {
  color: var(--fg);
}

/* ==========================================================================
   5. SUMMARY — title / price / excerpt / qty / CTA / meta
   ========================================================================== */
#wp--skip-link--target .wp-block-post-title {
  font-family: var(--font-display);
  color: var(--fg);
  font-size: 40px;
  font-weight: 590;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

#wp--skip-link--target .wc-block-components-product-price .woocommerce-Price-amount {
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 550;
}

#wp--skip-link--target .wp-block-post-excerpt__excerpt {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
}

/* Quantity stepper — ghost/neutral, never accent */
#wp--skip-link--target .wc-block-components-quantity-selector {
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  background: var(--bg) !important;
  overflow: hidden;
}

#wp--skip-link--target .wc-block-components-quantity-selector__input {
  color: var(--fg) !important;
  font-family: var(--font-body);
}

#wp--skip-link--target .wc-block-components-quantity-selector__button {
  color: var(--fg) !important;
  opacity: 1 !important;
}

#wp--skip-link--target .wc-block-components-quantity-selector__button.wc-block-components-quantity-selector__button--minus {
  border-top-left-radius: 999px !important;
  border-bottom-left-radius: 999px !important;
}

#wp--skip-link--target .wc-block-components-quantity-selector__button.wc-block-components-quantity-selector__button--plus {
  border-top-right-radius: 999px !important;
  border-bottom-right-radius: 999px !important;
}

#wp--skip-link--target .wc-block-components-quantity-selector__button:hover {
  background: var(--surface) !important;
}

#wp--skip-link--target .wc-block-components-quantity-selector__button:disabled {
  opacity: 0.45 !important;
}

/* Add to cart — the ONE accent-filled primary CTA on this page */
#wp--skip-link--target .single_add_to_cart_button {
  background: var(--accent) !important;
  color: var(--fg) !important;
  border: none !important;
  border-radius: 999px !important;
  font-family: var(--font-body);
  font-weight: 550;
  padding: 14px 32px !important;
  min-height: 44px;
  transition: background-color 0.15s ease;
}

#wp--skip-link--target .single_add_to_cart_button:hover {
  background: var(--accent-hover) !important;
}

#wp--skip-link--target .single_add_to_cart_button:active {
  background: var(--accent-active) !important;
}

#wp--skip-link--target .single_add_to_cart_button:disabled {
  opacity: 0.45 !important;
}

/* Variation dropdown — unstyled by WC, was inheriting native :focus outline
   stacked on top of our :focus-visible ring. Style it like other form
   controls and let :focus-visible (section 8) own the focus ring alone. */
#wp--skip-link--target .wp-block-add-to-cart-form form.cart .variations select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  box-sizing: border-box;
}

/* SKU / category meta — tertiary, muted */
#wp--skip-link--target .wc-block-components-product-sku,
#wp--skip-link--target .taxonomy-product_cat {
  color: var(--muted) !important;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

#wp--skip-link--target .wc-block-components-product-sku .sku,
#wp--skip-link--target .taxonomy-product_cat a {
  color: var(--muted);
}

#wp--skip-link--target .taxonomy-product_cat a:hover {
  color: var(--fg);
}

/* ==========================================================================
   6. TABS — horizontal scroll on mobile instead of line-break
   Fix hierarchy inversion: tab labels were louder (19.5px/700) than the
   H2 "Description" (29.5px/500) below them. Shrink + lighten tabs, and
   the underline/active state uses --fg, never --accent (nav, not CTA).
   ========================================================================== */
#wp--skip-link--target ul.tabs.wc-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  margin: 0 0 24px 0;
  list-style: none;
}

#wp--skip-link--target ul.tabs.wc-tabs::-webkit-scrollbar {
  display: none;
}

#wp--skip-link--target ul.tabs.wc-tabs>li {
  flex: 0 0 auto;
  white-space: nowrap;
  margin: 0;
  border-width: 0;
}

#wp--skip-link--target ul.tabs.wc-tabs>li>a {
  display: inline-block;
  padding: 10px 4px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  outline: none;
}

#wp--skip-link--target ul.tabs.wc-tabs>li.active>a,
#wp--skip-link--target ul.tabs.wc-tabs>li>a[aria-selected="true"] {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

#wp--skip-link--target ul.tabs.wc-tabs>li>a:hover {
  color: var(--fg);
  border-bottom-color: var(--accent-hover);
}

#wp--skip-link--target ul.tabs.wc-tabs>li>a:focus-visible {
  border-bottom-color: var(--accent-active);
}

/* ==========================================================================
   7. DETAILS PANEL — description / reviews / form
   ========================================================================== */
#wp--skip-link--target .woocommerce-Tabs-panel h2 {
  font-family: var(--font-display);
  color: var(--fg);
  font-size: 28px;
  font-weight: 590;
  letter-spacing: -0.01em;
}

#wp--skip-link--target .woocommerce-Tabs-panel p,
#wp--skip-link--target .woocommerce-Tabs-panel--description {
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

#wp--skip-link--target .woocommerce-noreviews {
  color: var(--muted);
}

/* Star rating — cumulative fill via reversed DOM + row-reverse (see plan).
   Markup order is now 5,4,3,2,1; row-reverse restores visual 1..5. A
   checked/hovered star fills itself AND every sibling after it in the DOM
   (= every star visually before it), producing a true cumulative rating.
   #f2b200 is a one-off literal for this control only — not --accent, not
   added to the base token set (grayscale rule stays for every other star
   use, per explicit user override for this control). */
#wp--skip-link--target .comment-form-rating .stars__group {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

#wp--skip-link--target .comment-form-rating .stars {
  color: var(--border);
}

#wp--skip-link--target .comment-form-rating .stars:has(a.active) {
  color: #f2b200;
}

#wp--skip-link--target .comment-form-rating .stars a {
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}

#wp--skip-link--target .comment-form-rating .stars a::before {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}


#wp--skip-link--target .comment-form-rating .stars a:hover~a,
#wp--skip-link--target .comment-form-rating .stars a.active~a {
  color: var(--border)
}

/* Rating label / required marker */
#wp--skip-link--target #comment-form-rating-label,
#wp--skip-link--target label[for="comment"] {
  display: inline-block;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 550;
  margin-bottom: 8px;
}

#wp--skip-link--target .required {
  color: var(--muted);
  text-decoration: none;
}



#wp--skip-link--target #commentform input,
#wp--skip-link--target #commentform button,
#wp--skip-link--target #commentform textarea,
#wp--skip-link--target #commentform select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  box-sizing: border-box;
}

#wp--skip-link--target #commentform input:focus,
#wp--skip-link--target #commentform button:focus,
#wp--skip-link--target #commentform textarea:focus,
#wp--skip-link--target #commentform select:focus {
  border: none;
  outline: 1px solid var(--accent-active);
}

#wp--skip-link--target #commentform input[type=text],
#wp--skip-link--target #commentform input[type=email],
#wp--skip-link--target #commentform textarea,
#wp--skip-link--target #commentform select {
  width: 100%;
  max-width: 512px;
  display: block;
}

#wp--skip-link--target #commentform textarea::placeholder {
  color: var(--muted);
  font-style: normal;
}

/* Field-to-field rhythm */
#wp--skip-link--target #commentform>p {
  margin: 0 0 20px 0;
}

#wp--skip-link--target #commentform .form-submit {
  margin-top: 16px;
}

/* Submit (review) — secondary/ghost, NOT accent (add-to-cart owns the budget) */
#wp--skip-link--target #commentform input[type="submit"] {
  background: var(--bg) !important;
  color: var(--fg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  font-family: var(--font-body);
  font-weight: 550;
  padding: 12px 28px !important;
  min-height: 44px;
}

#wp--skip-link--target #commentform input[type="submit"]:hover {
  background: var(--surface) !important;
  border-color: var(--muted) !important;
}

/* ==========================================================================
   8. FOCUS / STATES
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-color: var(--accent-active);
}


/* ==========================================================================
   9. RELATED PRODUCTS
   ========================================================================== */
#wp--skip-link--target .related-products h2 {
  font-family: var(--font-display);
  color: var(--fg);
  font-size: 28px;
  font-weight: 590;
  letter-spacing: -0.01em;
}
