/* Product page: variation swatches, buy box, trust list. */

/* Title and price */
body.ath.single-product .product_title {
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem);
  line-height: 1.25;
  margin-bottom: 10px;
}
body.ath.single-product .entry-summary .price {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ath-ink);
}
body.ath.single-product .entry-summary .price del {
  color: var(--ath-muted);
  font-weight: 400;
  font-size: 1.05rem;
}
body.ath.single-product .entry-summary .price ins {
  text-decoration: none;
}
body.ath.single-product .ath-price-included {
  display: block;
  margin-top: 2px;
  font-size: var(--ath-text-xs);
  font-weight: 400;
  color: var(--ath-muted);
}
body.ath.single-product .woocommerce-product-details__short-description {
  color: var(--ath-muted);
}

/* Variation rows */
body.ath table.variations {
  width: 100%;
  margin: 18px 0 8px;
  border: 0;
  border-collapse: collapse;
}
body.ath table.variations tbody,
body.ath table.variations tr,
body.ath table.variations th,
body.ath table.variations td {
  display: block;
  padding: 0;
  border: 0;
  background: none;
}
body.ath table.variations tr {
  margin-bottom: 18px;
}
body.ath table.variations tr[hidden] {
  display: none;
}
body.ath table.variations th.label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
body.ath table.variations th.label label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ath-ink);
}
.ath-var-chosen {
  font-size: var(--ath-text-sm);
  color: var(--ath-muted);
}
body.ath .reset_variations {
  display: none !important;
}

