/*
 * El aspecto visual del botón lo controla WooCommerce/Divi mediante
 * las clases nativas: .button.alt
 * Este archivo solo añade separación y el icono opcional.
 */

.tcp-quote-button {
    margin-inline-start: 10px;
}

.tcp-quote-button--standalone {
    margin-block-start: 12px;
    margin-inline-start: 0;
}

/* Shortcode independiente: no hereda la separación lateral usada por la colocación automática antigua. */
.tdc-shortcode-quote-button {
    margin: 0 !important;
}

.tcp-icon {
    display: none;
    width: 1em;
    height: 1em;
    margin-inline-end: 0.4em;
    vertical-align: -0.12em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M19.11 17.2c-.29-.15-1.71-.84-1.98-.94-.27-.1-.47-.15-.67.15-.2.29-.77.94-.94 1.13-.17.2-.35.22-.64.07-.29-.15-1.23-.45-2.34-1.45-.86-.77-1.45-1.72-1.62-2.01-.17-.29-.02-.45.13-.59.13-.13.29-.35.44-.52.15-.17.2-.29.29-.49.1-.2.05-.37-.02-.52-.07-.15-.67-1.61-.91-2.21-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.79.37-.27.29-1.04 1.01-1.04 2.47s1.06 2.87 1.21 3.07c.15.2 2.09 3.19 5.06 4.47.71.31 1.26.49 1.69.63.71.23 1.36.2 1.87.12.57-.08 1.71-.7 1.96-1.38.24-.68.24-1.26.17-1.38-.07-.12-.27-.2-.57-.35M16.06 27.3h-.01a11.2 11.2 0 0 1-5.71-1.56l-.41-.24-4.25 1.11 1.13-4.14-.27-.43a11.18 11.18 0 0 1-1.72-5.97c0-6.18 5.03-11.21 11.22-11.21 3 0 5.82 1.17 7.94 3.29a11.15 11.15 0 0 1 3.28 7.94c0 6.18-5.03 11.21-11.2 11.21m9.54-20.75A13.42 13.42 0 0 0 16.05 2.6C8.62 2.6 2.58 8.64 2.58 16.07c0 2.37.62 4.68 1.79 6.72L2.47 29.7l7.08-1.86a13.43 13.43 0 0 0 6.5 1.65h.01c7.42 0 13.47-6.04 13.47-13.47 0-3.6-1.4-6.98-3.93-9.47'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M19.11 17.2c-.29-.15-1.71-.84-1.98-.94-.27-.1-.47-.15-.67.15-.2.29-.77.94-.94 1.13-.17.2-.35.22-.64.07-.29-.15-1.23-.45-2.34-1.45-.86-.77-1.45-1.72-1.62-2.01-.17-.29-.02-.45.13-.59.13-.13.29-.35.44-.52.15-.17.2-.29.29-.49.1-.2.05-.37-.02-.52-.07-.15-.67-1.61-.91-2.21-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.79.37-.27.29-1.04 1.01-1.04 2.47s1.06 2.87 1.21 3.07c.15.2 2.09 3.19 5.06 4.47.71.31 1.26.49 1.69.63.71.23 1.36.2 1.87.12.57-.08 1.71-.7 1.96-1.38.24-.68.24-1.26.17-1.38-.07-.12-.27-.2-.57-.35M16.06 27.3h-.01a11.2 11.2 0 0 1-5.71-1.56l-.41-.24-4.25 1.11 1.13-4.14-.27-.43a11.18 11.18 0 0 1-1.72-5.97c0-6.18 5.03-11.21 11.22-11.21 3 0 5.82 1.17 7.94 3.29a11.15 11.15 0 0 1 3.28 7.94c0 6.18-5.03 11.21-11.2 11.21m9.54-20.75A13.42 13.42 0 0 0 16.05 2.6C8.62 2.6 2.58 8.64 2.58 16.07c0 2.37.62 4.68 1.79 6.72L2.47 29.7l7.08-1.86a13.43 13.43 0 0 0 6.5 1.65h.01c7.42 0 13.47-6.04 13.47-13.47 0-3.6-1.4-6.98-3.93-9.47'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tcp-has-icon .tcp-icon {
    display: inline-block;
}

@media (max-width: 767px) {
    .tcp-quote-button {
        margin-block-start: 10px;
        margin-inline-start: 0;
    }
}

.tcp-pdf-button {
    margin-inline-start: 10px;
    display: inline-flex !important;
    align-items: center;
    gap: 0.4em;
}

.tcp-pdf-button--standalone {
    margin-block-start: 12px;
}

@media (max-width: 767px) {
    .tcp-pdf-button {
        margin-block-start: 10px;
        margin-inline-start: 0;
    }
}


/* Leyenda independiente de disponibilidad y entrega. Sólo afecta al shortcode [tdc_stock_message]. */
.tdc-stock-message {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

.tdc-stock-message__icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.tdc-stock-message__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tdc-stock-message__title {
    display: block;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.tdc-stock-message__text {
    display: block;
    margin-top: 3px;
    font-size: 16px;
    line-height: 1.35;
}

.tdc-stock-message--instock .tdc-stock-message__icon {
    background: #6fd51d;
}
.tdc-stock-message--instock .tdc-stock-message__icon::before {
    content: "✓";
}

.tdc-stock-message--onbackorder .tdc-stock-message__icon {
    background: #f59e0b;
}
.tdc-stock-message--onbackorder .tdc-stock-message__icon::before {
    content: "!";
}

.tdc-stock-message--outofstock .tdc-stock-message__icon {
    background: #dc2626;
}
.tdc-stock-message--outofstock .tdc-stock-message__icon::before {
    content: "×";
}

/* ==========================================================
   Alternativas técnicas para productos agotados
   Shortcode: [tdc_alternativas_disponibles]

   Responsive por ancho REAL del shortcode (container query):
   - Bloque ancho: hasta 4 tarjetas por fila.
   - Bloque medio: 2 tarjetas por fila.
   - Columna angosta / móvil: 1 tarjeta compacta por fila.
========================================================== */
.tdc-product-alternatives {
    width: 100%;
    max-width: 100%;
    margin: 24px 0 0;
    container-type: inline-size;
    container-name: tdc-alternatives;
}

.tdc-product-alternatives__header {
    margin-bottom: 16px;
}

.tdc-product-alternatives__header h3 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.2;
}

.tdc-product-alternatives__header p {
    margin: 0;
    line-height: 1.45;
}

/*
 * auto-fit evita que Divi pueda comprimir cuatro tarjetas dentro de una
 * columna estrecha. Si no caben 240px por tarjeta, bajan automáticamente.
 */
.tdc-product-alternatives__grid,
.tdc-product-alternatives__preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.tdc-alt-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.tdc-alt-card__image {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 12px;
    background: #fff;
    overflow: hidden;
}

.tdc-alt-card__image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain;
    margin: 0 !important;
}

.tdc-alt-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 14px;
}

