/* MARK: Single product page */

/* MARK: Page foundations */

.shop-product-page {
  overflow: hidden;
  background: var(--calabash-white);
  color: var(--calabash-navy);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.65;
}

.shop-product-page *,
.shop-product-page *::before,
.shop-product-page *::after {
  box-sizing: border-box;
}

.shop-product-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

.shop-product-page a {
  text-decoration: none;
}

.shop-product-page .site-container {
  width: min(
    calc(100% - (var(--calabash-page-padding) * 2)),
    var(--calabash-page-max-width)
  );
  margin-inline: auto;
}

/* MARK: Shared elements */

.product-v2-text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--calabash-navy);
  font-weight: 800;
  transition: color var(--calabash-transition), gap var(--calabash-transition);
}

.product-v2-text-link:hover,
.product-v2-text-link:focus-visible {
  gap: 14px;
  color: var(--calabash-company-orange-a11y);
}

.product-v2-text-link span {
  font-size: 1.15em;
  line-height: 1;
}

.shop-product-page .calabash-ora-solid-button {
  min-height: 52px;
}

.shop-product-page .calabash-ora-solid-button.disabled {
  background: var(--calabash-border);
  box-shadow: none;
  color: var(--calabash-muted);
  cursor: not-allowed;
  transform: none;
}

.product-v2-icon-slot {
  display: block;
  flex-shrink: 0;
  border: 1.5px dashed var(--calabash-border);
  border-radius: 50%;
  background: var(--calabash-off-white);
}

.product-v2-icon {
  flex-shrink: 0;
  object-fit: contain;
}

.product-v2-empty {
  margin: 0;
  color: var(--calabash-muted);
  font-size: 0.92rem;
  font-style: italic;
}

/* MARK: Product overview */

.product-v2-header {
  padding: 36px 0;
  background: var(--calabash-white);
}

.product-v2-header__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
}

.woocommerce-product-gallery {
  border-radius: 12px;
  background: var(--calabash-white);
}

.woocommerce-product-gallery__wrapper {
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-product-gallery__trigger span {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  font-size: 0;
}

.woocommerce-product-gallery__trigger span::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--calabash-muted);
  -webkit-mask: url("../images/icons/search.svg") center / contain no-repeat;
  mask: url("../images/icons/search.svg") center / contain no-repeat;
}

.woocommerce-product-gallery__image,
.woocommerce-product-gallery__image--placeholder {
  padding: 20px;
}

.woocommerce-product-gallery__image img,
.woocommerce-product-gallery__image--placeholder img {
  width: 100%;
  height: 380px;
  object-fit: contain;
}

.woocommerce-product-gallery .flex-viewport {
  height: 420px !important;
  overflow: hidden;
}

.flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0 20px 20px;
  list-style: none;
}

.flex-control-thumbs li {
  width: 68px;
  height: 68px;
}

.flex-control-thumbs img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 2px solid var(--calabash-border);
  border-radius: 8px;
  object-fit: contain;
  padding: 6px;
  cursor: pointer;
  transition: border-color var(--calabash-transition);
}

.flex-control-thumbs img:hover,
.flex-control-thumbs img.flex-active {
  border-color: var(--calabash-company-turquoise);
}