/* The real select stays in the DOM for WooCommerce, but is not shown. */
.ath-sw-select {
  position: absolute !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Swatches */
.ath-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ath-sw {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 46px;
  min-width: 56px;
  padding: 8px 14px;
  border: 1px solid var(--ath-line);
  border-radius: 4px;
  background: var(--ath-white);
  color: var(--ath-ink);
  font-family: var(--ath-font-ui);
  font-size: var(--ath-text-sm);
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color var(--ath-dur-fast) var(--ath-ease), box-shadow var(--ath-dur-fast) var(--ath-ease), background-color var(--ath-dur-fast) var(--ath-ease);
}
.ath-sw:hover {
  border-color: var(--ath-ink);
  background: var(--ath-white);
  color: var(--ath-ink);
}
.ath-sw[aria-checked="true"] {
  border-color: var(--ath-olive);
  box-shadow: inset 0 0 0 1px var(--ath-olive);
  background: #f3f6ee;
}
.ath-swatches[data-attr="size"] .ath-sw-text {
  white-space: nowrap;
}
.ath-sw-sub {
  font-size: var(--ath-text-xs);
  font-weight: 400;
  color: var(--ath-muted);
}
.ath-sw[aria-checked="true"] .ath-sw-sub {
  color: var(--ath-olive-dark);
}

/* The selected variation's price already shows in the summary; hide WooCommerce's second copy */
body.ath.single-product .woocommerce-variation-price,
body.ath.single-product .woocommerce-variation-description {
  display: none;
}

.ath-sw[hidden] {
  display: none;
}
.ath-sw-more {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px dashed var(--ath-line);
  border-radius: 4px;
  background: transparent;
  color: var(--ath-ink);
  font-family: var(--ath-font-ui);
  font-size: var(--ath-text-sm);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.ath-sw-more:hover {
  border-color: var(--ath-ink);
  background: var(--ath-white);
  color: var(--ath-ink);
}

/* Format: three equal cards */
.ath-swatches[data-attr="format"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ath-sw--card {
  padding: 12px 8px;
  min-height: 62px;
}

/* Size: chips in an even grid */
.ath-swatches[data-attr="size"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

/* Frame colour: dot + name */
.ath-sw--color {
  flex-direction: row;
  gap: 10px;
  padding-inline: 14px 16px;
}
.ath-sw-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  flex: none;
}

/* Buy row */
body.ath.single-product form.cart .single_add_to_cart_button {
  min-height: 54px;
  flex: 1 1 auto;
}
body.ath.single-product form.cart .ct-cart-actions {
  flex: 1 1 100%;
  width: 100%;
}
body.ath.single-product .woocommerce-variation-price {
  margin-bottom: 8px;
}

/* Related products: a section title like the home page, not a small caption */
body.ath.single-product .related > .ct-module-title,
body.ath.single-product .up-sells > .ct-module-title {
  margin: 0 0 clamp(18px, 3vw, 30px);
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  line-height: 1.1;
  text-align: left;
}
body.ath.single-product .woocommerce-variation-add-to-cart {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

/* Trust list under the buy button: ticks, no icons */
.ath-pdp-promises {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--ath-stone);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.ath-pdp-promises li {
  position: relative;
  margin: 0;
  padding-left: 22px;
}
.ath-pdp-promises li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--ath-olive-dark);
  border-bottom: 2px solid var(--ath-olive-dark);
  transform: rotate(40deg);
}
.ath-pdp-promises strong {
  display: block;
  font-size: var(--ath-text-sm);
  line-height: 1.3;
  color: var(--ath-ink);
}
.ath-pdp-promises span {
  display: block;
  margin-top: 2px;
  font-size: var(--ath-text-xs);
  line-height: 1.4;
  color: var(--ath-muted);
}
@media (max-width: 599px) {
  .ath-pdp-promises span {
    display: none;
  }
}

/* Meta clutter */
body.ath.single-product .product_meta .sku_wrapper {
  display: none;
}

/* Blocksy appends its own "View cart" link after an AJAX add; the confirmation card replaces it */
body.ath form.cart .added_to_cart {
  display: none;
}

/*
 * Delivery and total panel from the arttohang-pictava plugin (destination select + live quote).
 * The plugin also injects CSS through the old theme's "ath-store" style handle (hide the standard price, tidy the
 * panel); that handle does not exist in this theme on purpose: the price stays visible at the top of the summary,
 * and the panel rules it needs are below.
 */
body.ath.single-product .entry-summary {
  display: flex;
  flex-direction: column;
}
body.ath.single-product .entry-summary > * {
  max-width: 100%;
}
/* Order: title, price, short text, options + buy button + trust list, then delivery panel, then meta */
body.ath.single-product .entry-summary > .ath-delivery-summary {
  order: 1;
}
body.ath.single-product .entry-summary > .ct-product-divider:last-of-type {
  order: 2;
}
body.ath.single-product .entry-summary > .product_meta {
  order: 3;
}
.ath-delivery-summary {
  margin: 20px 0 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--ath-stone);
  border-radius: 4px;
  background: var(--ath-white);
}
body.ath .ath-delivery-summary h3 {
  margin: 0 0 10px;
  font-family: var(--ath-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ath-ink);
}
.ath-country-label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: var(--ath-text-sm);
}
.ath-country {
  width: 100%;
  min-height: 44px;
}
.ath-country-status {
  display: block;
  min-height: 0;
  font-size: var(--ath-text-xs);
  color: var(--ath-muted);
}
.ath-delivery-summary > small {
  display: none;
}
.ath-quote-output {
  margin-top: 12px;
  font-size: var(--ath-text-sm);
  color: var(--ath-charcoal);
}
.ath-quote-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.ath-quote-row strong {
  font-size: 1.05rem;
  color: var(--ath-ink);
}
.ath-quote-output small {
  display: block;
  margin-top: 6px;
  font-size: var(--ath-text-xs);
  line-height: 1.45;
  color: var(--ath-muted);
}

/* Crossed-out amount in the delivery panel's total (see base.css: no crossed-out prices) */
body.ath .ath-quote-original {
  display: none;
}

