/**
 * Skalriket Product Page CP01 + CP02 — buy-zone + description/tabs polish
 * Scope: .page-product only
 */

.page-product {
  --sk-pdp-green: #00a651;
  --sk-pdp-green-dark: #008f45;
  --sk-pdp-green-soft: #f4fbf7;
  --sk-pdp-focus: #00a651;
  --sk-pdp-border: #e3e8e5;
  --sk-pdp-surface: #f8faf9;
  --sk-pdp-text: #333333;
  --sk-pdp-muted: #6b7280;
  --sk-pdp-control-h: 52px;
  --sk-pdp-side-col: 64px;
  --sk-pdp-gap: 8px;
  --sk-pdp-radius: 8px;
}

.page-product .sk-pdp-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Price hierarchy */
.page-product .product-prices .current-price,
.page-product .product-prices .current-price .product-price {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--sk-pdp-text);
}

.page-product .product-prices .product-reference {
  margin-top: 0.15rem;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--sk-pdp-muted);
}

.page-product .product-prices .product-reference .label,
.page-product .product-prices .product-reference span {
  font-weight: 400;
}

.page-product .product-prices .tax-shipping-delivery-label {
  font-size: 0.78rem;
  color: var(--sk-pdp-muted);
  margin-top: 0.15rem;
}

/* Manufacturer + title mobile stack */
@media (max-width: 575.98px) {
  .page-product .product_header_container .product-manufacturer-next {
    float: none !important;
    display: block;
    margin: 0 0 0.5rem 0;
    text-align: left;
  }

  .page-product .product_header_container .product-manufacturer-next .manufacturer-logo {
    max-height: 28px;
    width: auto;
  }
}

/* Buy-zone vertical rhythm */
.page-product .product-information > .product-description,
.page-product [id^="product-description-short-"] {
  margin-bottom: 0.65rem;
}

.page-product .sk-product-fomo-trust {
  margin: 0.5rem 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--sk-pdp-border);
  border-radius: var(--sk-pdp-radius);
  background: var(--sk-pdp-surface);
}

.page-product .sk-product-fomo-trust__item + .sk-product-fomo-trust__item {
  margin-top: 0.35rem;
}

.page-product .sk-buy3-promo-card--pdp {
  margin: 0.65rem 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--sk-pdp-border);
  border-radius: var(--sk-pdp-radius);
  background: #fff;
}

.page-product .sk-buy3-promo-card__title {
  margin-bottom: 0.25rem;
}

.page-product .sk-buy3-promo-card__meta {
  margin-bottom: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.page-product .sk-rewards-pdp-card {
  border-radius: var(--sk-pdp-radius);
  border-color: var(--sk-pdp-border);
}

.page-product .product-add-to-cart {
  padding-top: 0.65rem !important;
}

.page-product .product-additional-info {
  margin-top: 0.65rem;
}

.page-product .iqitproducttags {
  margin-top: 0.35rem;
}

.page-product .iqitproducttags .tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: var(--sk-pdp-muted);
}

/* Purchase row — symmetric qty | ATC | wishlist */
.page-product .sk-pdp-purchase-row {
  display: grid;
  grid-template-columns: var(--sk-pdp-side-col) minmax(0, 1fr) var(--sk-pdp-side-col);
  align-items: stretch;
  gap: var(--sk-pdp-gap);
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
}

.page-product .sk-pdp-purchase-row > .col,
.page-product .sk-pdp-purchase-row > .sk-pdp-wishlist-col {
  width: auto;
  max-width: none;
  min-width: 0;
  margin-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}

.page-product .sk-pdp-purchase-row .col-add-qty {
  grid-column: 1;
  width: var(--sk-pdp-side-col);
  min-width: var(--sk-pdp-side-col);
  max-width: var(--sk-pdp-side-col);
}

.page-product .sk-pdp-purchase-row .sk-pdp-atc-col {
  grid-column: 2;
  min-width: 0;
}

.page-product .sk-pdp-purchase-row .sk-pdp-wishlist-col {
  grid-column: 3;
  width: var(--sk-pdp-side-col);
  min-width: var(--sk-pdp-side-col);
  max-width: var(--sk-pdp-side-col);
}

.page-product .sk-pdp-qty,
.page-product .sk-pdp-qty .bootstrap-touchspin,
.page-product .sk-pdp-qty .input-group {
  width: 100%;
  max-width: 100%;
  height: var(--sk-pdp-control-h);
  min-height: var(--sk-pdp-control-h);
  max-height: var(--sk-pdp-control-h);
  box-sizing: border-box;
}

.page-product .sk-pdp-qty .bootstrap-touchspin {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap !important;
  align-items: stretch;
  overflow: visible;
  border: 1px solid var(--sk-pdp-border);
  border-radius: var(--sk-pdp-radius);
  background: #fff;
}

