/**
 * Native single product UI (no UX Blocks)
 * Goals:
 * - narrower media column
 * - wider buy box
 * - calmer typography
 * - left-column flat details
 */

.gcw-ssp,
.gcw-pdp {
  --gcw-ssp-sticky-top: 88px;
  --gcw-ssp-gap: 28px;
  --gcw-ssp-buy-w: 540px;
  --gcw-ssp-shell-radius: 22px;
  --gcw-ssp-shell-border: #e6eaee;
  --gcw-ssp-shell-bg: #ffffff;
  --gcw-ssp-page-max: 1160px;
  --gcw-ssp-text: #1f2937;
  --gcw-ssp-muted: #6b7280;
  --gcw-ssp-brand: #0f766e;
  --gcw-ssp-divider: #edf1f3;
}

body.single-product .gcw-ssp,
body.single-product .gcw-ssp .container,
body.single-product .gcw-ssp .gcw-ssp-grid,
body.single-product .gcw-pdp,
body.single-product .gcw-pdp .container,
body.single-product .gcw-pdp .gcw-pdp-grid {
  overflow: visible !important;
}

body.single-product .gcw-ssp .container {
  max-width: var(--gcw-ssp-page-max);
}

.gcw-ssp .gcw-ssp-header {
  margin-bottom: 14px;
}

body.single-product .gcw-ssp-header .gcw-product-title.product_title.entry-title,
body.single-product .gcw-ssp-header .product_title.entry-title,
body.single-product .gcw-product-title,
body.single-product .product_title.entry-title {
  margin: 8px 0 0;
  max-width: 880px;
  font-size: clamp(24px, 2.6vw, 34px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.025em;
  font-weight: 700 !important;
  color: #1f2937 !important;
  word-break: break-word;
}

.gcw-ssp .gcw-ssp-grid,
.gcw-pdp .gcw-pdp-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gcw-ssp .gcw-ssp-left,
.gcw-ssp .gcw-ssp-media,
.gcw-ssp .gcw-ssp-buy,
.gcw-ssp .gcw-ssp-detail {
  min-width: 0;
}

.gcw-ssp .gcw-ssp-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gcw-ssp .gcw-ssp-media-shell {
  max-width: 580px;
  background: var(--gcw-ssp-shell-bg);
  border: 1px solid var(--gcw-ssp-shell-border);
  border-radius: var(--gcw-ssp-shell-radius);
  padding: 14px;
}

.gcw-ssp .gcw-ssp-buy {
  position: relative;
}

.gcw-ssp .gcw-ssp-buybox,
.gcw-pdp .gcw-pdp-buybox {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--gcw-ssp-shell-bg);
  border: 1px solid var(--gcw-ssp-shell-border);
  border-radius: var(--gcw-ssp-shell-radius);
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.gcw-ssp .gcw-ssp-buybox *,
.gcw-pdp .gcw-pdp-buybox * {
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 850px) {
  .gcw-ssp .gcw-ssp-grid,
  .gcw-pdp .gcw-pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--gcw-ssp-buy-w);
    gap: var(--gcw-ssp-gap);
    align-items: start;
  }

  .gcw-ssp .gcw-ssp-media {
    min-width: 0;
  }

  .gcw-ssp .gcw-ssp-buy,
  .gcw-pdp .gcw-pdp-right {
    position: relative;
    min-width: 0;
  }

  .gcw-ssp .gcw-ssp-buybox.gcw-ssp-is-fixed,
  .gcw-pdp .gcw-pdp-buybox.gcw-ssp-is-fixed {
    position: fixed !important;
    z-index: 999;
    top: var(--gcw-ssp-sticky-top);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
  }

  .gcw-ssp .gcw-ssp-buybox.gcw-ssp-is-absolute,
  .gcw-pdp .gcw-pdp-buybox.gcw-ssp-is-absolute {
    position: absolute !important;
    left: 0 !important;
    width: 100% !important;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 849px) {
  body.single-product .gcw-ssp-header .gcw-product-title.product_title.entry-title,
  body.single-product .gcw-ssp-header .product_title.entry-title,
  body.single-product .gcw-product-title,
  body.single-product .product_title.entry-title {
    font-size: clamp(24px, 8vw, 30px) !important;
    line-height: 1.14 !important;
  }

  .gcw-ssp .gcw-ssp-media-shell,
  .gcw-ssp .gcw-ssp-buybox {
    padding: 14px;
    border-radius: 18px;
  }
}

