/**
 * Single product page (Figma 249:2340).
 *
 * @package Atsko
 */

.product-page {
  background: var(--atsko-white);
}

.product-page .woocommerce-message,
.product-page .woocommerce-info,
.product-page .woocommerce-error {
  margin: 1rem max(2rem, calc((100% - var(--atsko-container)) / 2));
}

/* —— Hero —— */
.product-hero {
  padding: 4.5rem 0;
}

.product-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 33rem) minmax(0, 1fr);
  gap: 3rem 4rem;
  align-items: start;
}

.product-hero__gallery {
  position: relative;
}

.product-hero__gallery .woocommerce-product-gallery {
  width: 100% !important;
  float: none !important;
  margin: 0;
}

.product-hero__gallery .woocommerce-product-gallery__wrapper {
  margin: 0;
}

.product-hero__gallery .woocommerce-product-gallery__image {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
}

.product-hero__gallery .woocommerce-product-gallery__image a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28rem;
  aspect-ratio: 527 / 560;
}

.product-hero__gallery .woocommerce-product-gallery__image img {
  width: auto !important;
  height: auto !important;
  max-width: 85%;
  max-height: 32rem;
  margin: 0 auto;
  object-fit: contain;
}

.product-hero__gallery .flex-control-thumbs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.product-hero__gallery .flex-control-thumbs li {
  flex: 0 0 6.65rem;
  width: 6.65rem;
  margin: 0 !important;
}

.product-hero__gallery .flex-control-thumbs img {
  width: 100%;
  height: 6.65rem;
  object-fit: contain;
  border: 1px solid var(--atsko-gray-400);
  border-radius: 4px;
  background: var(--atsko-white);
  opacity: 1;
  cursor: pointer;
}

.product-hero__gallery .flex-control-thumbs .flex-active {
  border-color: var(--atsko-charcoal);
  background: var(--atsko-gray-200);
}

.product-hero__gallery .woocommerce-product-gallery__trigger {
  display: none !important;
}

.product-hero__gallery .flex-direction-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-hero__gallery .flex-direction-nav a {
  width: 1.5rem;
  height: 1.5rem;
  text-indent: -9999px;
  opacity: 1;
}

.product-hero__gallery .flex-direction-nav .flex-prev {
  left: 0;
  background: url("../images/product/chevron-left.svg") center / contain
    no-repeat;
}

.product-hero__gallery .flex-direction-nav .flex-next {
  right: 0;
  background: url("../images/product/chevron-right.svg") center / contain
    no-repeat;
}

.product-hero__gallery .flex-direction-nav .flex-disabled {
  opacity: 0.3;
}

/* —— Summary —— */
.woocommerce div.product div.summary.product-summary {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
  max-width: 36rem;
  width: 100%;
  margin: 0 !important;
  float: none !important;
}

.product-summary__title {
  margin: 0 !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 700 !important;
  line-height: 0.9 !important;
  color: var(--atsko-charcoal) !important;
}

.product-summary .woocommerce-product-details__short-description {
  margin: 0;
}

.product-summary .woocommerce-product-details__short-description p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.product-summary__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

/* Beat WooCommerce core `.price { color: #958e09 }` */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce div.product .product-summary__price,
.product-summary__price {
  margin: 0 !important;
  font-size: 2.3125rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: var(--atsko-orange) !important;
}

.product-summary__price .amount,
.product-summary__price .woocommerce-Price-amount,
.product-summary__price bdi {
  color: inherit !important;
}

.product-summary__price del {
  display: none;
}

.product-summary__price ins {
  text-decoration: none;
  background: none;
  color: inherit !important;
}

.product-summary__reg {
  margin: 0;
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.product-summary__reg-amount {
  text-decoration: line-through;
}

.product-summary__stock {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem 0.1875rem;
  border-radius: 4px;
  background: var(--atsko-link-light);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  color: #000;
}

.product-summary__stock--out {
  background: var(--atsko-gray-200);
  color: var(--atsko-charcoal);
}

.product-summary__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.product-summary__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.product-summary__meta-item img {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.product-summary__sale-blurb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.8rem;
  margin: 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--atsko-gray-200);
}

.product-summary__sale-label {
  font-size: 1.6875rem;
  font-weight: 700;
  line-height: 1.5;
  color: #61b100;
}

.product-summary__sale-save {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.product-summary__sale-note {
  font-size: 0.875rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--atsko-gray-400);
}

.product-summary__notices {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-summary__notices li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.product-summary__notices img {
  width: 1rem;
  height: 1rem;
}

/* Variations as pill buttons */
.product-summary .variations {
  margin: 0;
  width: 100%;
}

.product-summary .variations tbody,
.product-summary .variations tr,
.product-summary .variations td,
.product-summary .variations th {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
}

.product-summary .variations th.label {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--atsko-charcoal);
  text-align: left;
}

.product-summary .variations th.label label,
.product-summary .product-variation-label strong {
  font-weight: 700;
}

.product-summary .product-variation-value {
  font-style: italic;
  font-weight: 400;
}

.product-summary .variations td.value {
  position: relative;
}