.page-product .sk-pdp-qty .bootstrap-touchspin .input-group-btn-vertical {
  order: 2;
  flex: 0 0 20px;
  width: 20px !important;
  min-width: 20px;
  height: 100% !important;
  max-height: var(--sk-pdp-control-h);
  margin-left: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  float: none !important;
}

.page-product .sk-pdp-qty .bootstrap-touchspin .input-group-btn-vertical .btn-touchspin {
  flex: 1 1 50%;
  width: 100%;
  min-height: 0;
  height: 50% !important;
  margin-left: 0 !important;
  padding: 0;
  line-height: 1;
  border-radius: 0;
  border-top: none;
  border-bottom: none;
  border-right: none;
  box-sizing: border-box;
}

.page-product .sk-pdp-qty .bootstrap-touchspin .input-group-btn-vertical .bootstrap-touchspin-up {
  border-top-right-radius: calc(var(--sk-pdp-radius) - 1px);
}

.page-product .sk-pdp-qty .bootstrap-touchspin .input-group-btn-vertical .bootstrap-touchspin-down {
  border-bottom-right-radius: calc(var(--sk-pdp-radius) - 1px);
}

.page-product .sk-pdp-qty .bootstrap-touchspin .input-group-btn-vertical i {
  position: static;
  left: auto;
  top: auto;
  font-size: 9px;
  line-height: 1;
}

.page-product .sk-pdp-qty #quantity_wanted {
  order: 1;
  flex: 1 1 auto;
  min-width: 1.1rem;
  width: auto;
  max-width: none;
  height: var(--sk-pdp-control-h) !important;
  min-height: var(--sk-pdp-control-h);
  max-height: var(--sk-pdp-control-h);
  margin-left: 0 !important;
  padding: 0 0.15rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  border: none !important;
  border-right: 1px solid var(--sk-pdp-border) !important;
  border-radius: calc(var(--sk-pdp-radius) - 1px) 0 0 calc(var(--sk-pdp-radius) - 1px);
  box-sizing: border-box;
  background: transparent;
  -moz-appearance: textfield;
}

.page-product .sk-pdp-qty #quantity_wanted::-webkit-outer-spin-button,
.page-product .sk-pdp-qty #quantity_wanted::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-product .sk-pdp-atc-col .add {
  width: 100%;
  height: 100%;
}

.page-product .sk-pdp-atc-btn,
.page-product .sk-pdp-wishlist-btn {
  width: 100%;
  min-height: var(--sk-pdp-control-h);
  height: var(--sk-pdp-control-h);
  padding: 0 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--sk-pdp-radius);
}

.page-product .sk-pdp-atc-btn {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  gap: 0.35rem;
}

.page-product .sk-pdp-atc-btn .bag-icon {
  flex: 0 0 auto;
}

.page-product .sk-pdp-atc-label {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.page-product .sk-pdp-wishlist-btn {
  padding: 0;
  border: 1px solid var(--sk-pdp-border);
  background: #fff;
  color: var(--sk-pdp-text);
}

.page-product .sk-pdp-wishlist-btn .fa {
  font-size: 1.15rem;
  line-height: 1;
}

.page-product .sk-pdp-wishlist-btn.iqitwishlist-added,
.page-product .sk-pdp-wishlist-btn.added {
  border-color: var(--sk-pdp-green);
  background: var(--sk-pdp-green-soft);
  color: var(--sk-pdp-green-dark);
}

.page-product .product-add-to-cart .add-to-cart,
.page-product .product-add-to-cart .btn-iconic {
  width: 100%;
}

.page-product .product-quantity .qty {
  width: 100%;
}

/* Very narrow fallback: qty + wishlist row, full-width ATC */
@media (max-width: 319.98px) {
  .page-product .sk-pdp-purchase-row.sk-pdp-purchase-row--narrow-fallback {
    grid-template-columns: minmax(0, 1fr) var(--sk-pdp-side-col);
    grid-template-rows: auto auto;
  }

  .page-product .sk-pdp-purchase-row.sk-pdp-purchase-row--narrow-fallback .col-add-qty {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    max-width: none;
  }

  .page-product .sk-pdp-purchase-row.sk-pdp-purchase-row--narrow-fallback .sk-pdp-wishlist-col {
    grid-column: 2;
    grid-row: 1;
  }

  .page-product .sk-pdp-purchase-row.sk-pdp-purchase-row--narrow-fallback .sk-pdp-atc-col {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0.15rem;
  }
}

/* Focus */
.page-product .sk-pdp-atc-btn:focus-visible,
.page-product .sk-pdp-wishlist-btn:focus-visible,
.page-product .sk-pdp-qty .btn-touchspin:focus-visible,
.page-product .sk-pdp-qty #quantity_wanted:focus-visible {
  outline: 2px solid var(--sk-pdp-focus);
  outline-offset: 2px;
}

