/* assets/css/product.css */

/* ── WRAPPER ── */
.soc-product-wrap {
  padding-top:    var(--sp-4);
  padding-bottom: 60px;
}

/* ── 2-COLUMN LAYOUT ── */
.woocommerce div.product {
  display:               grid;
  grid-template-columns: 1fr;
  gap:                   var(--sp-8);
}

@media (min-width: 768px) {
  .woocommerce div.product {
    grid-template-columns: 1fr 1fr;
    gap:                   80px;
    align-items:           start;
  }
}

/* ── GALERIA ── */
/* position: relative always — required for wishlist overlay */
.woocommerce div.product div.images { position: relative; }

/* Desktop: galeria em grelha 2+3+2 (SKLUM). O mobile (< 768px) é scroll nativo. */
@media (min-width: 768px) {
  .woocommerce div.product div.images { display: block !important; }

  /* No desktop o contentor de scroll não recorta nada — é a grelha que manda */
  .woocommerce div.product div.images .soc-gallery-viewport {
    overflow: visible;
    height:   auto;
  }

  /* O wrapper dos slides passa a grelha de 6 colunas (MMC de 2 e 3) */
  .woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
    display:               grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    grid-auto-rows:        max-content !important;
    align-items:           start !important;
    gap:                   4px !important;
    width:                 auto !important;
    height:                auto !important;   /* mata o height inline do FlexSlider */
    transform:             none !important;
  }

  .woocommerce div.product div.images .woocommerce-product-gallery__image {
    width:  auto !important;
    float:  none !important;
    margin: 0 !important;
  }

  /* Fila 1 = 2 grandes · Fila 2 = 3 médias · Fila 3 = 2 grandes */
  .woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(-n+2) { grid-column: span 3; }
  .woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(n+3)  { grid-column: span 2; }
  .woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(6),
  .woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(7)    { grid-column: span 3; }
  .woocommerce div.product div.images .woocommerce-product-gallery__image:only-child      { grid-column: span 6; }

  /* Só 7 visíveis (2+3+2); as restantes veem-se no lightbox via "View more" */
  .woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(n+8) { display: none !important; }

  /* Cada célula é 4:5 e a imagem preenche-a — robusto contra o height inline do FlexSlider */
  .woocommerce div.product div.images .woocommerce-product-gallery__image {
    aspect-ratio: 4 / 5 !important;
    height:       auto !important;
    align-self:   start !important;
  }
  .woocommerce div.product div.images .woocommerce-product-gallery__image img {
    height:       100% !important;
    aspect-ratio: auto !important;
  }
}

/* Hide WooCommerce zoom button (we don't use wc-product-gallery-zoom) */
.woocommerce-product-gallery__trigger { display: none !important; }


/* "Out of stock" badge on individual product gallery */
/* Rendered inside .woocommerce-product-gallery__wrapper (position:relative) */
.soc-badge--gallery {
  position: absolute;
  top:      var(--sp-3);
  left:     var(--sp-3);
  z-index:  10;
}

