/*
 * Single product page (Phase 6).
 * WooCommerce's own stylesheets are not loaded on this view; every native
 * element kept on the page is styled here with the design-system tokens.
 */

/* display:flex / inline-flex elsewhere would otherwise override [hidden]. */
.thiek-product [hidden],
.thiek-buybar[hidden] {
  display: none !important;
}

.thiek-product-page .thiek-commerce {
  padding-block: var(--spacing-md) var(--spacing-2xl);
}

/* Breadcrumb ------------------------------------------------------------- */

.thiek-breadcrumb {
  margin-bottom: var(--spacing-md);
  font-size: var(--text-ui);
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

.thiek-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2xs) var(--spacing-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.thiek-breadcrumb li + li::before {
  content: "/";
  margin-right: var(--spacing-xs);
  color: var(--color-line);
}

.thiek-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.thiek-breadcrumb a:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thiek-breadcrumb li:last-child {
  color: var(--color-text);
}

/* Notices (added to cart, errors) ---------------------------------------- */

.thiek-product-page .woocommerce-notices-wrapper:not(:empty) {
  margin-bottom: var(--spacing-md);
}

.thiek-product-page .woocommerce-message,
.thiek-product-page .woocommerce-info,
.thiek-product-page .woocommerce-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xs) var(--spacing-md);
  margin: 0 0 var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-line);
  border-left: 2px solid var(--color-brand);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-small);
  list-style: none;
}

.thiek-product-page .woocommerce-message .button,
.thiek-product-page .woocommerce-info .button {
  order: 2;
  color: var(--color-accent-text);
  font-size: var(--text-ui);
  font-weight: 500;
  letter-spacing: var(--tracking-ui);
  text-transform: uppercase;
  text-decoration: none;
}

.thiek-product-page .woocommerce-message .button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thiek-stock-preview-notice {
  margin-bottom: var(--spacing-md);
}

/* Layout ----------------------------------------------------------------- */

.thiek-product-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--spacing-xl);
  align-items: start;
}

.thiek-product-media {
  min-width: 0;
}

.thiek-product-summary {
  position: sticky;
  top: calc(var(--header-height, 72px) + var(--spacing-md));
  display: flex;
  justify-content: center;
}

.thiek-product-summary-inner {
  width: 100%;
  max-width: 440px;
}

.thiek-product-summary-inner > * + * {
  margin-top: var(--spacing-sm);
}

/* Gallery ---------------------------------------------------------------- */

.thiek-gallery {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--spacing-xs);
  align-items: start;
  margin: 0;
}

.thiek-gallery.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.thiek-gallery-progress {
  display: none;
  position: sticky;
  top: calc(var(--header-height, 72px) + var(--spacing-md));
  width: 2px;
  height: min(40vh, 280px);
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-line);
  overflow: hidden;
  /* Never look like a crushed thumbnail rail. */
  flex: 0 0 2px;
  pointer-events: none;
}

.thiek-gallery-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-text);
  transform: scaleY(0.12);
  transform-origin: top center;
  transition: transform var(--duration-fast) var(--ease);
}

.thiek-gallery-stage {
  position: relative;
  min-width: 0;
  grid-column: 2;
  background: var(--color-surface);
}

.thiek-gallery.is-single .thiek-gallery-stage {
  grid-column: 1;
}

.thiek-gallery-track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.thiek-gallery-track::-webkit-scrollbar {
  display: none;
}

.thiek-gallery-track:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.thiek-gallery .woocommerce-product-gallery__image,
.thiek-gallery .woocommerce-product-gallery__image--placeholder {
  flex: 0 0 100%;
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--color-bg); /* #111 — never crop product into empty surface */
}

.thiek-gallery .woocommerce-product-gallery__image a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.thiek-gallery .woocommerce-product-gallery__image a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -4px;
}

.thiek-gallery .woocommerce-product-gallery__image img,
.thiek-gallery .woocommerce-product-gallery__image--placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 72%; /* overridden inline by product focus meta */
}

