/* ==========================================================================
   Product full page
   ========================================================================== */

/* --- Header zone --- */

.product-full__header {
  margin-bottom: var(--td-space-md);
}

.product-full__header .product-title {
  margin-top: 0;
  margin-bottom: var(--td-space-xs);
  font-size: var(--td-font-size-h1);
  line-height: 1.25;
}

.product-full__header .field--name-sku {
  font-size: var(--td-font-size-sm);
  color: var(--td-color-text-muted);
}

.product-full__manufacturer {
  margin-bottom: var(--td-space-sm);
}

.product-full__manufacturer img {
  max-height: 50px;
  width: auto;
}

/* --- Top zone: gallery + purchase --- */

.product-full__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--td-gutter);
  margin-bottom: var(--td-space-xl);
}

/* --- Gallery --- */

.product-gallery {
  flex: 1 1 0;
  min-width: 0;
  max-width: 460px;
}

/* --- Hero image (Slick main carousel) --- */

.product-gallery .slick--main .slick__slide {
  text-align: center;
  border: 1px solid var(--td-color-border-light);
  border-radius: var(--td-radius-sm);
}

.product-gallery .slick--main .slick__slide img {
  margin: 0 auto;
}

/* --- Thumbnail carousel (Slick asNavFor) --- */

.product-gallery .slick--thumbnail {
  position: relative;
  padding: 0 30px;
  margin-top: var(--td-space-sm);
}

.product-gallery .slick--thumbnail .slick-list {
  margin: 0 auto;
}

.product-gallery .slick--thumbnail .slick__slide {
  display: flex;
  justify-content: center;
}

.product-gallery .slick--thumbnail .slick__slide .slide__media,
.product-gallery .slick--thumbnail .slick__slide > .media,
.product-gallery .slick--thumbnail .slick__slide > div {
  width: 80px;
  height: 80px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--td-radius-sm);
  cursor: pointer;
  transition: border-color var(--td-transition-duration) var(--td-transition-easing);
}

.product-gallery .slick--thumbnail .slick__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--td-radius-sm);
}

.product-gallery .slick--thumbnail .slick__slide:hover > div,
.product-gallery .slick--thumbnail .slick__slide.slick-current > div {
  border-color: var(--td-color-primary);
}

.product-gallery .slick--thumbnail .slick__arrow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  transform: none;
  pointer-events: none;
}

.product-gallery .slick--thumbnail .slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--td-color-text-muted, #888);
  font-size: 0;
  cursor: pointer;
  pointer-events: auto;
}

.product-gallery .slick--thumbnail .slick-arrow:hover {
  color: var(--td-color-primary);
}

.product-gallery .slick--thumbnail .slick-arrow::before {
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  color: inherit;
}

.product-gallery .slick--thumbnail .slick-prev {
  left: 0;
}

.product-gallery .slick--thumbnail .slick-prev::before {
  content: "\2039";
}

.product-gallery .slick--thumbnail .slick-next {
  right: 0;
}

.product-gallery .slick--thumbnail .slick-next::before {
  content: "\203A";
}

.product-gallery .slick--thumbnail .slick-arrow.slick-disabled {
  opacity: 0.3;
  cursor: default;
}

.product-gallery .slick--thumbnail .slick-arrow.slick-disabled:hover {
  color: var(--td-color-text-muted, #888);
}

/* --- Purchase panel (card) --- */

.product-full__purchase {
  flex: 0 0 auto;
  width: 24rem;
  background-color: var(--td-color-bg);
  padding: var(--td-space-lg);
  border: 1px solid var(--td-color-border-light);
  border-radius: var(--td-radius-md);
  box-shadow: var(--td-shadow-sm);
}

/* --- Pricing --- */

.product-full__price-label {
  display: block;
  font-size: var(--td-font-size-sm);
  font-weight: var(--td-font-weight-bold);
  color: var(--td-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--td-space-xs);
}

.product-full__pricing .field--name-price {
  font-size: var(--td-font-size-h2);
  font-weight: var(--td-font-weight-bold);
  color: var(--td-color-primary);
  margin-bottom: var(--td-space-sm);
}

.product-full__pricing--on-sale .field--name-price {
  font-size: var(--td-font-size-base);
  color: var(--td-color-text-muted);
  text-decoration: line-through;
  margin-bottom: 0;
}

.product-full__sale-price .field--name-field-sale-price {
  font-size: var(--td-font-size-h2);
  font-weight: var(--td-font-weight-bold);
  color: var(--td-color-sale);
  margin-bottom: var(--td-space-xs);
}

.product-full__pricing .field--name-field-discount {
  font-size: var(--td-font-size-sm);
  color: var(--td-color-sale);
  font-weight: var(--td-font-weight-bold);
  margin-bottom: var(--td-space-md);
}

.product-full__pricing {
  margin-bottom: var(--td-space-md);
  padding-bottom: var(--td-space-md);
  border-bottom: 1px solid var(--td-color-border-faint);
}

/* --- Shipping --- */

.product-full__purchase .field--name-field-estimated-shipping-uk {
  font-size: var(--td-font-size-base);
  color: var(--td-color-text);
  margin-bottom: var(--td-space-md);
  padding-bottom: var(--td-space-md);
  border-bottom: 1px solid var(--td-color-border-faint);
}

/* --- Add to Cart --- */

.product-full__purchase .field--name-variations .form-actions {
  margin-top: var(--td-space-lg);
}

.product-full__purchase .field--name-variations .form-actions .button,
.product-full__purchase .field--name-variations .form-actions input[type="submit"] {
  width: 100%;
  font-size: var(--td-font-size-lg);
  padding: 0.75em 2em;
  font-weight: var(--td-font-weight-bold);
  background-color: var(--td-color-success);
  border-color: var(--td-color-success);
}

.product-full__purchase .field--name-variations .form-actions .button:hover,
.product-full__purchase .field--name-variations .form-actions input[type="submit"]:hover {
  background-color: #86c142;
  border-color: #86c142;
}

/* --- Trust signals --- */

.product-trust {
  margin-top: var(--td-space-lg);
  padding-top: var(--td-space-md);
  border-top: 1px solid var(--td-color-border-light);
  font-size: var(--td-font-size-sm);
  color: var(--td-color-text-muted);
}

.product-trust__item {
  display: flex;
  align-items: flex-start;
  gap: var(--td-space-sm);
  margin-bottom: var(--td-space-sm);
  line-height: 1.4;
}

.product-trust__item:last-child {
  margin-bottom: 0;
}

.product-trust__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  fill: var(--td-color-primary);
}