.tdc-alt-card__badges,
.tdc-alt-card__matches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.tdc-alt-card__badges {
    margin-bottom: 9px;
}

.tdc-alt-card__badges span,
.tdc-alt-card__matches span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
}

.tdc-alt-card__stock {
    background: #ecfdf3;
    color: #15803d;
}

.tdc-alt-card__preferred {
    background: #fff1f2;
    color: #b91c1c;
}

.tdc-alt-card__score,
.tdc-alt-card__matches span {
    background: #f3f4f6;
    color: #374151;
}

.tdc-alt-card__title {
    margin: 0 0 9px;
    min-width: 0;
    font-size: 16px;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
}

.tdc-alt-card__title a {
    color: inherit;
    text-decoration: none;
    word-break: normal;
    overflow-wrap: break-word;
}

.tdc-alt-card__matches {
    margin: 0 0 12px;
}

.tdc-alt-card__price {
    margin: auto 0 12px;
    padding-top: 6px;
    font-size: 17px;
    font-weight: 700;
}

.tdc-alt-card__button {
    width: 100%;
    margin: 0 !important;
    text-align: center;
    white-space: normal;
}

.tdc-product-alternatives__preview-grid span {
    display: flex;
    min-height: 110px;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-weight: 700;
    text-align: center;
}