/* Description tab: story first, materials in an accordion */
.ath-story {
  max-width: 68ch;
  margin-inline: auto;
}
.ath-story p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ath-charcoal);
}
.ath-specs {
  max-width: 68ch;
  margin: 2.2em auto 0;
  padding-top: 1.6em;
  border-top: 1px solid var(--ath-stone);
}
body.ath .ath-specs h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}
.ath-specs-intro {
  margin: 0 0 14px;
  color: var(--ath-muted);
}
.ath-spec {
  border-bottom: 1px solid var(--ath-stone);
}
.ath-spec summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.ath-spec summary::-webkit-details-marker {
  display: none;
}
.ath-spec summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ath-muted);
}
.ath-spec[open] summary::after {
  content: "–";
}
.ath-spec > p {
  margin: 0 0 12px;
  color: var(--ath-charcoal);
}
.ath-spec dl {
  margin: 0 0 18px;
  display: grid;
  gap: 8px;
}
.ath-spec dl div {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 12px;
  font-size: var(--ath-text-sm);
}
.ath-spec dt {
  font-weight: 600;
  color: var(--ath-ink);
}
.ath-spec dd {
  margin: 0;
  color: var(--ath-charcoal);
}
@media (max-width: 599px) {
  .ath-spec dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.ath-closing-line {
  max-width: 68ch;
  margin: 1.8em auto 0;
  color: var(--ath-muted);
  font-style: italic;
}
.ath-tab-facts {
  max-width: 68ch;
  margin: 0 auto 14px;
  padding-left: 1.2em;
}
.ath-tab-facts li {
  margin-bottom: 0.7em;
  line-height: 1.6;
}
.ath-tab-links {
  max-width: 68ch;
  margin: 0 auto;
  font-size: var(--ath-text-sm);
}

/* Phones: one-line breadcrumb (parent crumbs scroll sideways), product title is already the page heading */
@media (max-width: 689px) {
  body.ath.single-product .ct-breadcrumbs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  body.ath.single-product .ct-breadcrumbs::-webkit-scrollbar {
    display: none;
  }
  body.ath.single-product .ct-breadcrumbs > span {
    flex: none;
  }
  body.ath.single-product .ct-breadcrumbs > .last-item {
    display: none;
  }
}

/* Keep the layout still while the quote loads */
.ath-quote-output {
  min-height: 4.6rem;
}

@media (max-width: 689px) {
  body.ath.single-product .hero-section {
    margin-bottom: 6px;
    padding-top: 4px;
    padding-bottom: 0;
  }
  body.ath.single-product [data-vertical-spacing*="top"] {
    padding-top: 0;
  }
}

/* Gallery: the first picture is the artwork itself (portrait or landscape): show it whole on white. */
body.ath.single-product .ct-product-gallery-container .ct-media-container {
  background: #fff;
}
body.ath.single-product .ct-product-gallery-container .ct-media-container img {
  object-fit: contain;
}

/* The first picture is the artwork: a print resting on a warm panel, whole, with a soft shadow */
body.ath.single-product .ct-product-gallery-container .flexy-items > .flexy-item:first-child .ct-media-container {
  background: var(--theme-palette-color-6);
}
body.ath.single-product .ct-product-gallery-container .flexy-items > .flexy-item:first-child .ct-media-container img:not(.zoomImg) {
  box-sizing: border-box;
  padding: 7%;
  filter: drop-shadow(0 6px 16px rgba(36, 36, 36, 0.28));
}
body.ath.single-product .ct-product-gallery-container .flexy-pills li:first-child .ct-media-container {
  background: var(--theme-palette-color-6);
}

/* Accepted cards under the trust list */
.ath-pdp-pay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 16px 0 0;
  font-size: var(--ath-text-xs);
  color: var(--ath-muted);
}
.ath-pay-marks {
  display: inline-flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ath-pay-marks li {
  margin: 0;
  line-height: 0;
}

/* Policy links under the shipping tab: spaced, not joined by dots */
.ath-tab-links a {
  display: inline-block;
  margin: 0 22px 6px 0;
}

/* Who sells it */
.ath-pdp-seller {
  margin: 14px 0 0;
  font-size: var(--ath-text-xs);
  line-height: 1.5;
  color: var(--ath-muted);
}
.ath-pdp-seller a {
  color: var(--ath-ink);
}

/* Size guide link under the option rows */
.ath-size-help {
  margin: 10px 0 0;
  font-size: var(--ath-text-sm);
}
.ath-size-help a {
  display: inline-block;
  padding: 8px 0;
  color: var(--ath-ink);
  text-underline-offset: 0.25em;
}
.ath-size-help a {
  text-decoration: underline;
}
