/*
=========================================================
GLOBAL (NO TOCAR - BASE)
=========================================================
*/

/* Tipografía categorías */
.category-description h2 {
  font-size: 22px;
  margin-top: 25px;
  margin-bottom: 12px;
  font-weight: 600;
}
.category-description h3 {
  font-size: 18px;
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 600;
}
.category-description p,
.category-description li {
  font-size: 16px;
  line-height: 1.65;
}

/* Imagen flotante */
#category .cat-float-img {
  float: right;
  max-width: 360px;
  width: 45%;
  margin: 6px 0 12px 18px;
  border-radius: 10px;
}
@media (max-width: 768px) {
  #category .cat-float-img {
    float: none;
    width: 100%;
    margin: 12px auto;
  }
}

/*
=========================================================
PDP BASE
=========================================================
*/

#product .pdp-highlights {
  list-style: none;
  padding-left: 0;
}
#product .pdp-highlights li {
  padding-left: 26px;
  position: relative;
}
#product .pdp-highlights li:before {
  content: "✓";
  position: absolute;
  left: 0;
}

/*
=========================================================
🔥 VELUX CONFIGURADOR (LIMPIO Y DEFINITIVO)
=========================================================
*/

/* 🔹 TODOS LOS SELECTORES */
#product .product-variants-wrapper select,
#product .product-variants-wrapper .form-control {
  width: 100% !important;
  max-width: 100% !important;
}

/* 🔹 GRID FILAS */
#product .product-variants-wrapper .product-variants-item.row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}

/* Label */
#product .product-variants-wrapper label.form-control-label.col-3 {
  flex: 0 0 25% !important;
  max-width: 25% !important;
}

/* Contenido */
#product .product-variants-wrapper .attribute-list.col-9 {
  flex: 0 0 75% !important;
  max-width: 75% !important;
}

/* 🔹 MODELO */
#product .velux-model-selector select {
  width: 100% !important;
}

/* 🔹 COLOR HEADER */
#product #velux_selected_color {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;

  min-height: 42px;
  padding: 0.5rem 0.75rem;

  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;

  font-size: 14px;
}

/* 🔹 SWATCHES */
#product #group_42.color-group {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

#product #group_42 .check-shape.color {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* Espaciado */
#product #group_42 li {
  margin: 0 10px 10px 0;
}

/* Seleccionado */
#product #group_42 input:checked + .check-shape {
  border: 2.5px solid #C22333;
}

/*
=========================================================
📱 MOBILE
=========================================================
*/
@media (max-width: 768px) {

  #product .product-variants-wrapper .product-variants-item.row {
    flex-direction: column;
    align-items: stretch;
  }

  #product .product-variants-wrapper label.form-control-label.col-3 {
    width: 100%;
    max-width: 100%;
    margin-bottom: 6px;
  }

  #product .product-variants-wrapper .attribute-list.col-9 {
    width: 100%;
    max-width: 100%;
  }

  #product #group_42 .check-shape.color {
    width: 56px;
    height: 56px;
  }
}
/* =========================================
   VELUX CONFIGURADOR FIX TOTAL
   ========================================= */

/* Contenedor general */
.product-variants {
    width: 100%;
}

/* Cada bloque (modelo, tamaño, etc) */
.product-variants-item {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* Labels */
.product-variants-item .form-control-label {
    width: 120px;
    font-weight: 600;
}

/* Inputs y selects */
.product-variants-item .attribute-list {
    flex: 1;
}

/* TODOS los selects al mismo tamaño */
.product-variants select,
.product-variants input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 42px;
}

/* MODELO → igual que los demás */
.product-variants-item input[readonly] {
    width: 100% !important;
    height: 42px;
    background: #f5f5f5;
}

/* =========================
   GRID DE COLORES FULL WIDTH
   ========================= */

#group_42 {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)) !important;
    gap: 12px;
    width: 100%;
}

/* Cada color */
#group_42 li {
    width: 100%;
}

/* Cuadrado color */
#group_42 .color {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    display: block;
}

/* Hover */
#group_42 .color:hover {
    transform: scale(1.05);
    transition: 0.2s;
}

/* Seleccionado */
#group_42 input:checked + .color {
    outline: 2px solid #e30613;
}

/* QUITAR etiqueta duplicada de color */
.product-variants-item.color .form-control-label {
    display: none;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {

    .product-variants-item {
        flex-direction: column;
    }

    .product-variants-item .form-control-label {
        width: 100%;
        margin-bottom: 5px;
    }

    #group_42 {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)) !important;
        gap: 8px;
    }

    .product-variants select,
    .product-variants input[type="text"] {
        height: 44px;
    }
}
/* Modelo igual que los demás selects */
#product #velux-model-group .attribute-list.col-9 {
  position: relative;
}

