/* ---------------------------------------------------------------------------
   Module variant blocks (independent products) — product-page chip style.
   --------------------------------------------------------------------------- */
.pv-front-variants {
  margin: 1rem 0;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
}

.pv-variant-group {
  position: relative;
  border-bottom: 1px solid #e4e7ec;
  padding: 0 12px;
}

.pv-variant-group:last-child {
  border-bottom: none;
}

/* Accordion header: "Grupo: valor actual" + chevron. */
.pv-variant-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}

.pv-variant-summary::-webkit-details-marker {
  display: none;
}

.pv-variant-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}

.pv-variant-current {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.pv-variant-caret {
  margin-left: auto;
  font-size: 12px;
  color: #667085;
  transition: transform .15s ease;
}

.pv-variant-group[open] .pv-variant-caret {
  transform: rotate(180deg);
}

.pv-variant-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* hide the native scrollbar; navigation is via arrows */
  cursor: grab;
  user-select: none;
}

.pv-variant-options.pv-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.pv-variant-options.pv-dragging * {
  cursor: grabbing;
}

.pv-variant-options::-webkit-scrollbar {
  display: none;
}

/* ---------------------------------------------------------------------------
   Horizontal slider arrows (added by front-slider.js when the chips overflow).
   --------------------------------------------------------------------------- */
.pv-variant-slider {
  position: relative;
}

.pv-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #dcdfe3;
  border-radius: 50%;
  background: #fff;
  color: #344054;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  opacity: 0;
  transition: opacity .15s ease;
}

.pv-slider-prev {
  left: -8px;
}

.pv-slider-next {
  right: -8px;
}

.pv-variant-group:hover .pv-slider-arrow {
  opacity: 1;
}

.pv-variant-option {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 118px;
  min-height: 44px;
  padding: 0 10px;
  border: 1.2px solid #dcdfe3;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  text-align: left;
  text-decoration: none;
  line-height: 1.2;
  transition: border-color .15s ease, background .15s ease;
}

.pv-variant-group--color .pv-variant-option {
  min-width: 90px;
}

/* Mobile: chips sized so the next one peeks in, hinting the row scrolls. */
@media (max-width: 767px) {
  .pv-variant-option {
    width: 41%;
    min-width: 118px;
  }
}

/* Product wrapper while an AJAX variant navigation is loading. */
.pv-nav-loading {
  opacity: .5;
  pointer-events: none;
  transition: opacity .15s ease;
}

.pv-variant-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.pv-variant-name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.pv-variant-price {
  font-size: 11.5px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.3;
  white-space: nowrap;
}

.pv-variant-tag {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 500;
  padding: 3px 4px;
  border-radius: 4px;
  white-space: nowrap;
}

.pv-variant-tag--price {
  background: #dcdfe3;
  color: #354054;
  opacity: 0.8;
}

.pv-variant-tag--price-down {
  background: #CC0C39;
  color: #fff;
  opacity: 1;
}

.pv-variant-tag--price-up {
  background: #d3e585;
  color: #354054;
  opacity: 1;
}

.pv-variant-tag--included {
  background: #eef6f0;
  color: #1a7a4a;
}

.pv-variant-tag--oos {
  background: #fadbdd;
  color: #990405;
}

.pv-variant-option.datatext.pv-variant-oos {
  opacity: .75;
}

.pv-variant-option.datatext {
  cursor: pointer;
}

.pv-variant-option.datatext:hover {
  border-color: #344054;
}

.pv-variant-option.pv-variant-selected {
  border-color: #344054;
  background: #f2f9f5;
  cursor: default;
}

.pv-variant-option.pv-variant-disabled {
  opacity: .55;
  cursor: default;
}

/* Shown under the chips row while a disabled chip is hovered. Lives outside
   the scrolling row (which clips) so the whole sentence is readable. */
/* Band overlaying the bottom of the chips row while a disabled chip is hovered.
   Absolute, so it reserves no space; it sits outside `.pv-variant-options`
   because that row's `overflow-x: auto` would clip it.
   One band per group; front-slider.js moves its notch onto the hovered chip. */
.pv-variant-na {
  display: none;
  position: absolute;
  /* Hangs below the chips row: covers no chip and reserves no space.
     --pv-na-x is the hovered chip's centre, set by front-slider.js. */
  top: 100%;
  left: var(--pv-na-x, 50%);
  transform: translateX(-50%);
  z-index: 5;
  width: max-content;
  max-width: 100%;
  margin-top: -12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--color_font);
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.pv-variant-na::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--color_font);
}

.pv-variant-group:has(.pv-variant-disabled:hover) .pv-variant-na {
  display: block;
}

.pv-variant-check {
  position: absolute;
  top: -6px;
  right: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a7a4a;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  font-size: 9px;
  color: #fff;
}

/* ---------------------------------------------------------------------------
   Colour groups: same chip as the rest, with a small colour dot by the name.
   --------------------------------------------------------------------------- */
.pv-variant-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .15);
  vertical-align: middle;
}

/* ---------------------------------------------------------------------------
   Native PrestaShop combinations — restyled to match the chip look above.
   Only affects radio-style (text) attributes; color swatches and selects are
   left untouched.
   --------------------------------------------------------------------------- */
.product-variants > .product-variants-item {
  display: block;
  margin-bottom: .75rem;
}

.product-variants > .product-variants-item .control-label {
  display: block;
  width: 100%;
  flex: 0 0 100%;
  padding: 0;
  margin-bottom: .35rem;
  font-weight: 600;
  font-size: 14px;
}

.product-variants > .product-variants-item ul {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-variants > .product-variants-item li.input-container {
  float: none !important;
  margin: 0;
}

.product-variants > .product-variants-item li.input-container label {
  margin: 0;
}

.product-variants > .product-variants-item .input-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.product-variants > .product-variants-item .input-radio + .radio-label {
  display: inline-block;
  padding: .2rem .55rem;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  font-size: .8125rem;
  line-height: 1.3;
  color: #333;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.product-variants > .product-variants-item label:hover .radio-label {
  border-color: var(--color_font, #777);
  background: #f6f6f6;
}

.product-variants > .product-variants-item .input-radio:checked + .radio-label {
  border-color: var(--color_font, #2fb5d2);
  background: var(--color_font, #2fb5d2);
  color: #fff;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Popover / help icon next to the group label
   --------------------------------------------------------------------------- */
.pv-variant-help {
  position: relative;
}

.pv-variant-help-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: .5rem .65rem;
  border-radius: 4px;
  background: var(--color_font, #333);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, transform .15s, visibility .15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.pv-variant-help-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color_font, #333);
}

.pv-variant-help:hover .pv-variant-help-bubble,
.pv-variant-help:focus .pv-variant-help-bubble,
.pv-variant-help:focus-within .pv-variant-help-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