/*
 * Contain on surface when covering would crop a logo (opt-in meta).
 * Keeps the same frame ratio so the grid / rail stays coherent.
 */
.thiek-gallery .thiek-gallery-slide--natural {
  background: var(--color-surface);
}

.thiek-gallery .thiek-gallery-slide--natural img {
  object-fit: contain;
  object-position: 50% 50%;
}

.thiek-gallery-zoom {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  z-index: 2;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
}

.thiek-gallery-dots {
  display: flex;
  justify-content: center;
  gap: var(--spacing-2xs);
  grid-column: 1 / -1;
  margin: var(--spacing-sm) 0 0;
  padding: 0;
}

.thiek-gallery-dot {
  width: 8px;
  height: 8px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.thiek-gallery-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: var(--radius-full);
  background: var(--color-line);
}

.thiek-gallery-dot[aria-selected="true"]::after {
  background: var(--color-text);
}

.thiek-gallery-dot:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Zoom dialog. */
.thiek-modal.thiek-zoom {
  width: min(1200px, calc(100% - var(--spacing-md) * 2));
}

.thiek-zoom .thiek-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) var(--spacing-md);
  border-bottom: 1px solid var(--color-line);
}

.thiek-zoom-title {
  margin: 0;
  font-size: var(--text-lede);
}

.thiek-zoom-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.thiek-zoom-frame {
  max-height: calc(100dvh - 140px);
  overflow: auto;
  background: var(--color-surface);
}

.thiek-zoom-frame:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
}

.thiek-zoom-image {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  margin-inline: auto;
  cursor: zoom-in;
}

.thiek-zoom-frame.is-zoomed .thiek-zoom-image {
  width: 200%;
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* Summary ---------------------------------------------------------------- */

.thiek-product-stock {
  margin: 0;
}

.thiek-product-stock-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px var(--spacing-xs);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-ui);
  font-weight: 500;
  letter-spacing: var(--tracking-ui);
  text-transform: uppercase;
}

.thiek-product-stock.is-out-of-stock .thiek-product-stock-pill {
  color: var(--color-muted);
}

.thiek-product .product_title {
  margin: 0;
  font-size: var(--text-h2);
  line-height: var(--leading-heading);
}

.thiek-product-summary .price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--spacing-2xs);
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text);
}

.thiek-product-summary .price del {
  order: 2;
  color: var(--color-muted);
  font-weight: 400;
  text-decoration: line-through;
}

.thiek-product-summary .price ins {
  order: 1;
  text-decoration: none;
  color: var(--color-text);
}

.thiek-product-offer {
  margin: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 0;
  border-left: 2px solid var(--color-brand);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.thiek-product-offer-text {
  margin: 0;
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text);
}

.thiek-product .woocommerce-product-details__short-description {
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 15px;
  line-height: var(--leading-body);
}

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

.thiek-product .woocommerce-product-details__short-description p + p {
  margin-top: var(--spacing-xs);
}

/* Native WC stock line (qty already stripped elsewhere): keep subtle. */
.thiek-product .stock {
  display: none;
}

.thiek-product-reassurance {
  display: grid;
  gap: var(--spacing-xs);
  margin: var(--spacing-sm) 0 0;
  padding: var(--spacing-sm) 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
}

.thiek-product-reassurance-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xs);
  margin: 0;
  font-size: var(--text-small);
  color: var(--color-muted);
}

.thiek-product-reassurance-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--color-text);
}

.thiek-product-reassurance-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* Cart form -------------------------------------------------------------- */

.thiek-product form.cart {
  margin-top: var(--spacing-md);
}

.thiek-product form.cart:not(.variations_form),
.thiek-product .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.thiek-product .single_variation_wrap > * + * {
  margin-top: var(--spacing-sm);
}

.thiek-product .woocommerce-variation-price {
  display: none;
}

