.triwuu-pack-price-block {
    display: grid;
    gap: .35rem;
    color: #064f2f;
}

.triwuu-pack-product-count {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    width: fit-content;
    margin: .35rem 0 1rem;
    padding: .5rem .9rem .5rem .55rem;
    border: 1px solid rgba(0, 83, 49, .16);
    border-radius: 999px;
    background: #eefaf6;
    color: #005331;
    line-height: 1;
}

.triwuu-pack-product-count__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: .25rem;
    border-radius: 50%;
    background: #007a55;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 950;
}

.triwuu-pack-product-count__label {
    font-size: .92rem;
    font-weight: 850;
}

.triwuu-pack-price-normal {
    color: #6b7280;
    font-weight: 700;
}

.triwuu-pack-price-normal span {
    text-decoration: line-through;
}

.triwuu-pack-price-triwuu {
    color: #005331;
    font-weight: 800;
}

.triwuu-pack-saving {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: .25rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: #c5161d;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.triwuu-pack-discount--split,
.triwuu-pack-discount-badge--split {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.triwuu-pack-discount__label {
    display: block;
    font-size: .72em;
    font-weight: 850;
    letter-spacing: .08em;
}

.triwuu-pack-discount__value {
    display: block;
    margin-top: .14em;
    color: inherit;
    font-size: 1.08em;
    font-weight: 950;
    line-height: 1;
}

body.tax-product_cat.term-packs .product-type-triwuu_pack .triwuu-product-badge--sale.triwuu-pack-discount-badge--split,
body.single-product.triwuu-single-pack-product .product-type-triwuu_pack .triwuu-product-badge--sale.triwuu-pack-discount-badge--split {
    min-height: 48px !important;
    height: auto !important;
    padding: 7px 36px 7px 12px !important;
}

.triwuu-pack-components {
    margin-top: 1.75rem;
    padding: 1.25rem;
    border: 1px solid rgba(0, 83, 49, .14);
    border-radius: 18px;
    background: #f7fbf9;
}

.triwuu-pack-components__title {
    margin: 0 0 1rem;
    color: #1f2328;
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    font-weight: 800;
    line-height: 1.15;
}

.triwuu-pack-components__list {
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.triwuu-pack-components__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .75rem;
    align-items: center;
    padding: .85rem 1rem;
    border: 1px solid rgba(0, 83, 49, .10);
    border-radius: 14px;
    background: #fff;
}

.triwuu-pack-components__link {
    color: #005331;
    font-weight: 800;
    text-decoration: none;
}

.triwuu-pack-components__link:hover {
    text-decoration: underline;
}

.triwuu-pack-components__price {
    color: #1f2328;
    font-weight: 800;
    white-space: nowrap;
}

.triwuu-pack-components__stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .28rem .6rem;
    border-radius: 999px;
    background: #e7f8ed;
    color: #06773d;
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.triwuu-pack-components__item.is-out-of-stock .triwuu-pack-components__stock {
    background: #ffe5e5;
    color: #b31319;
}

@media (max-width: 640px) {
    .triwuu-pack-components {
        padding: 1rem;
    }

    .triwuu-pack-components__item {
        grid-template-columns: 1fr;
        gap: .45rem;
    }

    .triwuu-pack-components__price,
    .triwuu-pack-components__stock {
        width: fit-content;
    }
}

/* Elementor: Pack destacado */
.triwuu-pack-featured {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    overflow: hidden;
    min-height: 650px;
    padding: clamp(36px, 5vw, 72px) clamp(18px, 4vw, 56px) 48px;
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
    isolation: isolate;
    box-sizing: border-box;
}
.triwuu-pack-featured__overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom,
            rgba(255,255,255,0) 18%,
            rgba(255,255,255,.10) 30%,
            rgba(255,255,255,.34) 42%,
            rgba(255,255,255,.72) 56%,
            rgba(255,255,255,.94) 68%,
            #fff 78%,
            #fff 100%
        ),
        linear-gradient(90deg, rgba(0,0,0,.16), rgba(0,0,0,.03));
}
.triwuu-pack-featured__inner { position:relative; z-index:1; width:min(1180px,100%); margin:0 auto; text-align:center; }
.triwuu-pack-featured__title { box-sizing:border-box; width:min(850px,92%); margin:0 auto 16px; padding:10px 28px 14px; border-radius:999px; background:#007a55; color:#fff; font-size:clamp(2rem,4vw,4.1rem); font-weight:800; line-height:1.05; }
.triwuu-pack-featured__brand { display:flex; align-items:center; justify-content:center; width:min(360px,72%); min-height:96px; margin:0 auto 22px; padding:18px 36px; border-radius:999px; background:#000; }
.triwuu-pack-featured__logo { width:auto; max-width:100%; max-height:72px; object-fit:contain; }
.triwuu-pack-featured__site-name { color:#fff; font-size:clamp(2rem,4vw,4rem); font-weight:800; }
.triwuu-pack-featured__catalog-context { width: min(1180px, 100%); margin: 0 auto; }
.woocommerce .triwuu-pack-featured__products,
.triwuu-pack-featured__products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    gap: 34px 30px !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
}
.woocommerce .triwuu-pack-featured__products li.product,
.triwuu-pack-featured__products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
}
/* La tarjeta es exactamente la del catálogo. Solo se ocultan los datos individuales
   que no proceden dentro de un pack: el precio y la compra se muestran una sola vez. */
/* En este módulo el pack se compra como una sola unidad: no se muestran
   ofertas ni acciones individuales de los productos que lo componen. */
.triwuu-pack-featured__products .triwuu-product-badge--sale,
.triwuu-pack-featured__products li.product .onsale,
.triwuu-pack-featured__products li.product .price,
.triwuu-pack-featured__products .triwuu-product-card__price-line,
.triwuu-pack-featured__products .triwuu-product-card__offer,
.triwuu-pack-featured__products .triwuu-product-card__category,
.triwuu-pack-featured__products .triwuu-product-card__meta,
.triwuu-pack-featured__products li.product .triwuu-add-to-cart,
.triwuu-pack-featured__products li.product .triwuu-add-to-cart--floating,
.triwuu-pack-featured__products li.product .button,
.triwuu-pack-featured__products li.product a.add_to_cart_button,
.triwuu-pack-featured__products li.product a.ajax_add_to_cart,
.triwuu-pack-featured__products li.product [class*="add-to-cart"] {
    display: none !important;
}
.triwuu-pack-featured__products .triwuu-product-card__body {
    min-height: 0 !important;
    padding-bottom: 22px !important;
}
.triwuu-pack-featured__products .triwuu-product-card__title {
    margin-bottom: 7px !important;
}
.triwuu-pack-featured__variation {
    margin: .4rem 0 .7rem;
    color: #1f2328;
    font-size: .9rem;
    font-weight: 650;
    line-height: 1.35;
}
.triwuu-pack-featured__variation-label { font-weight: 800; }
.triwuu-pack-featured__summary { display:flex; flex-direction:column; flex-wrap:nowrap; align-items:center; justify-content:center; gap:14px; text-align:center; width:min(760px,100%); margin:24px auto 0; padding:16px 22px; border-radius:28px; background:#eefaf6; }
.triwuu-pack-featured__prices { width: 100%; text-align: center; }
.triwuu-pack-featured__regular { color:#4d5556; font-size:1rem; font-weight:700; }
.triwuu-pack-featured__regular span { text-decoration:line-through; }
.triwuu-pack-featured__triwuu { color:#007a55; font-size:clamp(1.2rem,2vw,1.65rem); font-weight:800; }
.triwuu-pack-featured__prices .triwuu-pack-saving { margin-inline:auto; }

/* El botón del pack hereda exactamente el botón flotante del catálogo. */
.woocommerce .triwuu-pack-featured__summary .triwuu-pack-featured__button {
    flex: 0 0 auto;
}

/* El único botón del pack replica exactamente el botón del catálogo.
   El icono lo aporta el ::before del tema; no se imprime un segundo icono en el HTML. */
.woocommerce .triwuu-pack-featured__summary.triwuu-supermarket-card .triwuu-pack-featured__button,
.triwuu-pack-featured__summary.triwuu-supermarket-card .triwuu-pack-featured__button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: auto !important;
    min-width: 148px !important;
    min-height: 29px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #007a55 !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-transform: lowercase !important;
    white-space: nowrap !important;
}
.woocommerce .triwuu-pack-featured__summary.triwuu-supermarket-card .triwuu-pack-featured__button:hover,
.triwuu-pack-featured__summary.triwuu-supermarket-card .triwuu-pack-featured__button:hover {
    background: #006747 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}
.woocommerce .triwuu-pack-featured__summary.triwuu-supermarket-card .triwuu-pack-featured__button::before,
.triwuu-pack-featured__summary.triwuu-supermarket-card .triwuu-pack-featured__button::before {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    margin-right: 4px !important;
}

.triwuu-pack-featured__notice { padding:20px; border:1px dashed #bbb; background:#fff; color:#555; }
.triwuu-pack-components__link:focus-visible,
.triwuu-pack-featured__button:focus-visible {
    outline: 3px solid #1f2328 !important;
    outline-offset: 3px;
}
@media (max-width:900px) { .triwuu-pack-featured { min-height:auto; } .woocommerce .triwuu-pack-featured__products,.triwuu-pack-featured__products { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:24px 18px !important; } }
@media (max-width:640px) { .triwuu-pack-featured { padding-inline:14px; } .triwuu-pack-featured__title { width:100%; font-size:1.8rem; } .triwuu-pack-featured__brand { width:min(280px,82%); min-height:74px; } .woocommerce .triwuu-pack-featured__products,.triwuu-pack-featured__products { grid-template-columns:1fr !important; width:min(320px,100%); } .triwuu-pack-featured__summary { align-items:stretch; flex-direction:column; } .triwuu-pack-featured__prices { text-align:center; } }

/* Pack destacado: nunca deben mostrarse acciones individuales por producto. */
.triwuu-pack-featured .triwuu-pack-featured__products li.product > a.button,
.triwuu-pack-featured .triwuu-pack-featured__products li.product a.button,
.triwuu-pack-featured .triwuu-pack-featured__products li.product button,
.triwuu-pack-featured .triwuu-pack-featured__products li.product .added_to_cart,
.triwuu-pack-featured .triwuu-pack-featured__products li.product .triwuu-add-to-cart,
.triwuu-pack-featured .triwuu-pack-featured__products li.product [class*="add_to_cart"],
.triwuu-pack-featured .triwuu-pack-featured__products li.product [class*="add-to-cart"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Pack destacado: sin la línea verde separadora bajo el nombre del producto. */
.triwuu-pack-featured__products .triwuu-product-card__title,
.triwuu-pack-featured__products .triwuu-product-card__title-wrap,
.triwuu-pack-featured__products .triwuu-product-card__body {
    border-bottom: 0 !important;
    box-shadow: none !important;
}
.triwuu-pack-featured__products .triwuu-product-card__title::after,
.triwuu-pack-featured__products .triwuu-product-card__title-wrap::after,
.triwuu-pack-featured__products .triwuu-product-card__body::after {
    display: none !important;
    content: none !important;
}

/* El contador del bloque de precio es la única fuente visible. Estos selectores,
   deliberadamente más específicos, anulan el pseudo-elemento heredado que el
   PHP principal genera en la categoría y evitan mostrar el mismo texto dos veces. */
html body .product.product-type-triwuu_pack .triwuu-product-card__category,
html body .product.triwuu-pack-has-forced-count .triwuu-product-card__category {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
html body .product.product-type-triwuu_pack .triwuu-product-card__category::before,
html body .product.triwuu-pack-has-forced-count .triwuu-product-card__category::before {
    display: none !important;
    content: none !important;
}

.triwuu-pack-price-block .triwuu-pack-loop-product-count,
body:not(.single-product) .product-type-triwuu_pack .triwuu-pack-loop-product-count,
body:not(.single-product) .triwuu-pack-has-forced-count .triwuu-pack-loop-product-count {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: .55rem auto .65rem;
    color: #4d5556;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}