/*
 * Cuando el shortcode vive dentro de una de las columnas de Divi,
 * adaptamos el diseño al ancho del propio módulo, no al viewport.
 */
@container tdc-alternatives (max-width: 620px) {
    .tdc-product-alternatives__grid,
    .tdc-product-alternatives__preview-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tdc-alt-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
        align-items: stretch;
    }

    .tdc-alt-card__image {
        aspect-ratio: auto;
        min-height: 150px;
        padding: 8px;
    }

    .tdc-alt-card__body {
        padding: 12px;
    }

    .tdc-alt-card__title {
        font-size: 15px;
        line-height: 1.28;
    }

    .tdc-alt-card__badges span,
    .tdc-alt-card__matches span {
        font-size: 10px;
        padding: 3px 7px;
    }

    .tdc-alt-card__price {
        font-size: 16px;
    }
}

@container tdc-alternatives (min-width: 621px) and (max-width: 980px) {
    .tdc-product-alternatives__grid,
    .tdc-product-alternatives__preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Fallback para navegadores sin container queries. */
@media (max-width: 767px) {
    .tdc-product-alternatives {
        margin-top: 18px;
    }

    .tdc-product-alternatives__header h3 {
        font-size: 21px;
    }

    .tdc-product-alternatives__grid,
    .tdc-product-alternatives__preview-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tdc-alt-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: stretch;
    }

    .tdc-alt-card__image {
        aspect-ratio: auto;
        min-height: 145px;
        padding: 8px;
    }

    .tdc-alt-card__body {
        padding: 12px;
    }
}

@media (max-width: 380px) {
    .tdc-alt-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .tdc-alt-card__image {
        min-height: 132px;
        padding: 6px;
    }

    .tdc-alt-card__body {
        padding: 10px;
    }
}


/* v3.3.0 — Recomendaciones automáticas */
.tdc-related-products {
    width: 100%;
    max-width: 100%;
    margin: 30px 0 0;
    container-type: inline-size;
}
.tdc-related-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
    gap: 16px;
    width: 100%;
}
.tdc-related-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.tdc-related-card__image {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 10px;
}
.tdc-related-card__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    margin: 0 !important;
}
.tdc-related-card__title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.3;
}
.tdc-related-card__title a { color: inherit; text-decoration: none; }
.tdc-related-card__price { margin: auto 0 10px; font-weight: 700; }
.tdc-related-card__button { width: 100%; text-align: center; margin: 0 !important; }
@container (max-width: 560px) {
    .tdc-related-products__grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .tdc-related-card { padding: 10px; }
    .tdc-related-card__title { font-size: 14px; }
}


/* v3.3.1 — Controles de presentación para recomendaciones automáticas */
.tdc-product-similar.tdc-hide-image .tdc-alt-card__image,
.tdc-product-similar.tdc-hide-price .tdc-alt-card__price,
.tdc-product-similar.tdc-hide-button .tdc-alt-card__button,
.tdc-related-products.tdc-hide-image .tdc-related-card__image,
.tdc-related-products.tdc-hide-price .tdc-related-card__price,
.tdc-related-products.tdc-hide-button .tdc-related-card__button { display:none !important; }

.tdc-product-similar .tdc-product-alternatives__grid,
.tdc-related-products .tdc-related-products__grid { grid-template-columns: repeat(4, minmax(0,1fr)); }