.product-v2-summary h1 {
  margin: 0 0 12px;
  color: var(--calabash-navy);
  font-size: clamp(1.7rem, 2.6vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.shop-product-page .summary .price {
  display: block;
  margin: 0 0 16px;
  color: var(--calabash-company-orange-a11y);
  font-size: 1.4rem;
  font-weight: 800;
}

.shop-product-page .summary .price .woocommerce-price-suffix {
  color: var(--calabash-muted);
  font-size: 0.98rem;
  font-weight: 400;
}

.shop-product-page .summary .price del {
  margin-right: 10px;
  color: var(--calabash-muted);
  font-size: 0.85em;
  font-weight: 600;
  opacity: 0.8;
}

.shop-product-page .summary .price ins {
  color: var(--calabash-company-orange-a11y);
  text-decoration: none;
}

.shop-product-page .woocommerce-product-details__short-description {
  margin: 0 0 20px;
  color: var(--calabash-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.shop-product-page .summary .stock {
  display: inline-block;
  margin: 0 0 20px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.shop-product-page .summary .stock.in-stock {
  background: rgb(0 120 95 / 12%);
  color: var(--calabash-green-dark);
}

.shop-product-page .summary .stock.out-of-stock {
  background: var(--calabash-light-grey);
  color: var(--calabash-muted);
}

.shop-product-page .summary .stock.available-on-backorder {
  background: var(--calabash-orange-18);
  color: var(--calabash-company-orange-a11y);
}

/* MARK: Add-to-cart form (WooCommerce's stock add-to-cart/simple.php etc.) */
.shop-product-page form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
}

.shop-product-page .quantity {
  display: inline-flex;
  align-items: stretch;
  min-height: 52px;
  border: 1px solid var(--calabash-border);
  border-radius: 6px;
  overflow: hidden;
}

.shop-product-page .quantity .qty {
  width: 56px;
  border: none;
  border-inline: 1px solid var(--calabash-border);
  background: var(--calabash-white);
  color: var(--calabash-navy);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.shop-product-page .quantity .qty::-webkit-inner-spin-button,
.shop-product-page .quantity .qty::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.shop-product-page .calabash-qty-step {
  width: 42px;
  border: none;
  background: var(--calabash-company-turquoise);
  color: var(--calabash-navy);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: filter var(--calabash-transition);
}

.shop-product-page .calabash-qty-step:hover,
.shop-product-page .calabash-qty-step:focus-visible {
  filter: brightness(0.92);
}

.product-v2-meta,
.shop-product-page .product_meta {
  margin: 0 0 20px;
  color: var(--calabash-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.shop-product-page .product_meta > span {
  display: block;
}

.shop-product-page .product_meta a {
  color: var(--calabash-company-orange-a11y);
}

.product-v2-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.product-v2-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--calabash-navy);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.product-v2-features__tick {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  background: rgb(0 120 95 / 12%);
  color: var(--calabash-green-dark);
  font-size: 0.72rem;
  line-height: 1;
}

.product-v2-summary__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* MARK: Variation selector (variable products, e.g. the urinal screens) */

.shop-product-page form.variations_form {
  display: block;
}

.shop-product-page table.variations {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
}

.shop-product-page table.variations tr,
.shop-product-page table.variations th,
.shop-product-page table.variations td {
  display: block;
  padding: 0;
  text-align: left;
}

.shop-product-page table.variations th.label {
  margin: 0 0 6px;
  color: var(--calabash-navy);
  font-size: 0.88rem;
  font-weight: 800;
}

.shop-product-page table.variations td.value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.shop-product-page table.variations select {
  width: 100%;
  max-width: 360px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--calabash-border);
  border-radius: 6px;
  background-color: var(--calabash-white);
  color: var(--calabash-navy);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
}

.shop-product-page table.variations select:focus-visible {
  outline: 2px solid var(--calabash-company-turquoise);
  outline-offset: 2px;
}

.shop-product-page .reset_variations {
  color: var(--calabash-company-orange-a11y);
  font-size: 0.82rem;
  font-weight: 700;
}

.shop-product-page .single_variation_wrap {
  display: block;
}

.shop-product-page .woocommerce-variation {
  margin: 0 0 14px;
}

.shop-product-page .woocommerce-variation-description p {
  margin: 0 0 8px;
  color: var(--calabash-muted);
  font-size: 0.92rem;
}

.shop-product-page .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.shop-product-page:has(.single_add_to_cart_button.wc-variation-selection-needed) .sku_wrapper {
  display: none;
}

/* MARK: Variation picture picker */

.shop-product-page table.variations select.calabash-picker-native {
  position: absolute;
  width: 1px;
  min-height: 0;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.calabash-picker {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.calabash-picker__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--calabash-border);
  border-radius: 10px;
  background: var(--calabash-white);
  color: var(--calabash-navy);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--calabash-transition), box-shadow var(--calabash-transition);
}

.calabash-picker__trigger:hover,
.calabash-picker.is-open .calabash-picker__trigger {
  border-color: var(--calabash-company-turquoise);
}

.calabash-picker.is-open .calabash-picker__trigger {
  box-shadow: 0 0 0 3px var(--calabash-turquoise-12);
}

.calabash-picker__trigger:focus-visible {
  outline: 2px solid var(--calabash-company-turquoise);
  outline-offset: 2px;
}

.calabash-picker:not(.has-value) .calabash-picker__text {
  color: var(--calabash-muted);
  font-weight: 600;
}

.calabash-picker__current {
  display: flex;
  flex: 0 0 auto;
}

.calabash-picker__text {
  flex: 1 1 auto;
  min-width: 0;
}

.calabash-picker__thumb {
  display: block;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--calabash-turquoise-12);
  border-radius: 8px;
  background: var(--calabash-white);
}

.calabash-picker__thumb.is-empty {
  border: 1.5px dashed var(--calabash-border);
  border-radius: 50%;
  background: var(--calabash-off-white);
}

.calabash-picker__thumb--large {
  width: 56px;
  height: 56px;
}

.calabash-picker__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.calabash-picker__chevron {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin: 0 4px 3px 0;
  border-right: 2px solid var(--calabash-navy);
  border-bottom: 2px solid var(--calabash-navy);
  transform: rotate(45deg);
  transition: transform var(--calabash-transition);
}

.calabash-picker.is-open .calabash-picker__chevron {
  margin-bottom: -3px;
  transform: rotate(-135deg);
}

.calabash-picker__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 100%;
  max-height: min(480px, 70vh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--calabash-border);
  border-radius: 12px;
  background: var(--calabash-white);
  box-shadow: var(--calabash-shadow-hover);
  list-style: none;
}

.calabash-picker__list[hidden] {
  display: none;
}

.calabash-picker__list:focus {
  outline: none;
}

.calabash-picker__option {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.calabash-picker__option.is-active {
  background: var(--calabash-off-white);
  box-shadow: inset 0 0 0 2px var(--calabash-turquoise-12);
}

.calabash-picker__option[aria-selected="true"] {
  background: var(--calabash-green-light);
}

.calabash-picker__option[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

.calabash-picker__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.calabash-picker__name {
  color: var(--calabash-navy);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
}

.calabash-picker__detail {
  color: var(--calabash-muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.calabash-picker__tick {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--calabash-green-dark);
  color: var(--calabash-white);
  font-size: 0.72rem;
  line-height: 1;
  visibility: hidden;
}

.calabash-picker__option[aria-selected="true"] .calabash-picker__tick {
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .calabash-picker__trigger,
  .calabash-picker__chevron {
    transition: none;
  }
}

/* MARK: Product details / tabs */

.product-v2-details {
  padding: 0 0 40px;
  background: var(--calabash-white);
}

.product-v2-details__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.3fr);
  align-items: start;
  gap: 32px;
}

.product-v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.5vw, 32px);
  margin-bottom: 26px;
  border-bottom: 1px solid var(--calabash-border);
}

.product-v2-tab {
  padding: 0 0 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--calabash-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--calabash-transition), border-color var(--calabash-transition);
}

