/* Nana V9 PDP · purchase-decision layer
 * Keeps approved Pebble gallery/summary geometry; improves only variation,
 * fit and stock decision visibility. Native Woo controls remain canonical.
 */
.single-product .nana-product-page__variation.nana-pdp-v9__variation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 18px;
}

.single-product .nana-product-page__variation.nana-pdp-v9__variation > label {
  grid-column: 1;
  margin: 0;
  color: #111;
  font-family: var(--nana-font-display, "Bricolage Grotesque", sans-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.single-product .nana-pdp-v9__variation-tools {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
}

.single-product .nana-pdp-v9__fit-proxy {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: #111;
  font: 700 12px/1 var(--nana-font-display, "Bricolage Grotesque", sans-serif);
  cursor: pointer;
}

.single-product .nana-pdp-v9__fit-proxy span {
  transition: transform 180ms ease;
}

.single-product .nana-pdp-v9__fit-proxy:hover span,
.single-product .nana-pdp-v9__fit-proxy:focus-visible span {
  transform: translateX(3px);
}

.single-product .nana-pdp-v9__choices {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.single-product .nana-pdp-v9__choice {
  position: relative;
  display: inline-flex;
  min-width: 54px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid rgba(17, 17, 17, 0.17);
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: 650 13px/1.1 var(--nana-font-display, "Bricolage Grotesque", sans-serif);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.single-product .nana-pdp-v9__choice:hover:not(:disabled),
.single-product .nana-pdp-v9__choice:focus-visible:not(:disabled) {
  border-color: #111;
  transform: translateY(-1px);
}

.single-product .nana-pdp-v9__choice.is-selected,
.single-product .nana-pdp-v9__choice[aria-pressed="true"] {
  border-color: #050505;
  background: #050505;
  color: #fff;
}

.single-product .nana-pdp-v9__choice:disabled,
.single-product .nana-pdp-v9__choice[aria-disabled="true"] {
  border-color: rgba(17, 17, 17, 0.08);
  background: #f4f4f2;
  color: rgba(17, 17, 17, 0.38);
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Canonical Woo select remains in the form as the mutation owner and no-JS
 * fallback, but once the button UI is successfully built it leaves the visual
 * interaction path. */
.single-product .nana-pdp-v9__variation-ready .nana-pdp-v9__native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.single-product .nana-pdp-v9__stock {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  margin: 4px 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(17, 17, 17, 0.09);
  border-radius: 999px;
  background: #f6f6f3;
  color: #4e514b;
  font: 600 12px/1.35 var(--nana-font-display, "Bricolage Grotesque", sans-serif);
}

.single-product .nana-pdp-v9__stock::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #777a73;
  content: "";
}

.single-product .nana-pdp-v9__stock[data-state="in-stock"] {
  border-color: rgba(43, 92, 57, 0.13);
  background: #f1f6f0;
  color: #255535;
}

.single-product .nana-pdp-v9__stock[data-state="in-stock"]::before {
  background: #3c7b4b;
}

.single-product .nana-pdp-v9__stock[data-state="low"] {
  border-color: rgba(135, 79, 28, 0.14);
  background: #fbf5ea;
  color: #7a491f;
}

.single-product .nana-pdp-v9__stock[data-state="low"]::before {
  background: #b77935;
}

.single-product .nana-pdp-v9__stock[data-state="out"] {
  border-color: rgba(126, 40, 40, 0.13);
  background: #faf0f0;
  color: #7a2929;
}

.single-product .nana-pdp-v9__stock[data-state="out"]::before {
  background: #a84b4b;
}

.single-product .nana-pdp-v9-ready .nana-product-page__stock-low,
.single-product .nana-pdp-v9-ready .woocommerce-variation-availability {
  display: none;
}

.single-product .nana-pdp-v9__choice:focus-visible,
.single-product .nana-pdp-v9__fit-proxy:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

/* The canonical Product Page runtime owns the sticky mobile purchase action.
 * V9 only restores its Pebble presentation so mobile does not fall back to
 * the retired cream/coral surface from product-page.css. */
@media (max-width: 767px) {
  .single-product .nana-product-page__mobile-purchase {
    border-top: 1px solid rgba(17, 17, 17, 0.12);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 34px rgba(17, 17, 17, 0.08);
    backdrop-filter: blur(14px);
    color: #111;
    font-family: var(--nana-font-display, "Bricolage Grotesque", sans-serif);
  }

  .single-product .nana-product-page__mobile-purchase span {
    color: #626262;
  }

  .single-product .nana-product-page__mobile-purchase strong,
  .single-product .nana-product-page__mobile-purchase strong * {
    color: #111;
  }

  .single-product .nana-product-page__mobile-purchase button {
    min-height: 48px;
    border: 1px solid #050505;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
  }

  .single-product .nana-product-page__mobile-purchase button:hover,
  .single-product .nana-product-page__mobile-purchase button:focus-visible {
    border-color: #252525;
    background: #252525;
    color: #fff;
  }
}

@media (max-width: 720px) {
  .single-product .nana-product-page__variation.nana-pdp-v9__variation {
    gap: 9px 10px;
    margin-bottom: 16px;
  }

  .single-product .nana-pdp-v9__choices {
    gap: 7px;
  }

  .single-product .nana-pdp-v9__choice {
    min-width: 50px;
    min-height: 42px;
    padding: 8px 13px;
    font-size: 12px;
  }

  .single-product .nana-pdp-v9__fit-proxy {
    min-height: 32px;
    font-size: 11px;
  }

  .single-product .nana-pdp-v9__stock {
    max-width: 100%;
    margin-bottom: 15px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .single-product .nana-pdp-v9__choice,
  .single-product .nana-pdp-v9__fit-proxy span {
    transition: none;
  }
}