#product #velux-model-select {
  width: 100% !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  line-height: 34px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
}
/* Wrapper del modelo */
#product #velux-model-group .attribute-list.col-9 {
  position: relative;
}

/* Select modelo */
#product #velux-model-group .attribute-list.col-9 {
  position: relative;
}

#product #velux-model-select {
  width: 100% !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  line-height: 34px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Quitar círculo interno del color seleccionado */
#product #group_42 .check-circle {
  display: none !important;
}

/* =========================================================
   VELUX – AJUSTE FINAL DEFINITIVO MODELO + COLOR DISPLAY
   ========================================================= */

/* Wrapper del select modelo */
#product .velux-model-select-wrap {
  position: relative !important;
}

/* Select modelo */
#product #velux-model-select {
  width: 100% !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  line-height: 34px !important;
  padding: 0 34px 0 12px !important;
  box-sizing: border-box !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  background-color: #fff !important;

  /* quitamos flecha nativa */
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
}

/* flecha fija limpia */
#product .velux-model-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 2px solid #222;
  border-bottom: 2px solid #222;
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 2;
}

/* IE/Edge viejo */
#product #velux-model-select::-ms-expand {
  display: none !important;
}

/* caja del color seleccionado al mismo alto exacto */
#product #velux_selected_color,
#product .velux-selected-color {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  line-height: 34px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #495057 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

/* quita cualquier círculo interno del color activo */
#product #group_42 .check-circle {
  display: none !important;
}
#velux-model-select{
  width:100%;
}

/* VELUX blackout - UI estable */
#velux-model-wrapper select.form-control-select,
#velux-model-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #222 50%),
    linear-gradient(135deg, #222 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

#velux-model-select::-ms-expand {
  display: none;
}

/* Valor seleccionado del color arriba, alineado como un campo */
.velux-current-color-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 400;
  line-height: 34px;
  min-height: 34px;
  color: #333;
}

/* compactar un poco el bloque de color para que respire mejor */
#group_42.color-group,
#group_42 {
  margin-top: 0;
}

/* ===== VELUX BLACKOUT UI ===== */

/* Modelo: mismo aspecto visual que un select del theme */
#velux-model-wrapper .velux-select-wrap {
  position: relative !important;
  width: 100% !important;
}

#velux-model-wrapper .velux-select-wrap::after {
  content: "";
  position: absolute !important;
  right: 9px !important;
  top: 50% !important;
  width: 0 !important;
  height: 0 !important;
  margin-top: -3px !important;
  border-left: 4px solid transparent !important;
  border-right: 4px solid transparent !important;
  border-top: 6px solid #222 !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

#velux-model-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  width: 100% !important;
  padding-right: 34px !important;
  background-image: none !important;
}

#velux-model-select::-ms-expand {
  display: none !important;
}

/* Campo visual del color seleccionado */
#group_42,
#group_42.color-group {
  margin-top: 0 !important;
}

.velux-current-color-label.form-control {
  display: block !important;
  width: 100% !important;
  min-height: 34px !important;
  line-height: 20px !important;
  padding: 6px 12px !important;
  margin-bottom: 12px !important;
  background: #fff !important;
  border: 1px solid #d6d6d6 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  color: #333 !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Separación correcta entre el falso campo y los swatches */
#velux-current-color-label + ul,
#velux-current-color-label + .color-group,
#velux-current-color-label + div {
  margin-top: 8px !important;
}

/* Fila color en formato vertical */
#group_42 {
  margin-top: 0 !important;
}

#group_42,
#group_42.color-group {
  margin-top: 0 !important;
}

#group_42 {
  display: flex !important;
  flex-wrap: wrap !important;
}

#group_42.closest-reset {
  display: block !important;
}

/* Reestructurar la fila completa del color */
.product-variants-item:has(#group_42) {
  align-items: flex-start !important;
}

.product-variants-item:has(#group_42) > .form-control-label {
  padding-top: 7px !important;
}

.product-variants-item:has(#group_42) > .attribute-list,
.product-variants-item:has(#group_42) > .col-9 {
  display: flex !important;
  flex-direction: column !important;
}

.velux-current-color-label.form-control {
  order: 1 !important;
}

#group_42,
#group_42.color-group,
.product-variants-item:has(#group_42) ul.color-group {
  order: 2 !important;
}