/* Main image — beige background */
.woocommerce div.product div.images .woocommerce-product-gallery__image {
  background: var(--c-bg-alt);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image img {
  aspect-ratio:  4 / 5 !important;
  object-fit:    cover !important;
  width:         100% !important;
  display:       block !important;
  border-radius: var(--r-lg) !important;
  cursor:        pointer;
}

/* "View more (x)" — botão da grelha da galeria (só desktop; inserido via JS) */
.soc-gallery-more { display: none; }
@media (min-width: 768px) {
  .soc-gallery-more {
    display:        block;
    width:          fit-content;
    margin:         16px auto 0;
    font-family:    var(--font-main);
    font-size:      12px;
    font-weight:    var(--fw-semibold);
    letter-spacing: .04em;
    color:          var(--c-text);
    background:     transparent;
    border:         0.5px solid var(--c-border-mid);
    border-radius:  var(--r-pill);
    padding:        11px 26px;
    cursor:         pointer;
    transition:     border-color var(--t-fast), color var(--t-fast);
  }
  .soc-gallery-more:hover { border-color: var(--c-brand); color: var(--c-brand); }
}

/* ── SUMMARY ── */
.woocommerce div.product div.summary { padding-top: 0; }

/* Collection label */
/* A colecção passa a ocupar a linha grande — o mesmo desenho que o título tinha,
   no Deep Teal da marca. Passou por coral (recusado em LIVE) e por verde — mas o
   verde da paleta é o --c-success, o mesmo do "In stock" poucas linhas abaixo:
   dava dois significados à mesma cor. O Deep Teal já era a cor do título, logo a
   página não ganha cor nenhuma nova, e dá 10,9:1.
   O nome do produto desce a subtítulo, mas SÓ quando há colecção: sem
   ela, o .product_title fica com o estilo grande de sempre. Ver a regra
   body.soc-has-collection mais abaixo. Nunca em maiúsculas. */
.soc-product-collection {
  font-family:    var(--font-display);
  font-size:      32px;
  font-weight:    var(--fw-bold);
  line-height:    1.1;
  letter-spacing: var(--tracking-display);
  color:          var(--c-brand);
  text-transform: none;
  margin-bottom:  5px;
  display:        block;
}

/* `body.` e não um espaço: .soc-has-collection e .woocommerce vivem as duas no
   <body>, logo ".soc-has-collection .woocommerce" nunca casaria. E a
   especificidade (0,3,2) ganha à regra base (0,3,1) independentemente da ordem. */
body.soc-has-collection div.product .product_title {
  font-family:    var(--font-main) !important;
  font-size:      14.5px !important;
  font-weight:    var(--fw-regular) !important;
  line-height:    1.45 !important;
  letter-spacing: 0 !important;
  color:          var(--c-text-muted) !important;
  margin-bottom:  12px !important;
}

/* Breadcrumb */
.woocommerce .woocommerce-breadcrumb {
  font-size:     11px;
  color:         var(--c-text-light);
  margin-bottom: 32px;
}

/* ── Colour swatches on the product page ── */
.soc-product-swatches { gap: 8px; }
.soc-product-swatches .soc-swatch { width: 22px; height: 22px; }

.woocommerce .woocommerce-breadcrumb a {
  color:           var(--c-text-muted);
  text-decoration: none;
  transition:      color var(--t-fast);
}

.woocommerce .woocommerce-breadcrumb a:hover { color: var(--c-brand); }

/* Title */
.woocommerce div.product .product_title {
  font-family:    var(--font-display) !important;
  font-size:      32px !important;
  font-weight:    var(--fw-bold) !important;
  line-height:    1.1 !important;
  letter-spacing: var(--tracking-display);
  margin-bottom:  5px !important;
  color:          var(--c-brand) !important;
}

/* SKU / Ref — margin override on product page */
.soc-product-ref { margin-bottom: 14px; }

/* Tags Sale/New no resumo (por baixo da Ref) — estilo SKLUM */
.soc-pdp-tags { display: flex; gap: 6px; margin: 0 0 20px; flex-wrap: wrap; }
.soc-pdp-tag {
  font-size:      10px;
  font-weight:    var(--fw-bold);
  letter-spacing: .02em;
  padding:        4px 10px;
  border-radius:  var(--r-pill);
}
.soc-pdp-tag--sale { background: var(--c-accent); color: var(--c-brand-dark); }
.soc-pdp-tag--new  { background: var(--c-sand);   color: var(--c-brand-dark); }

/* Rating */
.soc-product-rating {
  display:       flex;
  align-items:   center;
  gap:           6px;
  margin-bottom: 20px;
}

.soc-rating-stars {
  color:          var(--c-accent);
  font-size:      15px;
  letter-spacing: 1px;
  line-height:    1;
}

.soc-rating-score {
  font-size:   13px;
  font-weight: 500;
  color:       var(--c-text-muted);
}

.soc-rating-sep {
  font-size: 12px;
  color:     var(--c-text-muted);
}

.soc-rating-link {
  font-size:       12px;
  color:           var(--c-text-muted);
  text-decoration: none;
}

.soc-rating-all {
  font-size:             12px;
  color:                 var(--c-brand);
  text-decoration:       underline;
  text-underline-offset: 2px;
}

/* Sale dates */
.soc-sale-dates {
  font-size:   10px;
  color:       var(--c-text-ghost);
  margin:      2px 0 12px;
}

/* Price */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-size:     32px !important;
  font-weight:   400 !important;
  color:         var(--c-brand) !important;
  margin-bottom: 4px !important;
  display:       block !important;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
  font-size:    16px !important;
  color:        var(--c-text-ghost) !important;
  font-weight:  400 !important;
  margin-right: var(--sp-2) !important;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
  text-decoration: none !important;
  font-weight:     var(--fw-semibold) !important;
  color:           var(--c-accent) !important;
}

/* Financiamento */
.soc-product-financing {
  font-size:     11px;
  color:         var(--c-text-xlight);
  margin-bottom: 0;
  line-height:   1.5;
}

.soc-product-financing__link {
  color:           var(--c-brand);
  text-decoration: none;
  cursor:          pointer;
}

/* ── VARIATIONS / CONFIGURATOR ── */
.woocommerce div.product form.cart {
  display:        flex;
  flex-wrap:      wrap;
  gap:            10px;
  align-items:    stretch;
  margin-top:     var(--sp-6);
  margin-bottom:  0;
  margin-left:    0 !important;
  padding-left:   0 !important;
  border-top:     .5px solid var(--c-border-light);
  padding-top:    24px;
}

/* Convert variations table to vertical blocks */
.woocommerce div.product form.cart .variations,
.woocommerce div.product form.cart .variations tbody {
  display: block;
  width:   100%;
  border:  none !important;
  margin:  0;
}

.woocommerce div.product form.cart .variations tr {
  display:       block;
  margin-bottom: 16px;
}

.woocommerce div.product form.cart .variations td,
.woocommerce div.product form.cart .variations th {
  display:    block;
  padding:    0 !important;
  border:     none !important;
  width:      100% !important;
  text-align: left !important;
}