.product-v2-tab:hover {
  color: var(--calabash-navy);
}

.product-v2-tab.is-active {
  border-bottom-color: var(--calabash-company-orange-a11y);
  color: var(--calabash-company-orange-a11y);
}

.product-v2-panel__content {
  margin-bottom: 28px;
  color: var(--calabash-navy);
  font-size: 0.96rem;
  line-height: 1.7;
}

.product-v2-panel__content p {
  margin: 0 0 16px;
}

.product-v2-panel > h2 {
  margin: 0 0 16px;
  color: var(--calabash-navy);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
}

.product-v2-specs-table,
.woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce-product-attributes tr {
  border-bottom: 1px solid var(--calabash-border);
}

.woocommerce-product-attributes tr:first-child {
  border-top: 1px solid var(--calabash-border);
}

.product-v2-specs-table tr {
  border-bottom: 1px solid var(--calabash-turquoise-12);
}

.product-v2-specs-table tr:first-child {
  border-top: 1px solid var(--calabash-turquoise-12);
}

.product-v2-specs-table th,
.product-v2-specs-table td,
.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
  padding: 13px 4px;
  text-align: left;
  font-size: 0.88rem;
}

.product-v2-specs-table th,
.woocommerce-product-attributes th {
  width: 40%;
  color: var(--calabash-muted);
  font-weight: 700;
}