.tdc-product-similar.tdc-cols-d-1 .tdc-product-alternatives__grid,
.tdc-related-products.tdc-cols-d-1 .tdc-related-products__grid { grid-template-columns:repeat(1,minmax(0,1fr)); }
.tdc-product-similar.tdc-cols-d-2 .tdc-product-alternatives__grid,
.tdc-related-products.tdc-cols-d-2 .tdc-related-products__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tdc-product-similar.tdc-cols-d-3 .tdc-product-alternatives__grid,
.tdc-related-products.tdc-cols-d-3 .tdc-related-products__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tdc-product-similar.tdc-cols-d-4 .tdc-product-alternatives__grid,
.tdc-related-products.tdc-cols-d-4 .tdc-related-products__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tdc-product-similar.tdc-cols-d-5 .tdc-product-alternatives__grid,
.tdc-related-products.tdc-cols-d-5 .tdc-related-products__grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.tdc-product-similar.tdc-cols-d-6 .tdc-product-alternatives__grid,
.tdc-related-products.tdc-cols-d-6 .tdc-related-products__grid { grid-template-columns:repeat(6,minmax(0,1fr)); }

/* Compacto: imagen más contenida y tarjetas visualmente más cercanas al catálogo. */
.tdc-related-products--compact .tdc-related-card { padding:10px; }
.tdc-related-products--compact .tdc-related-card__image {
    aspect-ratio: 4 / 3;
    max-height: 170px;
    margin-bottom:8px;
}
.tdc-related-products--compact .tdc-related-card__title { font-size:14px; line-height:1.3; margin-bottom:6px; }
.tdc-related-products--compact .tdc-related-card__price { margin:auto 0 8px; }