.woocommerce div.product form.cart .variations td.label label,
.woocommerce div.product form.cart .variations th.label label {
  font-size:      11px;
  font-weight:    var(--fw-medium);
  color:          var(--c-text);
  display:        block;
  margin-bottom:  8px;
  letter-spacing: .02em;
  text-align:     left !important;
}

.woocommerce div.product form.cart .variations td.value,
.woocommerce div.product form.cart .variations th.value {
  display:        flex;
  flex-direction: column;
  gap:            6px;
  align-items:    flex-start;
}

.woocommerce div.product form.cart .variations select {
  flex:                 1;
  background:           var(--c-white) !important;
  border:               .5px solid var(--c-border-mid) !important;
  border-radius:        var(--r-pill) !important;
  padding:              11px 36px 11px 16px !important;
  font-size:            12px !important;
  font-family:          var(--font-main) !important;
  color:                var(--c-text) !important;
  -webkit-appearance:   none !important;
  appearance:           none !important;
  background-image:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23bbb' stroke-width='1' fill='none'/%3E%3C/svg%3E") !important;
  background-repeat:    no-repeat !important;
  background-position:  right 14px center !important;
}

.woocommerce div.product form.cart .variations select {
  width: 100% !important;
}

.woocommerce div.product form.cart .reset_variations {
  font-size:             11px;
  color:                 var(--c-text-light);
  text-decoration:       underline;
  text-underline-offset: 2px;
}

/* ── DELIVERY INFO (inside the form) ── */
.soc-delivery-info {
  width:         100%;
  background:    var(--c-surface);
  border-radius: var(--r);
  padding:       14px 18px;
  margin-top:    6px;
  margin-bottom: 4px;
  display:       flex;
  gap:           10px;
  align-items:   center;
}

.soc-delivery-info svg { color: var(--c-accent); flex-shrink: 0; }
/* Tudo na mesma linha: título + subtítulo lado a lado */
.soc-delivery-info div { display: flex; flex-flow: row wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; }

.soc-delivery-info strong {
  display:     inline;
  font-size:   11px;
  font-weight: var(--fw-medium);
  color:       var(--c-text);
  white-space: nowrap;
}
.soc-delivery-info span::before { content: "·"; margin-right: 10px; color: var(--c-text-ghost); }

.soc-delivery-info span {
  font-size:   11px;
  color:       var(--c-text-xlight);
  line-height: 1.65;
}

/* ── ADD TO CART — flex:1 button on the left, compact qty on the right ──
   For variable products: qty and button are inside .variations_button
   For simple products:   qty and button are direct children of form.cart */

/* Variable product: single_variation_wrap takes full width */
.woocommerce div.product form.cart .single_variation_wrap { width: 100%; }

/* Variable product: .variations_button as flex container */
.woocommerce div.product .variations_button {
  display:     flex !important;
  flex-wrap:   wrap !important;
  gap:         10px !important;
  align-items: stretch !important;
}

/* Simple product: qty on the left, button on the right */
.woocommerce div.product form.cart .quantity {
  order:       1;
  flex-shrink: 0;
}
.woocommerce div.product form.cart .single_add_to_cart_button {
  order:          2;
  flex:           1 !important;
  background:     var(--c-brand) !important;
  color:          var(--c-white) !important;
  border:         none !important;
  border-radius:  var(--r-pill) !important;
  padding:        15px 24px !important;
  font-family:    var(--font-main) !important;
  font-size:      12px !important;
  font-weight:    var(--fw-medium) !important;
  letter-spacing: .07em !important;
  cursor:         pointer !important;
  transition:     background var(--t-fast) !important;
  box-shadow:     none !important;
  min-width:      0 !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background: var(--c-brand-dark) !important;
}

/* Wishlist button next to Add to cart (estilo SKLUM) */
.woocommerce div.product form.cart .soc-wishlist-btn--product {
  position:       static !important; /* repõe a base .soc-wishlist-btn (position:absolute) → volta ao flow, ao lado do ATC */
  order:          3;
  flex-shrink:    0;
  width:          54px;
  height:         auto !important;   /* repõe a base height:30px → align-self:stretch iguala a altura do ATC */
  align-self:     stretch;
  background:     transparent;
  border:         .5px solid var(--c-border-mid);
  border-radius:  var(--r-pill);
  color:          var(--c-text-muted);
  display:        flex;
  align-items:    center;
  justify-content:center;
  cursor:         pointer;
  transition:     border-color var(--t-fast), color var(--t-fast);
}
.woocommerce div.product form.cart .soc-wishlist-btn--product:hover,
.woocommerce div.product form.cart .soc-wishlist-btn--product.is-active {
  border-color: var(--c-accent);
  color:        var(--c-accent);
}
.woocommerce div.product form.cart .soc-wishlist-btn--product.is-active svg { fill: var(--c-accent); }

/* Qty — with +/- buttons */
.woocommerce div.product form.cart .quantity {
  display:       flex;
  align-items:   stretch;
  align-self:    stretch;
  border:        .5px solid var(--c-border-mid);
  border-radius: var(--r-pill);
  width:         auto;
  flex-shrink:   0;
  overflow:      hidden;
}