.thiek-product .woocommerce-variation-description:empty,
.thiek-product .woocommerce-variation-availability:empty {
  display: none;
}

/* Native variation table: visible without JavaScript, replaced with it. */
.thiek-product table.variations {
  width: 100%;
  margin: 0 0 var(--spacing-sm);
  border-collapse: collapse;
}

.thiek-product table.variations th,
.thiek-product table.variations td {
  display: block;
  padding: 0;
  text-align: left;
}

.thiek-product table.variations label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-size: var(--text-ui);
  font-weight: 500;
  letter-spacing: var(--tracking-ui);
  text-transform: uppercase;
}

.thiek-product table.variations select {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--spacing-sm);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.thiek-product table.variations.thiek-variations-native,
.thiek-quick-add table.variations.thiek-variations-native {
  display: none;
}

.thiek-variation-options {
  display: grid;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.thiek-options {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.thiek-options-legend {
  margin-bottom: var(--spacing-xs);
  padding: 0;
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-muted);
}

.thiek-options-value {
  color: var(--color-muted);
}

.thiek-options-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--spacing-2xs);
  width: 100%;
}

.thiek-option {
  position: relative;
  min-width: 0;
}

.thiek-option-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.thiek-option-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 0 var(--spacing-sm);
  border: 1px solid var(--color-control-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-small);
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease);
}

.thiek-option-input:hover + .thiek-option-label {
  border-color: var(--color-text);
}

.thiek-option-input:checked + .thiek-option-label {
  border-color: var(--color-text);
  background: var(--color-text);
  color: var(--color-bg);
}

.thiek-option-input:focus-visible + .thiek-option-label {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.thiek-option.is-unavailable .thiek-option-label {
  border-style: dashed;
  color: var(--color-text);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.thiek-option-input:disabled {
  cursor: not-allowed;
}

.thiek-option-input:disabled + .thiek-option-label {
  opacity: 0.45;
  cursor: not-allowed;
}

.thiek-options.is-error .thiek-option-label {
  border-color: var(--color-accent-text);
}

.thiek-variation-error {
  margin: 0;
}

.thiek-variation-options .reset_variations,
.thiek-variation-reset {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: var(--text-small);
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* WC uses visibility:hidden while no option is chosen — reserve no height. */
.thiek-variation-options .reset_variations[style*="visibility: hidden"],
.thiek-variation-options .reset_variations[hidden],
.thiek-variation-options .reset_variations:not(.is-visible) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
  visibility: hidden !important;
}

.thiek-variation-options .reset_variations.is-visible {
  display: inline-flex !important;
  min-height: var(--target-size);
  visibility: visible !important;
}

.thiek-variation-reset:hover {
  color: var(--color-accent-text);
}

/* Quantity stepper. */
.thiek-product .quantity,
.thiek-quick-add .quantity {
  display: inline-flex;
  align-items: stretch;
  min-height: 52px;
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  overflow: hidden;
}

.thiek-product .quantity .qty,
.thiek-quick-add .quantity .qty {
  width: 52px;
  min-height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 500;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.thiek-product .quantity .qty::-webkit-outer-spin-button,
.thiek-product .quantity .qty::-webkit-inner-spin-button,
.thiek-quick-add .quantity .qty::-webkit-outer-spin-button,
.thiek-quick-add .quantity .qty::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.thiek-product .quantity .qty:focus-visible,
.thiek-quantity-step:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
}

.thiek-quantity-step {
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.thiek-quantity-step:hover {
  color: var(--color-accent-text);
}

/* Add to cart: primary button of the design system. */
.thiek-product .single_add_to_cart_button,
.thiek-quick-add .single_add_to_cart_button {
  display: inline-flex;
  flex: 1 1 220px;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--spacing-md);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-brand);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-ui);
  font-weight: 500;
  letter-spacing: var(--tracking-ui);
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.thiek-product .single_add_to_cart_button:hover,
.thiek-quick-add .single_add_to_cart_button:hover {
  border-color: var(--color-brand-hover);
  background: var(--color-brand-hover);
}

.thiek-product .single_add_to_cart_button:active,
.thiek-quick-add .single_add_to_cart_button:active {
  border-color: var(--color-brand-press);
  background: var(--color-brand-press);
}

.thiek-product .single_add_to_cart_button:focus-visible,
.thiek-quick-add .single_add_to_cart_button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* Details accordion ------------------------------------------------------ */

.thiek-product-details {
  margin-top: var(--spacing-lg) !important;
  border-top: 1px solid var(--color-line);
}

.thiek-product-details .thiek-accordion-panel {
  padding-bottom: var(--spacing-md);
  color: var(--color-muted);
  font-size: 15px;
  line-height: var(--leading-body);
}

.thiek-product-details .thiek-accordion-panel p {
  margin: 0;
}

.thiek-product-details .thiek-accordion-panel p + p {
  margin-top: var(--spacing-xs);
}

.thiek-product .woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
}