.product-summary .variations select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.product-summary .reset_variations {
  display: none !important;
}

.product-variation-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.product-variation-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  padding: 0.625rem 1.75rem;
  border: 1px solid var(--atsko-gray-400);
  border-radius: 4px;
  background: var(--atsko-gray-100);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--atsko-charcoal);
  cursor: pointer;
}

.product-variation-pill.is-selected {
  border-color: var(--atsko-cta-border);
  background: var(--atsko-white);
}

.product-variation-pill:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.product-summary__note {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.product-summary__note em {
  font-style: italic;
}

.product-summary form.cart {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-summary form.cart .woocommerce-variation-add-to-cart,
.product-summary .product-buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: stretch;
  width: 100%;
}

.product-summary form.cart .quantity {
  margin: 0;
  float: none;
}

.product-summary form.cart .quantity .qty {
  display: none;
}

.product-summary .product-qty-select {
  appearance: none;
  width: 7.5rem;
  min-height: 2.875rem;
  margin: 0;
  padding: 0.5rem 2.5rem 0.5rem 1.5rem;
  border: 1px solid var(--atsko-cta-border);
  border-radius: 4px;
  background: var(--atsko-white) url("../images/shop/chevron-down-blue.svg")
    right 0.75rem center / 1.25rem no-repeat;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--atsko-charcoal);
  cursor: pointer;
}

.product-summary .single_variation_wrap .woocommerce-variation {
  margin: 0;
}

.product-summary .woocommerce-variation-description,
.product-summary .woocommerce-variation-price,
.product-summary .woocommerce-variation-availability {
  display: none !important;
}

.product-summary__reg[hidden],
.product-summary__sale-blurb[hidden] {
  display: none !important;
}

.product-summary form.cart .single_add_to_cart_button {
  flex: 1 1 12rem;
  min-height: 2.875rem;
  margin: 0 !important;
  padding: 0.625rem 1.75rem !important;
  border: 1px solid var(--atsko-cta-border) !important;
  border-radius: 4px !important;
  background: linear-gradient(
    180deg,
    var(--atsko-cta-from) 0%,
    var(--atsko-cta-to) 100%
  ) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  color: var(--atsko-white) !important;
  text-transform: none !important;
}

.product-summary form.cart .single_add_to_cart_button:hover {
  background: linear-gradient(
    180deg,
    var(--atsko-cta-to) 0%,
    var(--atsko-cta-from) 100%
  ) !important;
}

.product-summary__returns {
  display: flex;
  align-items: center;
  gap: 1.375rem;
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--atsko-gray-200);
  border-radius: 16px;
  background: var(--atsko-gray-100);
  box-sizing: border-box;
}

.product-summary__returns-icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.product-summary__returns-copy {
  display: flex;
  flex-direction: column;
}

.product-summary__returns-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  color: #000;
}

.product-summary__returns-body {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #000;
}

/* —— Spotlights —— */
.product-spotlight {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  background: var(--atsko-white);
}

.product-spotlight--resources {
  background-color: #fff;
}

.product-spotlight--resources::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: url("../images/home/blue-angle.webp") no-repeat bottom right / 50%
    auto;
}

.product-spotlight__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0;
}

.product-spotlight__media,
.product-spotlight__copy {
  flex: 1 1 50%;
  min-width: 0;
}

.product-spotlight__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 6rem;
  box-sizing: border-box;
}

.product-spotlight__eyebrow {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--atsko-orange-bright);
}

.product-spotlight__title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 0.9;
  color: var(--atsko-charcoal);
}

.product-spotlight__body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--atsko-charcoal);
}

.product-spotlight__actions {
  margin: 0.5rem 0 0;
}

.product-spotlight__figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  aspect-ratio: 646 / 400;
  background: var(--atsko-gray-400);
}

.product-spotlight__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-spotlight__figure--video {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-spotlight__figure--video::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5rem;
  height: 3.5rem;
  background: url("../images/brand/play.svg") center / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

/* —— Related —— */
.product-related {
  padding: 4.5rem 0;
  background: var(--atsko-white);
}

.product-related__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--atsko-gray-200);
}

.product-related__eyebrow {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--atsko-orange-bright);
}

.product-related__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.product-related__all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
  text-decoration: none;
  white-space: nowrap;
}

.product-related__all:hover {
  color: var(--atsko-blue);
  text-decoration: underline;
}

.product-related__grid {
  margin-top: 2.5rem;
}

/* Hide leftover Woo defaults */
.product-single .product_meta,
.product-single .woocommerce-tabs,
.product-single .upsells {
  display: none !important;
}

@media (max-width: 1100px) {
  .product-hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .product-spotlight__copy {
    padding-left: 2rem;
  }
}

@media (max-width: 782px) {
  .product-hero {
    padding: 2rem 0;
  }

  .product-hero__inner,
  .product-spotlight__inner {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  .product-spotlight__copy {
    padding: 0;
  }

  .product-summary {
    max-width: none;
  }

  .product-related__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-hero__gallery .flex-control-thumbs {
    flex-wrap: wrap;
  }
}