.woocommerce div.product form.cart .quantity input.qty {
  width:      44px !important;
  height:     100% !important;
  min-height: 48px !important;
  text-align: center !important;
  border:     none !important;
  padding:    0 !important;
  font-size:  13px !important;
  font-weight: var(--fw-medium) !important;
  background: var(--c-white) !important;
  -moz-appearance: textfield !important;
}

.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
}

/* Qty +/- buttons — scoped to the product form to not affect the mini cart */
.woocommerce div.product form.cart .quantity .soc-qty-btn {
  width:           40px;
  height:          100%;
  border:          none;
  background:      var(--c-white);
  cursor:          pointer;
  font-size:       17px;
  font-weight:     var(--fw-regular);
  color:           var(--c-text-muted);
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      color var(--t-fast);
  padding:         0;
  line-height:     1;
  min-height:      48px;
}

.woocommerce div.product form.cart .quantity .soc-qty-btn:hover { color: var(--c-brand); }

/* Active image container — ensures containing block for the wishlist button */
.woocommerce-product-gallery__image {
  position: relative !important;
}

/* ── WISHLIST OVERLAY IN GALLERY ──
   Restricted selector: only applies when button is a direct child of the gallery
   (ensures position:absolute is relative to the gallery, not the viewport) */

.woocommerce-product-gallery.images {
  position: relative !important;
  overflow: visible !important;
}

.woocommerce-product-gallery.images > .soc-gallery-wishlist {
  position:        absolute !important;
  top:             16px !important;
  right:           16px !important;
  width:           36px !important;
  height:          36px !important;
  background:      var(--c-white) !important;
  border-radius:   50% !important;
  border:          none !important;
  display:         flex !important;
  align-items:     center !important;
  justify-content: center !important;
  cursor:          pointer !important;
  color:           var(--c-text-muted) !important;
  z-index:         999 !important;
  box-shadow:      none !important;
  transition:      color 150ms ease !important;
}

/* Always visible — no hover on touch, button should always be fixed */
.woocommerce-product-gallery__image .soc-gallery-wishlist {
  opacity: 1 !important;
}

.soc-gallery-wishlist:hover,
.soc-gallery-wishlist.is-active { color: var(--c-error) !important; }

/* ── BADGES IN GALLERY (New + Sale) — absolute inside .woocommerce-product-gallery__image ── */
.soc-product-gallery-badges {
  position:       absolute;
  top:            12px;
  left:           12px;
  z-index:        5;
  display:        flex;
  flex-direction: column;
  gap:            5px;
}

/* ── ACCORDION (replaces WooCommerce tabs) ── */

/* Esconder tabs horizontais nativas */
.woocommerce div.product .woocommerce-tabs { display: none !important; }

.soc-accordion {
  border-top:  .5px solid var(--c-border-light);
  margin-top:  var(--sp-6);
}

.soc-accordion__item {
  border-bottom: .5px solid var(--c-border-light);
}

.soc-accordion__heading {
  margin:      0;
  padding:     0;
  font-size:   inherit;
  font-weight: inherit;
  line-height: inherit;
}

.soc-accordion__trigger {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  width:           100%;
  padding:         15px 0;
  font-size:       11px;
  font-weight:     var(--fw-bold);
  letter-spacing:  var(--tracking-label);
  text-transform:  uppercase;
  color:           var(--c-text);
  background:      none;
  border:          none;
  cursor:          pointer;
  font-family:     var(--font-main);
  text-align:      left;
}

.soc-accordion__trigger::after {
  content:     '+';
  color:       var(--c-accent);
  font-weight: var(--fw-regular);
  font-size:   18px;
  line-height: 1;
  flex-shrink: 0;
}

.soc-accordion__trigger[aria-expanded="true"]::after {
  content: '\2212'; /* − minus */
}

.soc-accordion__body {
  overflow: hidden;
  height:   0;
}

.soc-accordion__body.is-open {
  height: auto;
}

.soc-accordion__content {
  font-size:      var(--text-base);
  line-height:    1.75;
  color:          var(--c-text-muted);
  padding-bottom: 20px;
}

/* "View details" link — inlined at the end of the short description (via JS) → scrolls to DESCRIPTION */
.soc-view-details {
  color:                 var(--c-brand);
  text-decoration:       underline;
  text-underline-offset: 2px;
  cursor:                pointer;
  white-space:           nowrap;
}
.soc-view-details:hover { color: var(--c-brand-dark); }

/* Jump-to-section stops just below the sticky header (rating "See all" & "View details") */
.soc-accordion__item { scroll-margin-top: calc(var(--header-h) + 24px); }

/* Reference / disclaimer note at the end of the long description */
.soc-product-note {
  margin-top:  22px;
  padding-top: 16px;
  border-top:  .5px solid var(--c-border-xlight);
  font-size:   12px;
  line-height: 1.7;
  color:       var(--c-text-light);
}

/* Grouped attributes table — same font as accordion triggers */
.soc-attr-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       12px;
}

.soc-attr-table th,
.soc-attr-table td {
  padding:       9px 0;
  border-bottom: .5px solid var(--c-border-xlight);
  text-align:    left;
  vertical-align: top;
}