/* ============================================================
   CP02 — Description, tabs, swatches, sticky/consent, accessories
   Presentation only; CP01 purchase row untouched.
   ============================================================ */

/* A. Short description clamp (mobile) */
.page-product .sk-pdp-desc-wrap {
  margin-bottom: 0.65rem;
}

.page-product .sk-pdp-desc-short.sk-pdp-desc-short--clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-bottom: 0;
}

.page-product .sk-pdp-read-more {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sk-pdp-green-dark);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.page-product .sk-pdp-read-more:focus-visible {
  outline: 2px solid var(--sk-pdp-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (min-width: 768px) {
  .page-product .sk-pdp-desc-short.sk-pdp-desc-short--clamp {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .page-product .sk-pdp-read-more {
    display: none;
  }
}

/* C. Produktinformation jump link (mobile) */
.page-product .sk-pdp-product-info-jump {
  display: inline-flex;
  align-items: center;
  margin: 0.5rem 0 0.65rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: var(--sk-pdp-radius);
  background: var(--sk-pdp-green-soft);
  color: var(--sk-pdp-green-dark);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.page-product .sk-pdp-product-info-jump:focus-visible {
  outline: 2px solid var(--sk-pdp-focus);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .page-product .sk-pdp-product-info-jump {
    display: none;
  }
}

/* C. Accordion headers — align with category facet tokens */
.page-product .iqit-accordion .card .title a,
.page-product #product-infos-accordion-mobile .nav-tabs a.nav-link {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 143, 69, 0.14);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--sk-pdp-text);
  text-decoration: none;
}

.page-product .iqit-accordion .card .title a:not(.collapsed),
.page-product #product-infos-accordion-mobile .nav-tabs a.nav-link:not(.collapsed) {
  color: var(--sk-pdp-green-dark);
}

.page-product .iqit-accordion .card .content {
  padding-top: 0.5rem;
}

/* B. Product details / data sheet */
.page-product .product-features .data-sheet {
  margin: 0;
}

.page-product .product-features .data-sheet .name,
.page-product .product-features .data-sheet .value {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--sk-pdp-border);
  font-size: 0.875rem;
  line-height: 1.4;
}

.page-product .product-features .data-sheet .name {
  font-weight: 600;
  color: var(--sk-pdp-text);
}

.page-product .product-features .data-sheet .value {
  color: var(--sk-pdp-muted);
  margin-bottom: 0;
}

.page-product .specific-references .specific-reference-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--sk-pdp-border);
  font-size: 0.875rem;
  line-height: 1.4;
}

.page-product .specific-references .specific-reference-row .label {
  font-weight: 600;
  margin: 0;
  color: var(--sk-pdp-text);
}

/* D. Combination swatches — touch target + selected ring */
.page-product .product-variants .input-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0.2rem 0.35rem 0;
}

.page-product .product-variants .input-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.page-product .product-variants .input-color + span.color,
.page-product .product-variants .input-color + span.texture {
  display: block;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--sk-pdp-border);
  border-radius: 4px;
  box-sizing: border-box;
  pointer-events: none;
}

.page-product .product-variants .input-color:checked + span.color,
.page-product .product-variants .input-color:checked + span.texture {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--sk-pdp-green);
  border-color: var(--sk-pdp-green);
}

.page-product .product-variants .input-radio {
  min-width: 44px;
  min-height: 44px;
}

.page-product .product-variants .input-radio:checked + .radio-label {
  box-shadow: 0 0 0 2px var(--sk-pdp-green-soft), 0 0 0 3px var(--sk-pdp-green);
  border-radius: 4px;
}

/* E. Sticky ATC + consent layering (defensive; sticky pilot may be absent) */
.page-product .sk-mobile-sticky-atc,
.page-product [data-sk-sticky-atc] {
  z-index: 1035;
}

.page-product .sk-mobile-sticky-atc__inner,
.page-product [data-sk-sticky-atc] .sk-mobile-sticky-atc__inner {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 767.98px) {
  .page-product:has(.sk-mobile-sticky-atc, [data-sk-sticky-atc]) #sk-consent-settings-fab {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0));
  }
}

/* F. Accessories section rhythm */
.page-product .product-accessories.block-section,
.page-product .product-accessories-sidebar-mobile.block-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sk-pdp-border);
}

.page-product .product-accessories .section-title,
.page-product .product-accessories-sidebar-mobile .section-title {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--sk-pdp-text);
}

.page-product .product-accessories-sidebar .block-title {
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(0, 143, 69, 0.14);
  font-size: 0.95rem;
  font-weight: 600;
}