.product-v2-specs-table td,
.woocommerce-product-attributes td,
.woocommerce-product-attributes td p {
  margin: 0;
  color: var(--calabash-navy);
  font-weight: 600;
}

/* MARK: Reviews tab (WordPress's default comment list + review form) */
.shop-product-page #reviews .commentlist {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.shop-product-page #reviews .comment {
  padding: 18px 0;
  border-bottom: 1px solid var(--calabash-border);
}

.shop-product-page #reviews .star-rating {
  color: var(--calabash-company-orange-a11y);
}

.shop-product-page #reviews #respond input,
.shop-product-page #reviews #respond textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid var(--calabash-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.92rem;
}

.shop-product-page #reviews #respond .form-submit input {
  width: auto;
  border: none;
  background: var(--calabash-company-orange-a11y);
  color: var(--calabash-white);
  font-weight: 800;
  cursor: pointer;
}

.product-v2-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.product-v2-highlight .product-v2-icon-slot,
.product-v2-highlight .product-v2-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.product-v2-highlight h3 {
  margin: 0 0 5px;
  color: var(--calabash-navy);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
}

.product-v2-highlight p {
  margin: 0;
  color: var(--calabash-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.product-v2-aside {
  position: sticky;
  top: 110px;
}

.product-v2-recommend {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 24px;
  border: 1px solid var(--calabash-turquoise-12);
  border-radius: 14px;
  background: var(--calabash-green-light);
  box-shadow: var(--calabash-shadow);
}

.product-v2-recommend::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--calabash-company-orange), var(--calabash-company-turquoise));
}

.product-v2-recommend .product-v2-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--calabash-white);
  box-shadow: var(--calabash-shadow);
  box-sizing: border-box;
}

.product-v2-recommend .product-v2-icon::before {
  content: "";
  width: 26px;
  height: 26px;
  background-color: var(--calabash-company-orange-a11y);
  -webkit-mask: url("../images/icons/heart-handshake.svg") center / contain no-repeat;
  mask: url("../images/icons/heart-handshake.svg") center / contain no-repeat;
}

.product-v2-recommend h3 {
  margin: 0 0 6px;
  color: var(--calabash-navy);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
}

.product-v2-recommend p {
  margin: 0 0 16px;
  color: var(--calabash-text);
  font-size: 0.88rem;
  line-height: 1.55;
}

.product-v2-recommend .product-v2-text-link {
  color: var(--calabash-company-orange-a11y);
}

/* MARK: Related products */

.product-v2-related {
  padding: 0 0 40px;
  background: var(--calabash-white);
}

.product-v2-related h2 {
  margin: 0 0 20px;
  color: var(--calabash-navy);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 800;
}

.product-v2-related ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-v2-compatible-products ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 260px));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* MARK: Tablet layout */

@media (max-width: 1280px) {
  .product-v2-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-v2-related ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .product-v2-header__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-v2-details__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-v2-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .product-v2-tabs {
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
  }

  .product-v2-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .product-v2-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 590px) {
  .shop-product-page {
    font-size: 15px;
  }

  .product-v2-related ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-v2-related ul.products .product-retail-card p {
    display: none;
  }

  .product-v2-compatible-products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-v2-compatible-products ul.products .product-retail-card p {
    display: none;
  }
}