.soc-attr-table th {
  width:        42%;
  font-weight:  var(--fw-medium);
  color:        var(--c-text);
  padding-right: 16px;
}

.soc-attr-table td { color: var(--c-text-muted); }

.soc-attr-table tr:last-child th,
.soc-attr-table tr:last-child td { border-bottom: none; }

/* ── TECHNICAL SPECS — dimensions drawing ──────────────────────────────────
   Printed by soc_render_dimensions_group() (inc/measure-image.php): the attribute
   table and the drawing wrapped together. Base layout stacks them. */
.soc-techspecs { display: block; }

.soc-measures {
  margin:      20px 0 0;
  padding-top: 16px;
  border-top:  .5px solid var(--c-border-xlight);
}

/* Drawing with no attribute table above it — the rule would separate nothing. */
.soc-measures:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.soc-measures__img {
  display:       block;
  width:         100%;
  height:        auto;
  background:    var(--c-bg-alt);
  border-radius: var(--r);
}

/* Shipping / Returns tier tables */
.soc-delivery-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.soc-delivery-table th {
    text-align: left; padding: 6px 0; border-bottom: 1px solid var(--c-border);
    font-size: 11px; font-weight: 500; letter-spacing: .05em;
    color: var(--c-text);
}
.soc-delivery-table td { padding: 7px 0; border-bottom: 1px solid var(--c-border-light); color: var(--c-text-muted); font-size: 13px; }
.soc-delivery-table th:last-child,
.soc-delivery-table td:last-child { text-align: right; }
.soc-delivery-table tr:last-child td { border-bottom: none; }
.soc-tab-policy { font-size: 13px; color: var(--c-text-muted); margin-bottom: 16px; line-height: 1.6; }

.soc-accordion__content p { margin-bottom: var(--sp-3); }
.soc-accordion__content h2,
.soc-accordion__content h3 {
  font-size:     14px;
  font-weight:   var(--fw-medium);
  margin-bottom: var(--sp-2);
  color:         var(--c-text);
}

/* ── RELATED PRODUCTS + RECENTLY VIEWED ── */
.related.products,
.upsells.products,
.soc-recently-viewed {
  grid-column: 1 / -1;
  margin-top:  72px;
  padding-top: 56px;
  border-top:  .5px solid var(--c-border-light);
  position:    relative;
  z-index:     2;
}

.related.products > h2,
.upsells.products > h2,
.soc-recently-viewed > h2 {
  font-family:    var(--font-display) !important;
  font-size:      22px !important;
  font-weight:    var(--fw-bold) !important;
  letter-spacing: var(--tracking-display) !important;
  margin-bottom:  var(--sp-6) !important;
  color:          var(--c-text) !important;
}

.related.products ul.products,
.upsells.products ul.products,
.soc-recently-viewed ul.products {
  grid-template-columns: repeat(2, 1fr) !important;
}