.thiek-product .woocommerce-product-attributes th,
.thiek-product .woocommerce-product-attributes td {
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.thiek-product .woocommerce-product-attributes th {
  width: 40%;
  color: var(--color-text);
  font-weight: 500;
}

.thiek-product .woocommerce-product-attributes tr:last-child th,
.thiek-product .woocommerce-product-attributes tr:last-child td {
  border-bottom: 0;
}

/* Related ---------------------------------------------------------------- */

.thiek-product .related.products {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--color-line);
}

.thiek-product .related.products > h2 {
  margin: 0;
  font-size: var(--text-h3);
}

.thiek-product .related.products .thiek-shop-grid {
  margin-top: var(--spacing-md);
}

/* Mobile buy bar --------------------------------------------------------- */

.thiek-buybar {
  display: none;
}

/* Responsive ------------------------------------------------------------- */

@media (min-width: 1280px) {
  /* Progress scrubber was for the old max-height scroll track — hide so it
   * never reads as a crushed thumbnail rail beside the grid. */
  .thiek-gallery.has-multiple .thiek-gallery-progress {
    display: none !important;
  }

  .thiek-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .thiek-gallery-stage {
    grid-column: 1;
  }

  .thiek-gallery-dots {
    display: none !important;
  }

  .thiek-gallery-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    /* Full grid in page flow — no max-height peek that crushes the next row into a strip. */
    max-height: none;
    overflow: visible;
    scroll-snap-type: none;
  }

  .thiek-gallery .woocommerce-product-gallery__image,
  .thiek-gallery .woocommerce-product-gallery__image--placeholder {
    flex: unset;
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  /* Odd count: first image spans both columns (4:3), no empty cell. */
  .thiek-gallery.is-odd .thiek-gallery-track > .woocommerce-product-gallery__image:first-child,
  .thiek-gallery.is-odd .thiek-gallery-track > .woocommerce-product-gallery__image--placeholder:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 3;
  }

  /* Contain slides keep the same 1:1 / 4:3 frame as cover siblings. */
}

@media (max-width: 1279px) and (min-width: 1024px) {
  .thiek-product-layout {
    gap: var(--spacing-lg);
  }

  .thiek-product .product_title {
    font-size: 40px;
  }
}