/* Buybox */
.gcw-buybox-shell {
  color: var(--gcw-ssp-text);
}

.gcw-buybox-qty-breaks__subTitle {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 14px;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #111827;
}

.gcw-buybox-qty-breaks__dash {
  color: #475569;
}

.gcw-buybox-qty-breaks {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fafaf9;
}

.gcw-buybox-qty-breaks__title {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: #374151;
}

.gcw-buybox-qty-breaks__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gcw-buybox-qty-breaks__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  transition: border-color .18s ease, background-color .18s ease;
}

.gcw-buybox-qty-breaks__row.is-active {
  border-color: rgba(15, 118, 110, 0.28);
  background: #edf8f6;
  box-shadow: none;
}

.gcw-buybox-qty-breaks__left,
.gcw-buybox-qty-breaks__right {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.gcw-buybox-qty-breaks__qty,
.gcw-buybox-qty-breaks__price {
  font-weight: 700;
}

.gcw-buybox-qty-breaks__unit {
  font-size: 14px;
  color: var(--gcw-ssp-muted);
}

.gcw-buybox-qty-breaks__tip {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #4b5563;
}

.gcw-buybox-total {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--gcw-ssp-divider);
}

.gcw-buybox-total__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0;
}

.gcw-buybox-total__row--sub {
  color: var(--gcw-ssp-muted);
  font-size: 14px;
}

.gcw-buybox-total__amount,
.gcw-buybox-total__unit {
  font-weight: 700;
  color: #1f2937;
}

.gcw-moq-progress {
  margin: 12px 0 0;
}

.gcw-moq-progress__bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  overflow: hidden;
}

.gcw-moq-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #0f766e !important;
  transition: width 0.25s ease;
}

.gcw-moq-progress__mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(15, 118, 110, 0.65);
}

.gcw-moq-progress__text {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.45;
  color: #4b5563;
}

.gcw-buybox-cart {
  margin-top: 12px;
}

.gcw-buybox-cart form.cart {
  margin: 0;
}

.gcw-buybox-cart .stock {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.gcw-buybox-cart .variations {
  width: 100%;
  table-layout: fixed;
  margin-bottom: 14px;
}

.gcw-buybox-cart .variations th.label {
  width: 96px;
  padding-right: 12px;
  white-space: nowrap;
  vertical-align: middle;
}

.gcw-buybox-cart .variations td.value select {
  width: 100%;
}

.gcw-buybox-cart .quantity {
  margin: 0 10px 0 0 !important;
}

.gcw-buybox-cart .quantity input.qty {
  width: 54px;
  max-width: 54px;
  min-width: 54px;
  height: 44px;
  padding: 0;
  text-align: center;
}

.gcw-buybox-cart .quantity .plus,
.gcw-buybox-cart .quantity .minus,
.gcw-buybox-cart .quantity button,
.gcw-buybox-cart .quantity input[type="button"] {
  width: 40px;
  min-width: 40px;
  height: 44px;
  padding: 0;
}

.gcw-buybox-cart .single_add_to_cart_button,
.gcw-buybox-cart button.single_add_to_cart_button {
  min-height: 44px;
  border-radius: 14px;
  box-shadow: none;
  font-weight: 700;
}

/* Flat detail */
.gcw-spp-flat {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid var(--gcw-ssp-shell-border);
  border-radius: 22px;
  padding: 24px;
}

.gcw-spp-flat__section + .gcw-spp-flat__section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gcw-ssp-divider);
}

.gcw-spp-flat__title {
  margin: 0 0 12px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #1f2937;
}

.gcw-spp-flat__body {
  color: #374151;
  font-size: 16px;
  line-height: 1.8;
}

.gcw-spp-flat__body > :first-child { margin-top: 0; }
.gcw-spp-flat__body > :last-child { margin-bottom: 0; }

.gcw-spp-flat__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.gcw-spp-flat__table th,
.gcw-spp-flat__table td {
  padding: 12px 8px;
  border-bottom: 1px solid #f1f4f6;
  vertical-align: top;
}

.gcw-spp-flat__table th {
  width: 220px;
  text-align: left;
  font-weight: 700;
  color: #111827;
}

.gcw-spp-flat__body ul,
.gcw-spp-flat__body ol {
  padding-left: 20px;
  margin-left: 0;
}

.gcw-spp-flat__body li + li {
  margin-top: 6px;
}