@media (min-width: 640px) {
  .related.products ul.products,
  .upsells.products ul.products,
  .soc-recently-viewed ul.products {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Breadcrumb desktop: visible above the gallery */
.soc-bc-top  { display: block; }
.soc-bc-bottom { display: none; }

/* ── RESPONSIVE — MOBILE ── */
@media (max-width: 767px) {

  /* Keep container padding — avoid overflow:hidden that breaks position:fixed on iOS */
  .soc-product-wrap { padding-top: 0 !important; padding-bottom: 40px; }

  /* (Cantos retos no topo removidos com o header transparente — cantos arredondados normais.) */

  /* Breadcrumb: hide the top one, show the summary one */
  .soc-bc-top    { display: none !important; }
  .soc-bc-bottom { display: block; margin-bottom: 16px; }

  /* Galeria full-width via negative margins (sem overflow:hidden) */
  .woocommerce div.product div.images {
    margin-left:  calc(-1 * var(--pad-mobile));
    margin-right: calc(-1 * var(--pad-mobile));
    width:        calc(100% + 2 * var(--pad-mobile));
    position:     relative;
    touch-action: pan-y;
  }

  /* Topo reto na galeria mobile (fundo mantém --r-lg) — encosta limpo ao header.
     Seletor SEM body.soc-pdp: a classe .woocommerce está no <body>, logo
     "body.soc-pdp .woocommerce" exigia um .woocommerce descendente (que não existe). */
  .woocommerce div.product div.images .soc-gallery-viewport,
  .woocommerce div.product div.images .woocommerce-product-gallery__image,
  .woocommerce div.product div.images .woocommerce-product-gallery__image img {
    border-top-left-radius:  0 !important;
    border-top-right-radius: 0 !important;
  }

  /* Scroll nativo com snap — substitui o FlexSlider.
     width:100vw é crítico: sem ele o contentor cresce para caber o wrapper
     (clientWidth == scrollWidth) e deixa de haver scroll.
     height em vw e não aspect-ratio — o iOS Safari real não respeita
     aspect-ratio em filhos de flex. */
  .woocommerce div.product div.images .soc-gallery-viewport {
    width:                      100vw;
    max-width:                  100vw;
    overflow-x:                 auto;
    overflow-y:                 hidden;
    height:                     125vw;
    scroll-snap-type:           x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width:            none;
    -ms-overflow-style:         none;
  }
  .woocommerce div.product div.images .soc-gallery-viewport::-webkit-scrollbar { display: none; }

  .woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
    display:   flex;
    flex-wrap: nowrap;
    width:     max-content;
    height:    100%;
  }

  .woocommerce div.product div.images .woocommerce-product-gallery__image {
    flex:             0 0 100vw;
    width:            100vw;
    height:           125vw;
    scroll-snap-align: start;
    overflow:         hidden;
    margin:           0;
  }

  .woocommerce div.product div.images .woocommerce-product-gallery__image img {
    width:        100%;
    height:       100%;
    object-fit:   cover;
    aspect-ratio: auto;
  }

  /* Progress bar (mobile gallery) */
  .soc-gallery-progress {
    position:       absolute;
    bottom:         14px;
    left:           16px;
    right:          16px;
    height:         3px;
    background:     rgba(255, 255, 255, .4);
    z-index:        4;
    pointer-events: none;
  border-radius: 999px;
}

  .soc-gallery-progress__fill {
    position:   absolute;
    top:        0;
    left:       var(--x, 0%);
    width:      var(--w, 33.33%);
    height:     100%;
    background: var(--c-white);
    transition: left .3s cubic-bezier(.4, 0, .2, 1);
  border-radius: 999px;
}

  /* Typography mobile */
  .soc-product-collection { font-size: 21px; margin-bottom: 4px; }

  .woocommerce div.product .product_title {
    font-size:     21px !important;
    margin-bottom: 4px !important;
  }

  body.soc-has-collection div.product .product_title {
    font-size:     13.5px !important;
    margin-bottom: 10px !important;
  }

  .soc-product-ref { margin-bottom: 12px; }
  .soc-product-rating { margin-bottom: 16px; }

  .woocommerce div.product p.price,
  .woocommerce div.product span.price {
    font-size:     22px !important;
    margin-bottom: 3px !important;
  }

  .woocommerce div.product form.cart { gap: 8px; padding-top: 18px; }

  .woocommerce div.product form.cart .variations td,
  .woocommerce div.product form.cart .variations th { font-size: 10px !important; }

  .woocommerce div.product form.cart .variations td.label label { text-align: left !important; }
  .woocommerce div.product form.cart .variations td.value { display: flex !important; flex-direction: column !important; align-items: flex-start !important; }
  .woocommerce div.product form.cart .variations select { width: 100% !important; }

  .woocommerce div.product form.cart .single_add_to_cart_button {
    font-size: 11px !important;
    padding:   13px 16px !important;
  }

  .soc-delivery-info { padding: 12px 16px; }
  .soc-delivery-info svg { width: 13px !important; height: 13px !important; }
  .soc-delivery-info strong { font-size: 10px; }
  .soc-delivery-info span   { font-size: 10px; }

  .soc-accordion__trigger { font-size: 11px; padding: 13px 0; }
  .soc-accordion__icon    { font-size: 15px; }
  .soc-attr-table         { font-size: 11px; }

  .related.products,
  .upsells.products,
  .soc-recently-viewed { margin-top: 48px; padding-top: 32px; }
}

/* ── RESPONSIVE — TABLET ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .woocommerce div.product .product_title { font-size: 22px !important; }
  .soc-product-collection { font-size: 22px; }
  body.soc-has-collection div.product .product_title { font-size: 14px !important; }

  .woocommerce div.product p.price,
  .woocommerce div.product span.price { font-size: 24px !important; }

  .soc-product-financing { font-size: 10px; }

  .woocommerce div.product form.cart .variations td,
  .woocommerce div.product form.cart .variations th { font-size: 10px !important; }

  .woocommerce div.product form.cart .single_add_to_cart_button {
    font-size: 11px !important;
    padding:   13px 16px !important;
  }

  .soc-wishlist-btn--product { width: 46px; }

  .soc-delivery-info { padding: 12px 16px; }
  .soc-delivery-info svg { width: 13px !important; height: 13px !important; }
  .soc-delivery-info strong { font-size: 10px; }
  .soc-delivery-info span   { font-size: 10px; }

  .soc-accordion__trigger { font-size: 11px; padding: 12px 0; }

  .related.products ul.products,
  .upsells.products ul.products,
  .soc-recently-viewed ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ── COMPLETE THE LOOK ── */
.soc-complete {
  margin-top:  var(--sp-6);
  padding-top: var(--sp-6);
  border-top:  .5px solid var(--c-border-light);
}

.soc-complete__title {
  font-size:      10px;
  font-weight:    var(--fw-medium);
  letter-spacing: .1em;
  color:          var(--c-text-light);
  text-transform: uppercase;
  margin-bottom:  var(--sp-4);
}

.soc-complete__grid {
  display:           flex;
  gap:               var(--sp-3);
  overflow-x:        scroll;
  scroll-snap-type:  x mandatory;
  scrollbar-width:   none;
  -ms-overflow-style: none;
}

.soc-complete__grid::-webkit-scrollbar { display: none; }
.soc-complete__item {
  flex:              0 0 calc(50% - var(--sp-3) / 2);
  scroll-snap-align: start;
  position:          relative;
}

/* ── Fatia do card seguinte, em desktop ────────────────────────────────────
   Sem setas, é a fatia que diz que há mais para lá da margem. Exactamente 2
   cards por ecrã não deixavam ver nada — a terceira ficava fora, e a fila
   parecia completa.

   `flex: 1 0` e não `0 0`: com apenas dois upsells os cards crescem e enchem a
   linha, em vez de deixarem um vazio à direita a fingir que há mais. Com três
   ou mais, não cabem, não crescem, e a fatia aparece.
   Mesma fórmula dos carrosséis da homepage: (100% − (N−1)·gap) / N. */
@media (min-width: 1024px) {
  .soc-complete__item {
    flex:      1 0 calc((100% - 1.2 * var(--sp-3)) / 2.2);
    max-width: none;
  }
}

/* B3e — `__card`, `__img`, `__name` e `__price` deixaram de ser emitidos: o
   interior do modulo passou a ser o card partilhado. `__grid`, `__item` e
   `__progress` ficam — sao o carrossel, e o `__item` e o nome de que o
   drag-scroll depende. */

/* Active hover image inside the module */
@media (hover: hover) {
  .soc-complete__item:hover .soc-card-hover-img { opacity: 1; }
}

.soc-complete__progress {
  margin-top: var(--sp-4);
  position:   relative;
  height:     3px;
  background: var(--c-bg-alt);
  border-radius: 999px;
}

.soc-complete__progress-fill {
  position:   absolute;
  top:        0;
  left:       var(--x, 0%);
  width:      var(--w, 66.67%);
  height:     100%;
  background: var(--c-brand);
  transition: left .3s cubic-bezier(.4, 0, .2, 1);
  border-radius: 999px;
}

/* Promotional badge over the individual product gallery */
.soc-product-gallery-badge {
  position:     absolute;
  top:          12px;
  left:         12px;
  z-index:      5;
}

/* ── LIGHTBOX ─────────────────────────────────────────────── */
.soc-lightbox {
  position:        fixed;
  inset:           0;
  z-index:         100000;
  /* The browser must not scroll anything while a finger is on the lightbox. The
     touch handlers are passive and cannot preventDefault, so without this a swipe
     between photos also dragged the page underneath. Pinch-to-zoom is implemented
     in JS here, so nothing is lost by taking the native gestures away. */
  touch-action:    none;
  overscroll-behavior: contain;
  background:      var(--c-bg);
  display:         flex;
  align-items:     center;
  justify-content: center;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity var(--t-base);
}

.soc-lightbox.is-open {
  opacity:        1;
  pointer-events: auto;
}

.soc-lightbox__close {
  position:        absolute;
  top:             20px;
  right:           20px;
  width:           40px;
  height:          40px;
  background:      none;
  border:          none;
  cursor:          pointer;
  color:           var(--c-text-muted);
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      color var(--t-fast);
  z-index:         1;
}
.soc-lightbox__close:hover { color: var(--c-text); }

.soc-lightbox__prev,
.soc-lightbox__next {
  position:        absolute;
  top:             50%;
  transform:       translateY(-50%);
  width:           48px;
  height:          48px;
  background:      none;
  border:          none;
  cursor:          pointer;
  color:           var(--c-text-light);
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      color var(--t-fast);
  z-index:         1;
}
.soc-lightbox__prev { left: 12px; }
.soc-lightbox__next { right: 12px; }
.soc-lightbox__prev:hover,
.soc-lightbox__next:hover { color: var(--c-text); }

.soc-lightbox__img-wrap {
  max-width:  90vw;
  max-height: calc(100vh - 120px);
  display:    flex;
}

.soc-lightbox__img {
  max-width:  90vw;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  display:    block;
  cursor:     zoom-in;
  user-select: none;
  -webkit-user-select: none;
  transition: transform var(--t-fast);
}

.soc-lightbox__progress {
  position:   absolute;
  bottom:     28px;
  left:       40px;
  right:      40px;
  height:     3px;
  background: var(--c-bg-alt);
  z-index:    1;
  border-radius: 999px;
  overflow:   hidden;
}

.soc-lightbox__progress-fill {
  position:   absolute;
  top:        0;
  left:       var(--x, 0%);
  width:      var(--w, 33.33%);
  height:     100%;
  background: var(--c-brand);
  transition: left .3s cubic-bezier(.4, 0, .2, 1);
  border-radius: 999px;
}

@media (max-width: 767px) {
  .soc-lightbox__img-wrap {
    max-width:  100vw;
    max-height: calc(100svh - 100px);
  }
  .soc-lightbox__img {
    max-width:  100vw;
    max-height: calc(100svh - 100px);
  }
  /* Sem setas em mobile — usa-se swipe + progress bar (setas redundantes) */
  .soc-lightbox__prev,
  .soc-lightbox__next { display: none !important; }
}

/* ── SLIDER (Related + Recently Viewed) on mobile/tablet ── */
@media (max-width: 1023px) {
  /* Contain the scroll — without this the ul expands the page */
  .related.products,
  .upsells.products,
  .soc-recently-viewed {
    overflow: hidden;
  }

  .related.products ul.products,
  .upsells.products ul.products,
  .soc-recently-viewed ul.products {
    display:                    flex !important;
    grid-template-columns:      none !important;
    flex-wrap:                  nowrap !important;
    width:                      100% !important;
    overflow-x:                 scroll !important;
    scroll-snap-type:           x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width:            none !important;
    -ms-overflow-style:         none !important;
    gap:                        12px !important;
  }

  .related.products ul.products::-webkit-scrollbar,
  .upsells.products ul.products::-webkit-scrollbar,
  .soc-recently-viewed ul.products::-webkit-scrollbar { display: none !important; }

  /* Snap every 2: snappoint only on odd items */
  .related.products ul.products li.product:nth-child(odd),
  .upsells.products ul.products li.product:nth-child(odd),
  .soc-recently-viewed ul.products li.product:nth-child(odd) {
    scroll-snap-align: start;
  }

  .related.products ul.products li.product,
  .upsells.products ul.products li.product,
  .soc-recently-viewed ul.products li.product {
    flex:   0 0 calc(50% - 6px) !important;
    width:  calc(50% - 6px) !important;
    margin: 0 !important;
  }
}

/* Progress bar do slider (Related + Recently Viewed) */
.soc-slider-progress {
  margin-top: var(--sp-4);
  position:   relative;
  height:     3px;
  background: var(--c-bg-alt);
  border-radius: 999px;
}

.soc-slider-progress__fill {
  position:   absolute;
  top:        0;
  left:       var(--x, 0%);
  width:      var(--w, 50%);
  height:     100%;
  background: var(--c-brand);
  transition: left .3s cubic-bezier(.4, 0, .2, 1);
  border-radius: 999px;
}


/* ══════════════════════════════════════════════════════════════════════════
   VÍDEO NA GALERIA
   A célula é uma das outras: mesma proporção, mesmos cantos, mesmo lugar na
   grelha. Só o conteúdo muda — por isso as regras aqui espelham as do <img>,
   que não se aplicam a um <video>.
   ══════════════════════════════════════════════════════════════════════════ */

.woocommerce div.product div.images .soc-gal-video > a {
  display:  block;
  position: relative;
  width:    100%;
  height:   100%;
}

.woocommerce div.product div.images .soc-gal-video__el {
  width:         100% !important;
  height:        100% !important;
  object-fit:    cover !important;
  display:       block !important;
  background:    var(--c-bg-alt);
  border-radius: var(--r-lg) !important;
  cursor:        pointer;
}

@media (min-width: 768px) {
  .woocommerce div.product div.images .soc-gal-video__el {
    aspect-ratio: 4 / 5 !important;
  }
}

@media (max-width: 767px) {
  /* Topo reto, como nas fotografias, para encostar limpo ao header. */
  .woocommerce div.product div.images .soc-gal-video__el {
    aspect-ratio:            auto !important;
    border-top-left-radius:  0 !important;
    border-top-right-radius: 0 !important;
  }
}

.soc-gal-video__badge {
  position:      absolute;
  top:           12px;
  left:          12px;
  z-index:       3;
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  height:        26px;
  padding:       0 11px;
  border-radius: var(--r-pill);
  background:    rgba(7, 43, 51, .82);
  color:         var(--c-white);
  font-size:     11px;
  font-weight:   var(--fw-semibold);
  letter-spacing:.04em;
  pointer-events:none;
}

/* Quanto falta do clipe. Fina e branca: informa sem competir com a imagem. */
.soc-gal-video__bar {
  position:   absolute;
  left:       0;
  right:      0;
  bottom:     0;
  height:     3px;
  z-index:    3;
  background: rgba(255, 255, 255, .35);
  pointer-events: none;
}

.soc-gal-video__bar i {
  display:    block;
  height:     100%;
  width:      0;
  background: var(--c-white);
  transition: width .25s linear;
}

/* No lightbox o vídeo ocupa o lugar da fotografia, sem a cortar.
   Sem fundo próprio: um fundo escuro por baixo de um vídeo mais estreito do que
   a caixa desenha barras pretas dos dois lados. O que se vê à volta passa a ser
   o fundo da própria lightbox — as mesmas margens que uma fotografia vertical
   tem, e que ninguém repara. As medidas são as do `.soc-lightbox__img`, para o
   vídeo ocupar exactamente o mesmo espaço que a fotografia ocuparia. */
.soc-lightbox__video {
  display:       none;
  max-width:     90vw;
  max-height:    calc(100vh - 120px);
  width:         auto;
  height:        auto;
  align-self:    center;
  object-fit:    contain;
  border-radius: var(--r);
  background:    transparent;
}

@media (max-width: 767px) {
  .soc-lightbox__video {
    max-width:  100vw;
    max-height: calc(100svh - 100px);
  }
}

.soc-lightbox.is-video .soc-lightbox__img   { display: none; }
.soc-lightbox.is-video .soc-lightbox__video { display: block; }