@media (max-width: 1023px) {
  .thiek-product-page .thiek-commerce {
    padding-inline: 0;
    width: 100%;
    max-width: none;
  }

  .thiek-product-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-md);
  }

  .thiek-product-media {
    margin: 0;
  }

  .thiek-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .thiek-gallery-stage {
    grid-column: 1;
  }

  .thiek-gallery-progress {
    display: none !important;
  }

  .thiek-product-summary {
    position: static;
    padding-inline: var(--page-gutter);
  }

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

  .thiek-product .related.products {
    padding-inline: var(--page-gutter);
  }

  .thiek-product-page .thiek-breadcrumb,
  .thiek-product-page .woocommerce-notices-wrapper {
    padding-inline: var(--page-gutter);
  }

  .thiek-buybar:not([hidden]) {
    position: fixed;
    inset: auto 0 0;
    z-index: var(--z-header);
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm) calc(var(--spacing-xs) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-line);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--color-bg);
    animation: thiek-buybar-in var(--duration) var(--ease);
  }

  .thiek-buybar-inner {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .thiek-buybar-text {
    flex: 1 1 auto;
    min-width: 0;
  }

  .thiek-buybar-name,
  .thiek-buybar-price {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .thiek-buybar-name {
    font-family: var(--font-heading);
    font-size: 18px;
    line-height: 1.2;
  }

  .thiek-buybar-price {
    font-size: var(--text-small);
    font-weight: var(--font-display-weight);
  }

  .thiek-buybar-button {
    flex: 0 0 auto;
  }

  html.thiek-has-buybar body {
    padding-bottom: 76px;
  }
}

/*
 * Tablets (iPad portrait and landscape, 768–1279px): one large photo at a
 * time (swipe + dots) in a column that stays in view while the details
 * scroll beside it. The 2-column photo grid only starts at 1280px — at
 * iPad widths it shrank to small tiles and left a tall empty column.
 */
@media (min-width: 768px) and (max-width: 1279px) {
  .thiek-product-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: var(--spacing-lg);
  }

  .thiek-product-media {
    position: sticky;
    top: calc(var(--header-height, 72px) + var(--spacing-sm));
    align-self: start;
  }

  .thiek-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .thiek-gallery-stage {
    grid-column: 1;
  }

  .thiek-gallery-progress {
    display: none !important;
  }

  /* One photo never taller than the screen (landscape iPads). */
  .thiek-gallery .woocommerce-product-gallery__image,
  .thiek-gallery .woocommerce-product-gallery__image--placeholder {
    max-height: calc(100svh - var(--header-height, 72px) - 120px);
  }

  .thiek-product-summary {
    position: static;
  }

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

  /* Same details as the phone layout: dots on the photo, round zoom. */
  .thiek-gallery-dots:not([hidden]) {
    position: absolute;
    inset: auto 0 8px;
    z-index: 2;
    margin: 0;
    gap: 0;
    pointer-events: none;
  }

  .thiek-gallery-dot {
    min-width: 32px;
    min-height: 32px;
    pointer-events: auto;
  }

  .thiek-gallery-dot::after {
    width: 6px;
    height: 6px;
    background: rgb(244 241 234 / 40%);
    box-shadow: 0 0 0 1px rgb(17 17 17 / 25%);
  }

  .thiek-gallery-dot[aria-selected="true"]::after {
    width: 18px;
    background: var(--color-ivory, #f4f1ea);
  }

  .thiek-gallery-zoom {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: var(--radius-full);
    background: rgb(17 17 17 / 55%);
  }

  /* Stock: quiet line with a green dot, not a boxed capital label. */
  .thiek-product-stock-pill {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-muted);
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .thiek-product-stock.is-in-stock .thiek-product-stock-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: var(--radius-full);
    background: #5fa36b;
  }

  /* One row: quantity · add to cart · heart. */
  .thiek-product form.cart:not(.variations_form),
  .thiek-product .woocommerce-variation-add-to-cart {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .thiek-product .single_add_to_cart_button {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: var(--spacing-sm);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .thiek-product-media {
    padding-left: var(--page-gutter);
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .thiek-buybar:not([hidden]) {
    padding-block: 4px;
  }

  html.thiek-has-buybar body {
    padding-bottom: 56px;
  }
}

@media (max-width: 599px) {
  .thiek-product .product_title {
    font-size: 34px;
  }

  .thiek-breadcrumb {
    margin-bottom: var(--spacing-sm);
  }
}

/* Savings tag + favourites button (all widths) ------------------------- */

.thiek-product-saving {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0;
  padding: 2px var(--spacing-xs);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
}

.thiek-product-saving + .thiek-product-stock {
  margin-top: var(--spacing-xs);
}

.thiek-product-wish {
  position: relative;
  display: inline-flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 52px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease);
}

.thiek-product-wish:hover {
  border-color: var(--color-text);
}

.thiek-product-wish:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.thiek-product-wish-icon {
  display: flex;
  width: 22px;
  height: 22px;
}

.thiek-product-wish-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thiek-product-wish-icon--fill {
  display: none;
}

.thiek-product-wish-icon--fill svg {
  fill: var(--color-brand);
  stroke: var(--color-brand);
}

.thiek-product-wish[aria-pressed="true"] .thiek-product-wish-icon--outline {
  display: none;
}

.thiek-product-wish[aria-pressed="true"] .thiek-product-wish-icon--fill {
  display: flex;
}

/* Mobile product page (≤ 767 px) ---------------------------------------
 * Gymshark-like: image first and edge to edge, dots on the photo, compact
 * header block (tag, title, price), one row « quantité · panier · favori ».
 */
@media (max-width: 767px) {
  .thiek-product-page .thiek-commerce {
    padding-block: 0 var(--spacing-xl);
  }

  .thiek-product-page .thiek-breadcrumb {
    margin: 0;
    padding-block: 10px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .thiek-product-page .thiek-breadcrumb ol {
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
  }

  .thiek-product-page .thiek-breadcrumb li:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .thiek-product-layout {
    gap: var(--spacing-md);
  }

  /* Dots sit on the photo instead of a 60 px strip under it. */
  .thiek-gallery-dots:not([hidden]) {
    position: absolute;
    inset: auto 0 6px;
    z-index: 2;
    margin: 0;
    gap: 0;
    pointer-events: none;
  }

  .thiek-gallery-dot {
    min-width: 28px;
    min-height: 28px;
    pointer-events: auto;
  }

  .thiek-gallery-dot::after {
    width: 6px;
    height: 6px;
    background: rgb(244 241 234 / 40%);
    box-shadow: 0 0 0 1px rgb(17 17 17 / 25%);
  }

  .thiek-gallery-dot[aria-selected="true"]::after {
    width: 18px;
    background: var(--color-ivory, #f4f1ea);
  }

  .thiek-gallery-zoom {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border: 0;
    border-radius: var(--radius-full);
    background: rgb(17 17 17 / 55%);
  }

  .thiek-product-summary-inner > * + * {
    margin-top: var(--spacing-xs);
  }

  /* Stock: quiet line with a dot, not a boxed capital label. */
  .thiek-product-stock-pill {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-muted);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .thiek-product-stock.is-in-stock .thiek-product-stock-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: var(--radius-full);
    background: #5fa36b;
  }

  .thiek-product .product_title {
    font-size: 28px;
    line-height: 1.15;
    text-wrap: balance;
  }

  .thiek-product-summary .price {
    font-size: 18px;
  }

  .thiek-product-offer {
    padding: 10px var(--spacing-sm);
  }

  .thiek-product .woocommerce-product-details__short-description {
    font-size: 14px;
  }

  .thiek-product form.cart {
    margin-top: var(--spacing-sm);
  }

  /* One row: compact quantity · full-width CTA · heart. */
  .thiek-product form.cart:not(.variations_form),
  .thiek-product .woocommerce-variation-add-to-cart {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .thiek-product .quantity .qty {
    width: 32px;
  }

  .thiek-product .thiek-quantity-step {
    width: 34px;
  }

  .thiek-product .single_add_to_cart_button {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: var(--spacing-sm);
  }

  .thiek-product-reassurance {
    gap: 6px;
  }
}

@keyframes thiek-buybar-in {
  from {
    transform: translateY(100%);
  }

  to {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thiek-buybar:not([hidden]) {
    animation: none;
  }
}