@media (max-width: 980px) {
    .tdc-product-similar.tdc-cols-t-1 .tdc-product-alternatives__grid,
    .tdc-related-products.tdc-cols-t-1 .tdc-related-products__grid { grid-template-columns:repeat(1,minmax(0,1fr)); }
    .tdc-product-similar.tdc-cols-t-2 .tdc-product-alternatives__grid,
    .tdc-related-products.tdc-cols-t-2 .tdc-related-products__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .tdc-product-similar.tdc-cols-t-3 .tdc-product-alternatives__grid,
    .tdc-related-products.tdc-cols-t-3 .tdc-related-products__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .tdc-product-similar.tdc-cols-t-4 .tdc-product-alternatives__grid,
    .tdc-related-products.tdc-cols-t-4 .tdc-related-products__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

@media (max-width: 767px) {
    .tdc-product-similar.tdc-cols-m-1 .tdc-product-alternatives__grid,
    .tdc-related-products.tdc-cols-m-1 .tdc-related-products__grid { grid-template-columns:repeat(1,minmax(0,1fr)) !important; }
    .tdc-product-similar.tdc-cols-m-2 .tdc-product-alternatives__grid,
    .tdc-related-products.tdc-cols-m-2 .tdc-related-products__grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
    .tdc-related-products--compact .tdc-related-card__image { max-height:140px; }
}


/* v3.3.2 — Recomendaciones con lenguaje visual del Catálogo web */
.tdc-recommendation-catalog-look {
    --tdc-rec-card-bg:#fff;
    --tdc-rec-text:#181818;
    --tdc-rec-muted:#666;
    --tdc-rec-border:#e5e7eb;
    --tdc-rec-btn-bg:#181818;
    --tdc-rec-btn-text:#fff;
    --tdc-rec-radius:14px;
    --tdc-rec-btn-radius:9px;
    --tdc-rec-shadow:0 10px 28px rgba(0,0,0,.06);
}
.tdc-recommendation-catalog-look .tdc-related-card,
.tdc-recommendation-catalog-look .tdc-alt-card {
    overflow:hidden;
    padding:0;
    background:var(--tdc-rec-card-bg) !important;
    border:1px solid var(--tdc-rec-border) !important;
    border-radius:var(--tdc-rec-radius) !important;
    box-shadow:var(--tdc-rec-shadow) !important;
    color:var(--tdc-rec-text);
}
.tdc-recommendation-catalog-look .tdc-related-card__image,
.tdc-recommendation-catalog-look .tdc-alt-card__image {
    aspect-ratio:1 / 1;
    max-height:none;
    margin:0;
    padding:12px;
    background:#fff;
    border:0;
    border-radius:0;
}
.tdc-recommendation-catalog-look .tdc-related-card__image img,
.tdc-recommendation-catalog-look .tdc-alt-card__image img {
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
}
.tdc-recommendation-catalog-look .tdc-related-card__title,
.tdc-recommendation-catalog-look .tdc-related-card__price {
    margin-left:16px;
    margin-right:16px;
}
.tdc-recommendation-catalog-look .tdc-related-card__title { margin-top:14px; color:var(--tdc-rec-text); }
.tdc-recommendation-catalog-look .tdc-related-card__price { color:var(--tdc-rec-text); }
.tdc-recommendation-catalog-look .tdc-related-card__button {
    width:auto !important;
    margin:0 16px 16px !important;
    border-radius:var(--tdc-rec-btn-radius) !important;
    background:var(--tdc-rec-btn-bg) !important;
    color:var(--tdc-rec-btn-text) !important;
    border:0 !important;
}
.tdc-recommendation-catalog-look .tdc-alt-card__body { padding:14px 16px 16px; }
.tdc-recommendation-catalog-look .tdc-alt-card__title { color:var(--tdc-rec-text); }
.tdc-recommendation-catalog-look .tdc-alt-card__price { color:var(--tdc-rec-text); }
.tdc-recommendation-catalog-look .tdc-alt-card__button {
    border-radius:var(--tdc-rec-btn-radius) !important;
    background:var(--tdc-rec-btn-bg) !important;
    color:var(--tdc-rec-btn-text) !important;
    border:0 !important;
}
@media (max-width:767px) {
    .tdc-recommendation-catalog-look .tdc-alt-card {
        display:flex;
        flex-direction:column;
    }
    .tdc-recommendation-catalog-look .tdc-alt-card__image {
        min-height:0;
        aspect-ratio:1 / 1;
    }
}


/* v3.4.0 — tres bloques técnicos por criterio */
.tdc-technical-group.tdc-hide-image .tdc-alt-card__image,
.tdc-technical-group.tdc-hide-price .tdc-alt-card__price,
.tdc-technical-group.tdc-hide-button .tdc-alt-card__button { display:none !important; }

.tdc-technical-group .tdc-product-alternatives__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tdc-technical-group.tdc-cols-d-1 .tdc-product-alternatives__grid { grid-template-columns:repeat(1,minmax(0,1fr)); }
.tdc-technical-group.tdc-cols-d-2 .tdc-product-alternatives__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tdc-technical-group.tdc-cols-d-3 .tdc-product-alternatives__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tdc-technical-group.tdc-cols-d-4 .tdc-product-alternatives__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tdc-technical-group.tdc-cols-d-5 .tdc-product-alternatives__grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.tdc-technical-group.tdc-cols-d-6 .tdc-product-alternatives__grid { grid-template-columns:repeat(6,minmax(0,1fr)); }

@media (max-width:980px) {
  .tdc-technical-group.tdc-cols-t-1 .tdc-product-alternatives__grid { grid-template-columns:repeat(1,minmax(0,1fr)); }
  .tdc-technical-group.tdc-cols-t-2 .tdc-product-alternatives__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tdc-technical-group.tdc-cols-t-3 .tdc-product-alternatives__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .tdc-technical-group.tdc-cols-t-4 .tdc-product-alternatives__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .tdc-technical-group.tdc-cols-m-1 .tdc-product-alternatives__grid { grid-template-columns:repeat(1,minmax(0,1fr)) !important; }
  .tdc-technical-group.tdc-cols-m-2 .tdc-product-alternatives__grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}


/* v3.4.2 — Alternativas similares con los mismos controles visuales de Recomendaciones técnicas */
.tdc-alternatives-configurable.tdc-hide-image .tdc-alt-card__image,
.tdc-alternatives-configurable.tdc-hide-price .tdc-alt-card__price,
.tdc-alternatives-configurable.tdc-hide-button .tdc-alt-card__button { display:none !important; }

.tdc-alternatives-configurable .tdc-product-alternatives__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tdc-alternatives-configurable.tdc-cols-d-1 .tdc-product-alternatives__grid { grid-template-columns:repeat(1,minmax(0,1fr)); }
.tdc-alternatives-configurable.tdc-cols-d-2 .tdc-product-alternatives__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tdc-alternatives-configurable.tdc-cols-d-3 .tdc-product-alternatives__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tdc-alternatives-configurable.tdc-cols-d-4 .tdc-product-alternatives__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tdc-alternatives-configurable.tdc-cols-d-5 .tdc-product-alternatives__grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.tdc-alternatives-configurable.tdc-cols-d-6 .tdc-product-alternatives__grid { grid-template-columns:repeat(6,minmax(0,1fr)); }

@media (max-width:980px) {
  .tdc-alternatives-configurable.tdc-cols-t-1 .tdc-product-alternatives__grid { grid-template-columns:repeat(1,minmax(0,1fr)); }
  .tdc-alternatives-configurable.tdc-cols-t-2 .tdc-product-alternatives__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tdc-alternatives-configurable.tdc-cols-t-3 .tdc-product-alternatives__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .tdc-alternatives-configurable.tdc-cols-t-4 .tdc-product-alternatives__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .tdc-alternatives-configurable.tdc-cols-m-1 .tdc-product-alternatives__grid { grid-template-columns:repeat(1,minmax(0,1fr)) !important; }
  .tdc-alternatives-configurable.tdc-cols-m-2 .tdc-product-alternatives__grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}

/* v3.4.4 · Iconos ligeros para atributos */
.tdc-attribute-icon{
    display:inline-flex;
    width:var(--tdc-attribute-icon-size,16px);
    height:var(--tdc-attribute-icon-size,16px);
    flex:0 0 var(--tdc-attribute-icon-size,16px);
    align-items:center;
    justify-content:center;
    margin-right:7px;
    color:var(--tdc-attribute-icon-color,#ef1b17);
    vertical-align:-2px;
}
.tdc-attribute-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* v3.4.5 · Blindaje de iconos dentro del Catálogo web contra estilos globales del tema/Divi */
.tdc-web-catalog .tdc-attribute-icon{
    display:inline-flex!important;
    width:var(--tdc-attribute-icon-size,16px)!important;
    height:var(--tdc-attribute-icon-size,16px)!important;
    min-width:var(--tdc-attribute-icon-size,16px)!important;
    max-width:var(--tdc-attribute-icon-size,16px)!important;
    min-height:var(--tdc-attribute-icon-size,16px)!important;
    max-height:var(--tdc-attribute-icon-size,16px)!important;
    flex:0 0 var(--tdc-attribute-icon-size,16px)!important;
    margin-right:7px!important;
    color:var(--tdc-attribute-icon-color,#ef1b17)!important;
    line-height:1!important;
    vertical-align:middle!important;
    overflow:visible!important;
}
.tdc-web-catalog .tdc-attribute-icon svg{
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:100%!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.8!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
}
.tdc-web-catalog .tdc-attribute-icon svg path,
.tdc-web-catalog .tdc-attribute-icon svg circle,
.tdc-web-catalog .tdc-attribute-icon svg line,
.tdc-web-catalog .tdc-attribute-icon svg polyline,
.tdc-web-catalog .tdc-attribute-icon svg polygon{
    fill:none!important;
    stroke:currentColor!important;
}

.woocommerce-product-attributes .woocommerce-product-attributes-item__label{display:flex;align-items:center;gap:0}
.woocommerce-product-attributes .woocommerce-product-attributes-item__label .tdc-attribute-label-text{display:inline-block}
.tdc-catalog-attribute-label{display:flex;align-items:center}
.tdc-catalog-attributes-list li,.tdc-catalog-attribute-chip{align-items:center}
.tdc-alt-card__matches > span{display:inline-flex;align-items:center}
.tdc-alt-card__matches .tdc-attribute-icon{margin-right:4px;width:13px;height:13px;flex-basis:13px}

/* v3.4.7 · Atributos del Catálogo web en una sola línea */
.tdc-web-catalog .tdc-catalog-attribute-row{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important}
.tdc-web-catalog .tdc-catalog-attribute-label{display:inline-flex!important;align-items:center!important;gap:0!important;white-space:nowrap!important;min-width:0!important}
.tdc-web-catalog .tdc-catalog-attribute-label .tdc-attribute-icon{margin-right:6px!important}
.tdc-web-catalog .tdc-catalog-attribute-value{margin-left:auto!important;white-space:nowrap!important;flex:0 0 auto!important}

/* v3.4.8 · Información adicional: etiquetas completas sin afectar Catálogo web */
.woocommerce-product-attributes{
    table-layout:auto!important;
    width:100%!important;
}
.woocommerce-product-attributes .woocommerce-product-attributes-item__label{
    display:table-cell!important;
    width:44%!important;
    min-width:180px!important;
    white-space:nowrap!important;
    vertical-align:middle!important;
}
.woocommerce-product-attributes .woocommerce-product-attributes-item__label .tdc-attribute-icon{
    display:inline-flex!important;
    vertical-align:middle!important;
    margin-right:7px!important;
}
.woocommerce-product-attributes .woocommerce-product-attributes-item__label .tdc-attribute-label-text{
    display:inline!important;
    white-space:nowrap!important;
}
.woocommerce-product-attributes .woocommerce-product-attributes-item__value{
    width:auto!important;
    vertical-align:middle!important;
}
@media (max-width:767px){
    .woocommerce-product-attributes .woocommerce-product-attributes-item__label{
        min-width:0!important;
        white-space:normal!important;
    }
    .woocommerce-product-attributes .woocommerce-product-attributes-item__label .tdc-attribute-label-text{
        white-space:normal!important;
    }
}

/* ==========================================================
   v3.4.13 — Recomendaciones seguras dentro de columnas Divi estrechas
   El ancho REAL del shortcode tiene prioridad sobre las columnas PC/Tablet.
   Evita tarjetas recortadas en la tercera columna de la ficha de producto.
========================================================== */
@container tdc-alternatives (max-width: 560px) {
    .tdc-product-alternatives.tdc-technical-group .tdc-product-alternatives__grid,
    .tdc-product-alternatives.tdc-alternatives-configurable .tdc-product-alternatives__grid,
    .tdc-product-alternatives .tdc-product-alternatives__preview-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    .tdc-product-alternatives .tdc-alt-card,
    .tdc-product-alternatives.tdc-recommendation-catalog-look .tdc-alt-card {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .tdc-product-alternatives .tdc-alt-card__image,
    .tdc-product-alternatives.tdc-recommendation-catalog-look .tdc-alt-card__image {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: 190px !important;
        aspect-ratio: 16 / 10 !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    .tdc-product-alternatives .tdc-alt-card__image img,
    .tdc-product-alternatives.tdc-recommendation-catalog-look .tdc-alt-card__image img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 170px !important;
        object-fit: contain !important;
    }

    .tdc-product-alternatives .tdc-alt-card__body,
    .tdc-product-alternatives.tdc-recommendation-catalog-look .tdc-alt-card__body {
        width: 100% !important;
        min-width: 0 !important;
        padding: 12px 14px 14px !important;
        box-sizing: border-box !important;
    }

    .tdc-product-alternatives .tdc-alt-card__title,
    .tdc-product-alternatives .tdc-alt-card__title a {
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    .tdc-product-alternatives .tdc-alt-card__badges,
    .tdc-product-alternatives .tdc-alt-card__matches {
        max-width: 100% !important;
    }

    .tdc-product-alternatives .tdc-alt-card__button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