.gcw-packaging__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.gcw-packaging__item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 12px;
}

.gcw-packaging__item figcaption { order: 1; margin: 0; }
.gcw-packaging__step-title { margin: 0 0 6px; font-size: 14px; line-height: 1.25; font-weight: 800; }
.gcw-packaging__step-desc { margin: 0; font-size: 14px; line-height: 1.45; color: #4b5563; }

.gcw-packaging__item img {
  order: 2;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

@media (max-width: 849px) {
  .gcw-buybox-qty-breaks__subTitle {
    font-size: clamp(22px, 8vw, 30px);
    margin-bottom: 12px;
  }

  .gcw-buybox-qty-breaks {
    padding: 14px;
    border-radius: 16px;
  }

  .gcw-buybox-qty-breaks__row {
    padding: 13px 14px;
    border-radius: 16px;
  }

  .gcw-spp-flat {
    padding: 18px;
    border-radius: 18px;
  }

  .gcw-spp-flat__section + .gcw-spp-flat__section {
    margin-top: 20px;
    padding-top: 20px;
  }

  .gcw-spp-flat__table th {
    width: 42%;
  }

  .gcw-packaging__grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   GCW SPP 2026-05 | Browse more + mobile product page optimization
   Scope: single product native SPP only
===================================================================== */

body.single-product .gcw-ssp .gcw-ssp-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "media"
    "buy"
    "detail";
  gap: 14px;
  align-items: start;
}

body.single-product .gcw-ssp .gcw-ssp-media { grid-area: media; }
body.single-product .gcw-ssp .gcw-ssp-buy {
  grid-area: buy;
  scroll-margin-top: calc(var(--gcw-ssp-sticky-top) + 12px);
}
body.single-product .gcw-ssp .gcw-ssp-detail { grid-area: detail; }

body.single-product .gcw-spp-flat__title {
  margin: 0 0 12px;
}

body.single-product .gcw-spp-flat__toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: none;
  cursor: default;
}

body.single-product .gcw-spp-browse-more {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 22px;
  background: #f3fbf9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

body.single-product .gcw-spp-browse-more__title {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #1f2937;
}

body.single-product .gcw-spp-browse-more__text {
  margin: 6px 0 0;
  color: #5b6572;
  font-size: 15px;
  line-height: 1.55;
}

body.single-product .gcw-spp-browse-more__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body.single-product .gcw-spp-browse-more__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #0f766e;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

body.single-product .gcw-spp-browse-more__chip:hover {
  background: #edf8f6;
  border-color: rgba(15, 118, 110, 0.34);
  color: #0f766e;
  transform: translateY(-1px);
}

body.single-product .gcw-buybox-trustline {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

body.single-product .gcw-ssp-mobile-cartbar {
  display: none;
}

@media (min-width: 850px) {
  body.single-product .gcw-ssp .gcw-ssp-grid,
  body.single-product .gcw-pdp .gcw-pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--gcw-ssp-buy-w);
    grid-template-areas:
      "media buy"
      "detail buy";
    gap: var(--gcw-ssp-gap);
    align-items: start;
  }

  body.single-product .gcw-ssp .gcw-ssp-media-shell {
    max-width: 580px;
  }

  body.single-product .gcw-ssp .gcw-ssp-buy,
  body.single-product .gcw-pdp .gcw-pdp-right {
    align-self: stretch;
    min-width: 0;
  }

  body.single-product .gcw-ssp .gcw-ssp-detail {
    min-width: 0;
  }
}

@media (max-width: 849px) {
  body.single-product {
    padding-bottom: 74px;
  }

  body.single-product .gcw-ssp .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.single-product .gcw-ssp .gcw-ssp-header {
    margin-bottom: 10px;
  }

  body.single-product .gcw-ssp-header .gcw-product-title.product_title.entry-title,
  body.single-product .gcw-ssp-header .product_title.entry-title,
  body.single-product .gcw-product-title,
  body.single-product .product_title.entry-title {
    font-size: clamp(22px, 6.4vw, 28px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.025em;
  }

  body.single-product .gcw-ssp .gcw-ssp-media-shell,
  body.single-product .gcw-ssp .gcw-ssp-buybox,
  body.single-product .gcw-spp-flat {
    border-radius: 20px;
    padding: 14px;
  }

  body.single-product .gcw-ssp .gcw-ssp-media-shell {
    max-width: none;
  }

  body.single-product .gcw-spp-flat {
    margin-top: 0;
  }

  body.single-product .gcw-buybox-qty-breaks__subTitle {
    font-size: clamp(24px, 7.2vw, 30px) !important;
    margin-bottom: 12px !important;
  }

  body.single-product .gcw-buybox-qty-breaks {
    padding: 12px;
    border-radius: 18px;
  }

  body.single-product .gcw-buybox-qty-breaks__rows {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.single-product .gcw-buybox-qty-breaks__row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 70px;
    padding: 10px 7px;
    border-radius: 16px;
    text-align: center;
  }

  body.single-product .gcw-buybox-qty-breaks__left,
  body.single-product .gcw-buybox-qty-breaks__right {
    justify-content: center;
  }

  body.single-product .gcw-buybox-qty-breaks__qty,
  body.single-product .gcw-buybox-qty-breaks__price {
    font-size: 13px;
    line-height: 1.2;
  }

  body.single-product .gcw-buybox-qty-breaks__unit {
    display: none;
  }

  body.single-product .gcw-buybox-cart .variations,
  body.single-product .gcw-buybox-cart .variations tbody,
  body.single-product .gcw-buybox-cart .variations tr,
  body.single-product .gcw-buybox-cart .variations th,
  body.single-product .gcw-buybox-cart .variations td {
    display: block;
    width: 100% !important;
  }

  body.single-product .gcw-buybox-cart .variations th.label {
    padding: 0 0 6px;
    white-space: normal;
  }

  body.single-product .gcw-buybox-cart .variations td.value {
    padding: 0 0 12px;
  }

  body.single-product .gcw-buybox-cart .variations td.value select {
    min-height: 44px;
    border-radius: 12px;
  }

  body.single-product .gcw-buybox-cart form.cart:not(.variations_form),
  body.single-product .gcw-buybox-cart .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: stretch;
    gap: 10px;
  }

  body.single-product .gcw-buybox-cart .quantity {
    flex: 0 0 auto;
    margin-right: 0 !important;
  }

  body.single-product .gcw-buybox-cart .single_add_to_cart_button,
  body.single-product .gcw-buybox-cart button.single_add_to_cart_button {
    flex: 1 1 auto;
    width: auto;
    min-height: 48px;
    border-radius: 16px;
  }

  body.single-product .gcw-spp-flat__section + .gcw-spp-flat__section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  body.single-product .gcw-spp-flat__section {
    border: 1px solid var(--gcw-ssp-divider);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
  }

  body.single-product .gcw-spp-flat__section + .gcw-spp-flat__section,
  body.single-product .gcw-spp-browse-more {
    margin-top: 12px;
  }

  body.single-product .gcw-spp-flat__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
  }

  body.single-product .gcw-spp-flat__toggle {
    cursor: pointer;
    padding: 15px 14px;
  }

  body.single-product .gcw-spp-flat__toggle::after {
    content: "▾";
    color: #94a3b8;
    font-size: 14px;
    transform: rotate(0deg);
    transition: transform .16s ease;
  }

  body.single-product .gcw-spp-flat__section.is-open .gcw-spp-flat__toggle::after {
    transform: rotate(180deg);
  }

  body.single-product .gcw-spp-flat__body {
    display: none;
    padding: 0 14px 16px;
    font-size: 15px;
    line-height: 1.72;
  }

  body.single-product .gcw-spp-flat__section.is-open .gcw-spp-flat__body {
    display: block;
  }

  body.single-product .gcw-spp-flat__table th,
  body.single-product .gcw-spp-flat__table td {
    padding: 10px 4px;
    font-size: 14px;
  }

  body.single-product .gcw-spp-browse-more {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
  }

  body.single-product .gcw-spp-browse-more__title {
    font-size: 17px;
  }

  body.single-product .gcw-spp-browse-more__text {
    font-size: 14px;
  }

  body.single-product .gcw-spp-browse-more__links {
    justify-content: flex-start;
    gap: 8px;
  }

  body.single-product .gcw-spp-browse-more__chip {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
  }

  body.single-product .gcw-ssp-mobile-cartbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: block;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(10px);
  }

  body.single-product .gcw-ssp-mobile-cartbar__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    background: #0f766e;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    text-decoration: none;
    box-shadow: none;
  }

  body.single-product .gcw-ssp-mobile-cartbar__button:hover,
  body.single-product .gcw-ssp-mobile-cartbar__button:focus {
    color: #fff;
    background: #0b6861;
  }
}
