/* ==========================================================================
   Hafa single product page (layout and look modelled on hafa.fi)
   Scoped to body.hafa-product
   ========================================================================== */
body.hafa-product .woocommerce-container-single-product {
  color: #000;
  font-weight: 300;
}
body.hafa-product .single-product-layout {
  gap: 2.5rem;
}
body.hafa-product .product-left  { width: 62%; }
body.hafa-product .product-right { width: 34%; margin-top: 0; }
body.hafa-product .product-left .product-rating { display: none; }
body.hafa-product .product-gallery { margin-top: 0; }

/* Summary column */
body.hafa-product .product-right .product-brand-logo { margin: 0 0 .75rem; }
body.hafa-product .product-right .product-brand-logo img { width: 90px; height: auto; }
body.hafa-product h1.hafa-product__name {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 300;
  margin: 0 0 .5rem;
  color: #000;
}
body.hafa-product .hafa-article-number {
  display: flex;
  align-items: center;
  font-size: .875rem;
  line-height: 1.2;
  margin-bottom: .75rem;
}
body.hafa-product .hafa-article-number span,
body.hafa-product .hafa-loop-article span {
  background: #f5f2f0;
  padding: .1875rem .3rem;
  margin-left: .3125rem;
  font-size: .8125rem;
  line-height: 1;
}
body.hafa-product .single-product-layout .price,
body.hafa-product .single-product-layout .price ins {
  color: #000;
  font-weight: 400;
  font-size: 1.5rem;
  font-style: normal;
  margin: .25rem 0 .5rem;
}
body.hafa-product .single-product-layout .price ins { text-decoration: none; }
body.hafa-product .single-product-layout .price del {
  font-size: 1.1rem;
  color: #6c6c6c;
  margin-right: .3125rem;
}
body.hafa-product .single-product-layout .price .woocommerce-Price-amount,
body.hafa-product .single-product-layout .price bdi {
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
}
body.hafa-product .single-product-layout .price ins,
body.hafa-product .single-product-layout .price ins .woocommerce-Price-amount { color: #000 !important; }
body.hafa-product .single-product-layout .price:has(del) ins,
body.hafa-product .single-product-layout .price:has(del) ins .woocommerce-Price-amount { color: #ad152b !important; }
body.hafa-product .single-product-layout .price del .woocommerce-Price-amount { color: #6c6c6c; font-size: inherit; }
body.hafa-product .woocommerce-product-details__short-description {
  font-size: .9375rem;
  letter-spacing: .01rem;
  line-height: 1.55;
  margin: .5rem 0 1rem;
}
body.hafa-product .woocommerce-product-details__short-description p { margin: 0; }
body.hafa-product .product-right p.stock { display: none; }

/* Colour / size selector */
body.hafa-product .hafa-selector { margin: .5rem 0 1.25rem; }
body.hafa-product .hafa-selector__label {
  margin: .75rem 0 .375rem;
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04rem;
}
body.hafa-product .hafa-selector__variants {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}
body.hafa-product .hafa-selector__link {
  display: block;
  text-decoration: none;
  color: #000;
}
body.hafa-product .hafa-selector__image {
  position: relative;
  display: block;
  width: 4.375rem;
  height: 4.375rem;
  background: #f5f2f0;
  border-radius: 5px;
  overflow: hidden;
}
body.hafa-product .hafa-selector__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
}
body.hafa-product .hafa-selector__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .25s ease;
}
body.hafa-product .hafa-selector__overlay::after {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #fff;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
body.hafa-product .hafa-selector__link:hover .hafa-selector__overlay,
body.hafa-product .hafa-selector__link.is-active .hafa-selector__overlay { opacity: 1; }
body.hafa-product .hafa-selector__name {
  display: block;
  max-width: 4.375rem;
  font-size: .75rem;
  text-align: center;
  line-height: 1.1;
  margin-top: .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.hafa-product .hafa-selector__select {
  width: 100%;
  max-width: 20rem;
  padding: .6rem .75rem;
  border: 1px solid #4a4a48;
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-size: .9375rem;
  color: #000;
}

/* Cart */
body.hafa-product .product-right form.cart { margin-top: .5rem; }
body.hafa-product div.woocommerce-container > div > div.woocommerce-container-single-product > div.single-product-layout > div.product-right > form > button,
body.hafa-product .product-right form.cart .single_add_to_cart_button {
  background: #000;
  color: #fff;
  border: 1px solid #000;
  text-transform: uppercase;
  letter-spacing: .04rem;
  font-size: .9375rem;
  font-weight: 600;
  padding: .8rem 1.25rem;
  width: auto;
  min-width: 14rem;
}
body.hafa-product .product-right form.cart .single_add_to_cart_button:hover { background: #4a4a48; border-color: #4a4a48; }
body.hafa-product .product-right .custom-stock-wrapper { margin: .25rem 0 .5rem; }

/* Details block (icons + accordion + side) */
body.hafa-product .product-details {
  background: transparent;
  padding: 0;
  margin: 2.5rem 0 0;
  border-radius: 0;
  font-size: 1rem;
  line-height: 1.5;
  display: block;
  color: #000;
}
body.hafa-product .hafa-details {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
body.hafa-product .hafa-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 1rem;
}
body.hafa-product .hafa-icons__item {
  position: relative;
  padding: .625rem .9375rem .625rem 0;
  outline: none;
}
body.hafa-product .hafa-icons__item img {
  max-height: 3.4375rem;
  width: auto;
  height: 3.4375rem;
  display: block;
}
body.hafa-product .hafa-icons__tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 14rem;
  background: #f5f2f0;
  color: #000;
  font-size: .8125rem;
  line-height: 1.35;
  text-align: center;
  padding: .625rem;
  border-radius: .25rem;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
body.hafa-product .hafa-icons__item:hover .hafa-icons__tooltip,
body.hafa-product .hafa-icons__item:focus .hafa-icons__tooltip { display: block; }

body.hafa-product .hafa-accordion { border-top: 1px solid #e8dbd4; }
body.hafa-product .hafa-accordion__item { border-bottom: 1px solid #e8dbd4; }
body.hafa-product .hafa-accordion__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .9375rem .9375rem .9375rem .125rem;
  font-size: .9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04rem;
  cursor: pointer;
  list-style: none;
  color: #000;
}
body.hafa-product .hafa-accordion__label::-webkit-details-marker { display: none; }
body.hafa-product .hafa-accordion__label::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: .75rem;
  transition: transform .2s ease;
}
body.hafa-product .hafa-accordion__item[open] > .hafa-accordion__label::after { transform: rotate(180deg); }
body.hafa-product .hafa-accordion__content {
  width: 95%;
  padding: 0 0 1.25rem;
  font-size: .9375rem;
}
body.hafa-product .hafa-accordion__text p { margin: 0 0 .75rem; line-height: 1.6; }
body.hafa-product .hafa-accordion__text ul { margin: .75rem 0 0; padding-inline-start: 1.1rem; }
body.hafa-product .hafa-accordion__text li { list-style: disc; margin: .2rem 0; line-height: 1.5; }
body.hafa-product .hafa-accordion__group {
  font-size: .875rem;
  font-weight: 600;
  margin: 0;
  padding: 1.25rem 0 .3rem;
}
body.hafa-product .hafa-accordion__group:first-of-type { padding-top: .25rem; }
body.hafa-product .hafa-accordion__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  padding: .3125rem 0;
  font-size: .875rem;
  border-bottom: 1px solid #f5f2f0;
}
body.hafa-product .hafa-accordion__row:last-of-type { border-bottom: 0; }
body.hafa-product .hafa-accordion__doc {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3125rem 0;
  font-size: .875rem;
}
body.hafa-product .hafa-accordion__doc i { color: #4a4a48; font-size: 1.1rem; }
body.hafa-product .hafa-accordion__doc a { color: #000; text-decoration: underline; text-underline-offset: 2px; }

/* Brand / series block */
body.hafa-product .hafa-range {
  background: #e8dbd4;
  padding: 1.5rem 1.75rem;
}
body.hafa-product .hafa-range__logo { width: 110px; height: auto; display: block; margin-bottom: .75rem; mix-blend-mode: multiply; }
body.hafa-product .hafa-range h3 { font-size: 1.375rem; font-weight: 300; margin: 0 0 .5rem; color: #000; }
body.hafa-product .hafa-range p { font-size: .875rem; line-height: 1.55; margin: 0 0 1rem; color: #000; }
body.hafa-product .hafa-range__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
body.hafa-product .hafa-button-hollow {
  display: inline-block;
  padding: .55rem 1rem;
  border: 1px solid #4a4a48;
  color: #000;
  background: transparent;
  text-decoration: none;
  font-size: .875rem;
  line-height: 1.2;
  transition: background .2s ease, color .2s ease;
}
body.hafa-product .hafa-button-hollow:hover { background: #000; color: #fff; border-color: #000; }
body.hafa-product .hafa-range__external {
  display: inline-block;
  margin-top: .9rem;
  font-size: .8125rem;
  color: #4a4a48;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Related / upsell sections as hafa.fi relation groups */
body.hafa-product .woocommerce-container-single-product section.products > h2 {
  margin: 2.5rem 0 .9375rem;
  font-size: 1.375rem;
  font-weight: 300;
  color: #000;
}
body.hafa-product .woocommerce-container-single-product section.products ul.products {
  background: transparent;
  padding: 0;
  gap: .9375rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 0;
}
body.hafa-product .woocommerce-container-single-product section.products ul.products li.product {
  background: #fefefe;
  border: 1px solid #f5f2f0;
  padding: 0 0 .625rem;
}
body.hafa-product section.products ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 400;
  color: #000;
  padding: .625rem .625rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.hafa-product .hafa-loop-article {
  display: flex;
  align-items: center;
  font-size: .75rem;
  padding: .5rem .625rem 0;
  color: #000;
}
body.hafa-product section.products ul.products li.product .price,
body.hafa-product section.products ul.products li.product .price .woocommerce-Price-amount {
  color: #000;
  font-weight: 400;
  font-size: 1rem;
}
body.hafa-product section.products ul.products li.product .price { padding: .35rem .625rem 0; }
body.hafa-product section.products ul.products li.product .price .woocommerce-Price-amount,
body.hafa-product section.products ul.products li.product .price bdi { color: #000; font-weight: 400; font-size: 1rem; }
body.hafa-product section.products ul.products li.product .custom-stock-wrapper { padding: .35rem .625rem 0; }
body.hafa-product section.products ul.products li.product .button { background: #000; }

/* Responsive */
@media (max-width: 1024px) {
  body.hafa-product .product-left,
  body.hafa-product .product-right { width: 100%; }
  body.hafa-product .hafa-details { grid-template-columns: 1fr; gap: 1.5rem; }
  body.hafa-product .woocommerce-container-single-product section.products ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  body.hafa-product h1.hafa-product__name { font-size: 1.5rem; }
  body.hafa-product .hafa-accordion__content { width: 100%; }
  body.hafa-product .hafa-accordion__row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .5rem; }
  body.hafa-product .hafa-range { padding: 1.25rem; }
  body.hafa-product .woocommerce-container-single-product section.products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.hafa-product .product-right form.cart .single_add_to_cart_button { width: 100%; min-width: 0; }
  body.hafa-product .hafa-icons__tooltip { width: 11rem; }
}