/* --- Tabbed sections --- */

.product-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-top: var(--td-space-lg);
}

.product-tabs__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-tabs__tab {
  order: -1;
  padding: var(--td-space-sm) var(--td-space-lg);
  font-size: var(--td-font-size-base);
  font-weight: var(--td-font-weight-bold);
  color: var(--td-color-text-muted);
  background-color: var(--td-color-bg-subtle);
  border: 1px solid var(--td-color-border-light);
  border-bottom: none;
  border-radius: var(--td-radius-md) var(--td-radius-md) 0 0;
  cursor: pointer;
  margin-right: var(--td-space-xs);
  transition: background-color var(--td-transition-duration) var(--td-transition-easing),
              color var(--td-transition-duration) var(--td-transition-easing);
}

.product-tabs__tab:hover {
  color: var(--td-color-primary);
  background-color: var(--td-color-bg);
}

.product-tabs__input:checked + .product-tabs__tab {
  color: var(--td-color-white);
  background-color: var(--td-color-primary);
  border-color: var(--td-color-primary);
}

.product-tabs__panel {
  display: none;
  width: 100%;
  order: 1;
  padding: var(--td-space-lg);
  border: 1px solid var(--td-color-border-light);
  border-radius: 0 0 var(--td-radius-md) var(--td-radius-md);
  background-color: var(--td-color-bg);
  line-height: 1.7;
  font-size: var(--td-font-size-base);
  color: var(--td-color-text);
}

#tab-description:checked ~ .product-tabs__panel--description,
#tab-fitment:checked ~ .product-tabs__panel--fitment,
#tab-alternatives:checked ~ .product-tabs__panel--alternatives,
#tab-related:checked ~ .product-tabs__panel--related {
  display: block;
}

/* Headings inside the description tab get vertical breathing room only when
   something visually precedes them — the first child sits flush with the top
   of the panel. `* + h2` style selectors handle headings preceded by any
   sibling regardless of element type. */
.product-tabs__panel--description :is(h2, h3, h4, h5, h6) {
  margin-top: 0;
}

.product-tabs__panel--description * + :is(h2, h3, h4, h5, h6) {
  margin-top: var(--td-space-lg);
}

/* Inside a product description the page title is already at h1 size; shift
   the body's headings down one visual step so the description doesn't shout
   over the surrounding chrome. The semantic level (used for accessibility
   and the document outline) is preserved — only the rendered size moves. */
.product-tabs__panel--description h2 {
  font-size: var(--td-font-size-h3);
}

.product-tabs__panel--description h3 {
  font-size: var(--td-font-size-h4);
}

.product-tabs__panel--description :is(h4, h5, h6) {
  font-size: var(--td-font-size-h4);
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .product-full__top {
    flex-direction: column;
  }

  .product-gallery {
    max-width: 100%;
  }

  .product-full__purchase {
    min-width: 0;
  }

}

@media (max-width: 480px) {
  .product-full__purchase {
    padding: var(--td-space-md);
  }

  .product-tabs__tab {
    padding: var(--td-space-xs) var(--td-space-sm);
    font-size: var(--td-font-size-sm);
  }

  .product-tabs__panel {
    padding: var(--td-space-md);
  }
}
