.deya-gvp-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 190px;
}

.deya-gvp-variation {
  width: 100%;
  min-height: 36px;
  font-size: 13px;
  line-height: 1.2;
}

.deya-gvp-price,
.deya-gvp-stock,
.deya-gvp-unavailable,
.deya-gvp-bundle-required,
.deya-gvp-simple-bundle small {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.9;
}

.deya-gvp-simple-bundle {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

.deya-gvp-promo-price del {
  opacity: 0.7;
  margin-right: 4px;
}

.deya-gvp-promo-price ins {
  text-decoration: none;
  font-weight: 700;
}

.deya-gvp-row--needs-selection .deya-gvp-variation {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.deya-gvp-notice {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.35;
}

.deya-gvp-notice--error { border: 1px solid #cc1818; }
.deya-gvp-notice--success { border: 1px solid #188038; }

.deya-gvp-promo-callout {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.72);
}

.deya-gvp-promo-condition {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
  opacity: 0.78;
}

.deya-gvp-cart-status { margin-bottom: 12px; }

.deya-gvp-bundle-summary {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 6px;
}

.deya-gvp-bundle-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 3px 0;
}

.deya-gvp-bundle-summary .deya-gvp-bundle-final {
  font-size: 1.08em;
}

.deya-gvp-bundle-state {
  display: block;
  margin-top: 6px;
  opacity: 0.78;
}

.deya-gvp-bundle-form .single_add_to_cart_button:disabled,
.deya-gvp-bundle-form .single_add_to_cart_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.deya-gvp-bundle-locked-qty small { opacity: 0.7; }

/* Sale badge: replica YayPricing y hereda sus colores/texto cuando el plugin está activo. */
.deya-gvp-sale-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  -webkit-backface-visibility: hidden;
  z-index: 99;
  pointer-events: none;
  border-style: solid;
  line-height: 1.2;
  border-radius: 5px;
  padding: 3.5px 9px;
  font-weight: 600;
  min-height: 30px;
  box-sizing: border-box;
  position: absolute;
  top: var(--wc-sale-badge-distance, 0.875rem);
  right: var(--wc-sale-badge-distance, 0.875rem);
  left: auto;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.wc-block-product-template .wc-block-product,
.wp-block-post-template .wp-block-post { position: relative; }

@media (max-width: 767px) {
  .deya-gvp-row { max-width: 160px; }
  .deya-gvp-variation { font-size: 12px; }
  .deya-gvp-bundle-summary > div { gap: 10px; }
}

/* === v0.4.1: bundle compacto en mini-cart / cart / checkout === */
.deya-gvp-bundle-cart-summary {
  min-width: 0;
  max-width: 100%;
  line-height: 1.35;
}

.deya-gvp-bundle-title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.deya-gvp-bundle-offer {
  display: inline-block;
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 600;
  opacity: .78;
}

.deya-gvp-bundle-components {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  gap: 3px;
  font-size: 12px;
  line-height: 1.3;
}

.deya-gvp-bundle-components li {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.deya-gvp-bundle-components li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.deya-gvp-bundle-components li small {
  flex: 0 0 auto;
  white-space: nowrap;
  opacity: .65;
}

.deya-gvp-bundle-cart-price del,
.deya-gvp-mini-bundle-price del {
  opacity: .55;
  font-weight: 400;
}

.deya-gvp-bundle-cart-price ins,
.deya-gvp-mini-bundle-price ins {
  text-decoration: none;
  font-weight: 700;
}

.deya-gvp-bundle-subtotal,
.deya-gvp-checkout-total {
  display: block;
  font-weight: 700;
}

.deya-gvp-bundle-saving {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  opacity: .65;
}

/* Mini cart / drawer: una sola tarjeta por bundle y sin desbordes. */
.woocommerce-mini-cart .deya-gvp-bundle-row,
.widget_shopping_cart .deya-gvp-bundle-row {
  min-width: 0;
}

.woocommerce-mini-cart .deya-gvp-bundle-row > a:not(.remove),
.widget_shopping_cart .deya-gvp-bundle-row > a:not(.remove) {
  min-width: 0;
  white-space: normal;
}

.woocommerce-mini-cart .deya-gvp-bundle-row .deya-gvp-bundle-cart-summary,
.widget_shopping_cart .deya-gvp-bundle-row .deya-gvp-bundle-cart-summary {
  width: 100%;
  max-width: 100%;
  white-space: normal;
}

.deya-gvp-mini-bundle-price {
  display: block;
  margin-top: 7px;
  white-space: normal;
}

/* Checkout: bundle agrupado en una sola línea visual. */
.woocommerce-checkout-review-order-table .deya-gvp-bundle-row .product-name {
  vertical-align: top;
}

.deya-gvp-checkout-bundle-price {
  display: none; /* el total correcto ya se pinta en la columna Subtotal */
}

@media (max-width: 767px) {
  .deya-gvp-bundle-components {
    font-size: 11px;
    gap: 2px;
  }

  .deya-gvp-bundle-offer {
    font-size: 11px;
  }

  .woocommerce-mini-cart .deya-gvp-bundle-row,
  .widget_shopping_cart .deya-gvp-bundle-row {
    padding-right: 18px;
  }

  .woocommerce-cart-form .deya-gvp-bundle-row .product-name,
  .woocommerce-checkout-review-order-table .deya-gvp-bundle-row .product-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

.woocommerce-mini-cart .deya-gvp-bundle-cart-summary,
.widget_shopping_cart .deya-gvp-bundle-cart-summary {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

.woocommerce-mini-cart .deya-gvp-bundle-title,
.widget_shopping_cart .deya-gvp-bundle-title {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* === v0.4.2: CTA/resumen del bundle siempre en columna === */
.deya-gvp-bundle-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin: 16px 0 0;
  clear: both;
  box-sizing: border-box;
}

.deya-gvp-bundle-actions .deya-gvp-bundle-summary {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  box-sizing: border-box;
}

.deya-gvp-bundle-summary-row,
.deya-gvp-bundle-summary > div {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px !important;
  width: 100%;
  min-width: 0;
  margin: 4px 0;
}

.deya-gvp-bundle-summary-row > span,
.deya-gvp-bundle-summary-row > del,
.deya-gvp-bundle-summary-row > strong {
  min-width: 0;
}

.deya-gvp-bundle-summary-row > del,
.deya-gvp-bundle-summary-row > strong {
  text-align: right;
  white-space: nowrap;
}

.deya-gvp-bundle-actions .single_add_to_cart_button {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
  white-space: normal;
  min-height: 52px;
  line-height: 1.25;
}

/* Si el theme fuerza el form.cart en fila, el bloque de acciones sigue ocupando
   una fila completa y no compite horizontalmente con el botón. */
.deya-gvp-bundle-form .deya-gvp-bundle-actions {
  flex: 1 0 100% !important;
}

@media (max-width: 600px) {
  .deya-gvp-bundle-actions {
    gap: 10px;
    margin-top: 12px;
  }

  .deya-gvp-bundle-actions .deya-gvp-bundle-summary {
    padding: 12px !important;
  }

  .deya-gvp-bundle-summary-row,
  .deya-gvp-bundle-summary > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    margin: 6px 0;
  }

  .deya-gvp-bundle-summary-row > del,
  .deya-gvp-bundle-summary-row > strong {
    text-align: left;
    white-space: normal;
  }

  .deya-gvp-bundle-state {
    margin-top: 8px;
    line-height: 1.35;
  }

  .deya-gvp-bundle-actions .single_add_to_cart_button {
    min-height: 50px;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* === v0.4.3: filas del bundle legibles / nombres sin cortes absurdos === */
/* El layout depende del ancho REAL del formulario, no del viewport completo. */
.deya-gvp-bundle-form {
  container-type: inline-size;
}

.deya-gvp-bundle-form table.woocommerce-grouped-product-list,
.deya-gvp-bundle-form table.group_table {
  width: 100% !important;
  table-layout: fixed !important;
}

/* Selector / estado incluido: ancho suficiente pero controlado. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__quantity {
  width: 132px !important;
  min-width: 118px !important;
  max-width: 148px !important;
  vertical-align: middle !important;
}

/* Nombre: debe quedarse con la mayor parte del espacio disponible. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
  width: auto !important;
  min-width: 0 !important;
  vertical-align: middle !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label label,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label a,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label span {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Si el theme coloca imagen + nombre dentro de la celda label, conserva imagen y
   deja que el texto use el resto sin convertirse en una columna de 2 letras. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label img {
  flex: 0 0 auto;
  max-width: 58px;
  height: auto;
}

/* El rango de precio nunca debe robar media tabla. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
  width: 154px !important;
  min-width: 138px !important;
  max-width: 170px !important;
  vertical-align: middle !important;
  white-space: normal !important;
  text-align: right;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price .price,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price del,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price ins {
  white-space: normal !important;
}

/* El selector nunca se sale de su celda. */
.deya-gvp-bundle-form .deya-gvp-row,
.deya-gvp-bundle-form .deya-gvp-simple-bundle {
  width: 100%;
  max-width: 132px;
  min-width: 0;
}

/* Panel angosto: selector + nombre arriba, precio abajo a todo el ancho.
   Esto funciona incluso en desktop cuando la ficha ocupa solo media pantalla. */
@container (max-width: 580px) {
  .deya-gvp-bundle-form table.woocommerce-grouped-product-list,
  .deya-gvp-bundle-form table.group_table,
  .deya-gvp-bundle-form table.woocommerce-grouped-product-list tbody,
  .deya-gvp-bundle-form table.group_table tbody {
    display: block !important;
    width: 100% !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
    display: grid !important;
    grid-template-columns: minmax(112px, 132px) minmax(0, 1fr) !important;
    grid-template-areas:
      "qty label"
      "price price" !important;
    column-gap: 14px !important;
    row-gap: 8px !important;
    width: 100% !important;
    align-items: center !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    box-sizing: border-box;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__quantity {
    grid-area: qty;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
    grid-area: label;
    width: 100% !important;
    min-width: 0 !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
    grid-area: price;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: left !important;
    padding-top: 4px !important;
  }

  .deya-gvp-bundle-form .deya-gvp-row,
  .deya-gvp-bundle-form .deya-gvp-simple-bundle {
    max-width: none !important;
  }
}

/* Muy angosto: todo en columna, pero la imagen/nombre siguen legibles. */
@container (max-width: 390px) {
  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "label"
      "qty"
      "price" !important;
    row-gap: 9px !important;
  }
}

/* === v0.4.4: filas compactas del bundle ===
   En modo bundle el precio exacto ya vive junto al selector/estado. Ocultamos
   la columna de rango de Woo para evitar información duplicada y alturas enormes. */
.deya-gvp-bundle-form table.woocommerce-grouped-product-list,
.deya-gvp-bundle-form table.group_table,
.deya-gvp-bundle-form table.woocommerce-grouped-product-list tbody,
.deya-gvp-bundle-form table.group_table tbody {
  display: block !important;
  width: 100% !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(158px, 190px) !important;
  grid-template-areas: "label qty" !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 14px 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-sizing: border-box;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item:last-child {
  border-bottom: 0;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item > td {
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Imagen + nombre juntos. El theme ya inyecta el thumbnail en esta celda. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
  grid-area: label !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  line-height: 1.3 !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label img {
  display: block !important;
  width: 56px !important;
  max-width: 56px !important;
  height: 56px !important;
  object-fit: contain !important;
  margin: 0 !important;
  flex: 0 0 56px !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label label,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label a,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label span {
  min-width: 0 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}

/* Selector/Incluido + precio exacto en un único bloque compacto. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__quantity {
  grid-area: qty !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  text-align: left !important;
}

.deya-gvp-bundle-form .deya-gvp-row,
.deya-gvp-bundle-form .deya-gvp-simple-bundle {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  gap: 4px !important;
}

.deya-gvp-bundle-form .deya-gvp-variation {
  width: 100% !important;
  margin: 0 !important;
}

.deya-gvp-bundle-form .deya-gvp-bundle-required,
.deya-gvp-bundle-form .deya-gvp-price,
.deya-gvp-bundle-form .deya-gvp-stock,
.deya-gvp-bundle-form .deya-gvp-compact-price {
  margin: 0 !important;
  line-height: 1.25 !important;
}

.deya-gvp-bundle-form .deya-gvp-included-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.deya-gvp-bundle-form .deya-gvp-included-line small {
  opacity: .7;
}

.deya-gvp-bundle-form .deya-gvp-compact-price {
  display: block;
  font-size: 13px;
}

/* En bundle no necesitamos el rango duplicado de Woo: ya enseñamos el precio
   exacto seleccionado dentro del control y el resumen total abajo. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
  display: none !important;
}

/* Evita espacios heredados del theme alrededor de filas/celdas. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item p,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item figure {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* En paneles estrechos, apila solo la información de la fila; sigue siendo compacta. */
@container (max-width: 430px) {
  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "label"
      "qty" !important;
    gap: 8px !important;
    padding: 12px 0 !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label img {
    width: 50px !important;
    max-width: 50px !important;
    height: 50px !important;
    flex-basis: 50px !important;
  }
}

/* === v0.4.5: bundle rows for narrow product-summary column ===
   The DEYA product page renders the bundle inside a narrow right column (~320-360px).
   We therefore stop pretending the row has desktop width and render each item as a compact
   vertical card: product brief first, control/price underneath. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
  display: block !important;
  width: 100% !important;
  padding: 12px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item > td {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
}

.deya-gvp-product-brief {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.deya-gvp-product-thumb {
  flex: 0 0 54px !important;
  width: 54px !important;
  line-height: 0;
}

.deya-gvp-product-thumb img,
.deya-gvp-product-thumb .attachment-woocommerce_thumbnail {
  display: block !important;
  width: 54px !important;
  max-width: 54px !important;
  height: 54px !important;
  object-fit: contain !important;
  margin: 0 !important;
}

.deya-gvp-product-text {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.deya-gvp-product-name {
  display: block !important;
  min-width: 0 !important;
  line-height: 1.3 !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  hyphens: none !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__quantity {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

.deya-gvp-bundle-form .deya-gvp-row,
.deya-gvp-bundle-form .deya-gvp-simple-bundle {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  gap: 4px !important;
}

.deya-gvp-bundle-form .deya-gvp-variation {
  width: 100% !important;
}

.deya-gvp-bundle-form .deya-gvp-price,
.deya-gvp-bundle-form .deya-gvp-compact-price,
.deya-gvp-bundle-form .deya-gvp-bundle-required,
.deya-gvp-bundle-form .deya-gvp-stock {
  display: block !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.deya-gvp-bundle-form .deya-gvp-simple-bundle .deya-gvp-included-line {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
}

/* Keep hiding Woo's separate range column in bundle mode. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
  display: none !important;
}

/* === v0.4.6: horizontal rows simplified for DEYA narrow product column === */
/* Remove duplicate thumbnails injected by the theme/other filters. Keep only our explicit thumb. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item img:not(.deya-gvp-product-thumb-img):not(.deya-gvp-bundle-thumb) {
  display: none !important;
}

/* Each row: product block on the left, controls on the right. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
  display: grid !important;
  grid-template-columns: 88px minmax(0, 1fr) !important;
  grid-template-areas: "label qty" !important;
  align-items: start !important;
  column-gap: 14px !important;
  row-gap: 0 !important;
  padding: 12px 0 !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
  grid-area: label !important;
  display: block !important;
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
  margin: 0 !important;
}

.deya-gvp-product-brief {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  text-align: center !important;
}

.deya-gvp-product-thumb {
  display: block !important;
  width: 54px !important;
  flex: 0 0 54px !important;
  line-height: 0 !important;
}

.deya-gvp-product-thumb-img,
.deya-gvp-product-thumb img {
  display: block !important;
  width: 54px !important;
  height: 54px !important;
  max-width: 54px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.deya-gvp-product-text,
.deya-gvp-product-name {
  display: block !important;
  width: 100% !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  text-align: center !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  hyphens: none !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__quantity {
  grid-area: qty !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Variable child: selector at left, exact price at right. */
.deya-gvp-bundle-form .deya-gvp-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "select price"
    "meta   price"
    "stock  stock" !important;
  column-gap: 12px !important;
  row-gap: 4px !important;
  align-items: start !important;
}

.deya-gvp-bundle-form .deya-gvp-variation {
  grid-area: select !important;
  width: 100% !important;
  min-width: 0 !important;
}

.deya-gvp-bundle-form .deya-gvp-bundle-required,
.deya-gvp-bundle-form .deya-gvp-included-line {
  grid-area: meta !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.deya-gvp-bundle-form .deya-gvp-price,
.deya-gvp-bundle-form .deya-gvp-compact-price {
  grid-area: price !important;
  display: block !important;
  margin: 0 !important;
  text-align: right !important;
  align-self: center !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.deya-gvp-bundle-form .deya-gvp-stock {
  grid-area: stock !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.deya-gvp-bundle-form .deya-gvp-simple-bundle {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "meta price" !important;
  column-gap: 12px !important;
  align-items: center !important;
}

.deya-gvp-bundle-form .deya-gvp-simple-bundle .deya-gvp-included-line {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
  display: none !important;
}

@media (max-width: 380px) {
  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
    grid-template-columns: 80px minmax(0, 1fr) !important;
    column-gap: 12px !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
  }

  .deya-gvp-product-thumb,
  .deya-gvp-product-thumb-img,
  .deya-gvp-product-thumb img {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
  }

  .deya-gvp-bundle-form .deya-gvp-row,
  .deya-gvp-bundle-form .deya-gvp-simple-bundle {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "select"
      "meta"
      "price"
      "stock" !important;
    row-gap: 4px !important;
  }

  .deya-gvp-bundle-form .deya-gvp-price,
  .deya-gvp-bundle-form .deya-gvp-compact-price {
    text-align: left !important;
  }
}

/* === v0.4.7: FINAL compact 3-column row; designed for the actual ~330px DEYA summary column === */
/* Reset prior experimental row layouts. */
.deya-gvp-bundle-form table.woocommerce-grouped-product-list,
.deya-gvp-bundle-form table.group_table,
.deya-gvp-bundle-form table.woocommerce-grouped-product-list tbody,
.deya-gvp-bundle-form table.group_table tbody {
  display: block !important;
  width: 100% !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
  display: grid !important;
  grid-template-columns: 78px minmax(105px, 1fr) minmax(82px, 96px) !important;
  grid-template-areas: "product control exactprice" !important;
  align-items: center !important;
  column-gap: 10px !important;
  row-gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 12px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
  box-sizing: border-box !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item:last-child {
  border-bottom: 0 !important;
}

/* Product: use the theme's ORIGINAL single thumbnail + name. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
  grid-area: product !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 78px !important;
  min-width: 0 !important;
  max-width: 78px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label img {
  display: block !important;
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label label,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label a,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label span {
  display: block !important;
  width: 100% !important;
  max-width: 78px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}

/* Quantity TD becomes transparent to the row grid, so its children can occupy control/price columns. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__quantity {
  display: contents !important;
}

.deya-gvp-bundle-form .deya-gvp-row,
.deya-gvp-bundle-form .deya-gvp-simple-bundle {
  display: contents !important;
}

.deya-gvp-bundle-form .deya-gvp-variation,
.deya-gvp-bundle-form .deya-gvp-included-line {
  grid-area: control !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  align-self: center !important;
}

.deya-gvp-bundle-form .deya-gvp-variation {
  min-height: 38px !important;
  padding-left: 8px !important;
  padding-right: 28px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.deya-gvp-bundle-form .deya-gvp-included-line {
  display: flex !important;
  justify-content: center !important;
  align-items: baseline !important;
  gap: 4px !important;
  font-size: 12px !important;
  text-align: center !important;
}

/* "Obligatorio · x1" was pure noise and caused the vertical-letter failure. */
.deya-gvp-bundle-form .deya-gvp-bundle-required {
  display: none !important;
}

.deya-gvp-bundle-form .deya-gvp-price,
.deya-gvp-bundle-form .deya-gvp-compact-price {
  grid-area: exactprice !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 96px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: center !important;
  text-align: right !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.deya-gvp-bundle-form .deya-gvp-price .deya-gvp-promo-price,
.deya-gvp-bundle-form .deya-gvp-compact-price .deya-gvp-promo-price {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 2px !important;
}

.deya-gvp-bundle-form .deya-gvp-price del,
.deya-gvp-bundle-form .deya-gvp-price ins,
.deya-gvp-bundle-form .deya-gvp-compact-price del,
.deya-gvp-bundle-form .deya-gvp-compact-price ins {
  display: block !important;
  margin: 0 !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

.deya-gvp-bundle-form .deya-gvp-stock {
  display: none !important;
}

/* Price-cell is removed by PHP in bundle mode; keep it hidden defensively. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
  display: none !important;
}

/* If previous custom thumbnail markup exists in cached HTML, suppress it. */
.deya-gvp-bundle-form .deya-gvp-product-brief .deya-gvp-product-thumb {
  display: none !important;
}

/* Ultra narrow: stay readable rather than squeezing letters vertically. */
@container (max-width: 300px) {
  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
    grid-template-columns: 68px minmax(100px, 1fr) !important;
    grid-template-areas:
      "product control"
      "product exactprice" !important;
    row-gap: 5px !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
    width: 68px !important;
    max-width: 68px !important;
  }

  .deya-gvp-bundle-form .deya-gvp-price,
  .deya-gvp-bundle-form .deya-gvp-compact-price {
    max-width: none !important;
    text-align: left !important;
  }

  .deya-gvp-bundle-form .deya-gvp-price .deya-gvp-promo-price,
  .deya-gvp-bundle-form .deya-gvp-compact-price .deya-gvp-promo-price {
    align-items: flex-start !important;
  }
}

/* === v0.4.8: stable native 3-column row ===
   DEYA uses a narrow product-summary column (~372px). Use the native Woo cells
   instead of flattening markup with display:contents:
   PRODUCT (image + name) | PRESENTATION/INCLUDED | EXACT PROMO PRICE. */
.deya-gvp-bundle-form table.woocommerce-grouped-product-list,
.deya-gvp-bundle-form table.group_table,
.deya-gvp-bundle-form table.woocommerce-grouped-product-list tbody,
.deya-gvp-bundle-form table.group_table tbody {
  display: block !important;
  width: 100% !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
  display: grid !important;
  grid-template-columns: 92px minmax(120px, 1fr) 94px !important;
  grid-template-areas: "product control price" !important;
  align-items: center !important;
  column-gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 12px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
  box-sizing: border-box !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item:last-child {
  border-bottom: 0 !important;
}

.deya-gvp-bundle-form .woocommerce-grouped-product-list-item > td {
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  vertical-align: middle !important;
}

/* PRODUCT: one explicit thumbnail, name underneath. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label {
  grid-area: product !important;
  display: block !important;
  width: 92px !important;
  min-width: 0 !important;
  max-width: 92px !important;
  text-align: center !important;
}

.deya-gvp-bundle-form .deya-gvp-product-brief {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.deya-gvp-bundle-form .deya-gvp-product-thumb {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  line-height: 0 !important;
  flex: 0 0 52px !important;
}

.deya-gvp-bundle-form .deya-gvp-product-thumb-img,
.deya-gvp-bundle-form .deya-gvp-product-thumb img {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  max-width: 52px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.deya-gvp-bundle-form .deya-gvp-product-text,
.deya-gvp-bundle-form .deya-gvp-product-name {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 92px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}

/* Suppress any extra image the theme may inject directly into the label. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label > img,
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label > a > img {
  display: none !important;
}
.deya-gvp-bundle-form .deya-gvp-product-thumb img {
  display: block !important;
}

/* CONTROL: selector or Included. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__quantity {
  grid-area: control !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  text-align: left !important;
}

.deya-gvp-bundle-form .deya-gvp-row,
.deya-gvp-bundle-form .deya-gvp-simple-bundle {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.deya-gvp-bundle-form .deya-gvp-variation {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 6px 28px 6px 8px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.deya-gvp-bundle-form .deya-gvp-bundle-required,
.deya-gvp-bundle-form .deya-gvp-stock {
  display: none !important;
}

.deya-gvp-bundle-form .deya-gvp-included-line {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

/* PRICE: native Woo price TD, exact selected variation only. */
.deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
  grid-area: price !important;
  display: block !important;
  width: 94px !important;
  min-width: 0 !important;
  max-width: 94px !important;
  text-align: right !important;
  white-space: normal !important;
}

.deya-gvp-bundle-form .deya-gvp-row-price {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  text-align: right !important;
}

.deya-gvp-bundle-form .deya-gvp-row-price .deya-gvp-promo-price {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 2px !important;
}

.deya-gvp-bundle-form .deya-gvp-row-price del,
.deya-gvp-bundle-form .deya-gvp-row-price ins {
  display: block !important;
  margin: 0 !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

@container (max-width: 345px) {
  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item {
    grid-template-columns: 82px minmax(105px, 1fr) 84px !important;
    column-gap: 6px !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__label,
  .deya-gvp-bundle-form .deya-gvp-product-name,
  .deya-gvp-bundle-form .deya-gvp-product-text {
    width: 82px !important;
    max-width: 82px !important;
  }

  .deya-gvp-bundle-form .woocommerce-grouped-product-list-item__price {
    width: 84px !important;
    max-width: 84px !important;
  }
}


/* === v0.4.9: nombres no clicables dentro de bundles promocionales === */
.deya-gvp-bundle-form .deya-gvp-product-name--static {
  color: inherit !important;
  text-decoration: none !important;
  cursor: default !important;
  pointer-events: none !important;
}


/* === v0.5.0: selector de variación móvil inline === */
.deya-gvp-mobile-picker {
  display: none;
}

@media (max-width: 767px) {
  /* Ocultamos únicamente la UI nativa; el select sigue en DOM como fuente de verdad. */
  .deya-gvp-bundle-form .deya-gvp-variation {
    display: none !important;
  }

  .deya-gvp-bundle-form .deya-gvp-mobile-picker {
    display: block;
    width: 100%;
    min-width: 0;
    position: relative;
  }

  .deya-gvp-mobile-picker__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,.22);
    border-radius: 0;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.2;
    text-align: left;
    box-sizing: border-box;
  }

  .deya-gvp-row--needs-selection .deya-gvp-mobile-picker__button {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  .deya-gvp-mobile-picker__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .deya-gvp-mobile-picker__chevron {
    flex: 0 0 auto;
    font-size: 16px;
    line-height: 1;
    transition: transform .15s ease;
  }

  .deya-gvp-mobile-picker.is-open .deya-gvp-mobile-picker__chevron {
    transform: rotate(180deg);
  }

  /* Menú IN FLOW: siempre aparece debajo y empuja las filas siguientes. */
  .deya-gvp-mobile-picker__menu {
    position: static !important;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
    border: 1px solid rgba(0,0,0,.18);
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.10);
    z-index: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }

  .deya-gvp-mobile-picker__menu[hidden] {
    display: none !important;
  }

  .deya-gvp-mobile-picker__option {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.25;
    text-align: left;
    box-sizing: border-box;
  }

  .deya-gvp-mobile-picker__option:last-child {
    border-bottom: 0;
  }

  .deya-gvp-mobile-picker__option.is-selected {
    font-weight: 700;
    background: rgba(0,0,0,.045);
  }

  .deya-gvp-mobile-picker__option:disabled {
    opacity: .45;
  }
}

/* === v0.5.1: mobile picker visual reset ===
   Smartic/DEYA aplica estilos globales agresivos a <button>. Este bloque gana
   especificidad y hace que el picker vuelva a verse como un selector, no como CTA. */
@media (max-width: 767px) {
  .woocommerce div.product form.cart.deya-gvp-bundle-form .deya-gvp-mobile-picker,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form .deya-gvp-mobile-picker {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .woocommerce div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 40px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 9px 11px !important;
    border: 1px solid #d7d7d7 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    background-image: none !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .woocommerce div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button:hover,
  .woocommerce div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button:focus,
  .woocommerce div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button:active,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button:hover,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button:focus,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__button:active {
    background: #fff !important;
    color: #111 !important;
    border-color: #bdbdbd !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .deya-gvp-row--needs-selection .deya-gvp-mobile-picker__button {
    outline: none !important;
    border-color: #bdbdbd !important;
  }

  .deya-gvp-mobile-picker__label {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    color: #111 !important;
    font: inherit !important;
    line-height: 1.2 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .deya-gvp-mobile-picker__chevron {
    display: block !important;
    flex: 0 0 auto !important;
    color: #555 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  }

  .woocommerce div.product form.cart.deya-gvp-bundle-form .deya-gvp-mobile-picker__menu,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form .deya-gvp-mobile-picker__menu {
    position: static !important;
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    border: 1px solid #d7d7d7 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
    z-index: auto !important;
  }

  .deya-gvp-mobile-picker__menu[hidden] {
    display: none !important;
  }

  .woocommerce div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__option,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__option {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    width: 100% !important;
    min-height: 40px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 9px 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
    opacity: 1 !important;
  }

  .woocommerce div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__option:hover,
  .woocommerce div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__option:focus,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__option:hover,
  .woocommerce-page div.product form.cart.deya-gvp-bundle-form button.deya-gvp-mobile-picker__option:focus {
    background: #f5f5f5 !important;
    color: #111 !important;
  }

  .deya-gvp-mobile-picker__option.is-selected {
    background: #f5f5f5 !important;
    color: #111 !important;
    font-weight: 600 !important;
  }
}
