/**
 * Product Stacks — minimal front-end styles.
 *
 * Deliberately plain so any WC theme can override via higher-specificity
 * rules. Only ships what WC itself doesn't style.
 */

/* ---------- Price HTML ---------- */
.ps-price { display: inline-flex; align-items: baseline; gap: .5em; flex-wrap: wrap; }
.ps-price__was { color: #9ca3af; }
.ps-price__now { color: inherit; font-weight: 700; text-decoration: none; }
.ps-price__save {
    display: inline-block;
    background: #fef2f2;
    color: #b91c1c;
    font-size: .75em;
    font-weight: 700;
    padding: .25em .6em;
    border-radius: 999px;
    letter-spacing: .02em;
}

/* ---------- Badge chip above title ---------- */
.ps-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    margin: 0 0 .75em;
    padding: .35em .75em;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 999px;
}

/* ---------- Catalog corner badge ---------- */
.woocommerce ul.products li.product { position: relative; }
.ps-catalog-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .3em .6em;
    border-radius: 999px;
    pointer-events: none;
}

/* ---------- "What's included" section ---------- */
.ps-included {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}
.ps-included__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.ps-included__title {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #6b7280;
    margin: 0 !important;
}
.ps-included__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ps-included__item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}
.ps-included__item:first-child { padding-top: 0; }
.ps-included__item:last-child { border-bottom: 0; padding-bottom: 0; }
.ps-included__thumb {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
}
.ps-included__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}
.ps-included__body { min-width: 0; }
.ps-included__name {
    margin: 0 0 2px;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: 0;
    color: #111;
}
.ps-included__name a {
    color: inherit;
    text-decoration: none;
}
.ps-included__name a:hover { color: #ec1d1d; }
.ps-included__meta {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.3;
}
/* Normalize WC's price markup inside the meta + total so themes with
   oversized global .woocommerce-Price-amount / bdi styles don't blow
   it up. WC wraps every price in <span class="woocommerce-Price-amount">
   <bdi>$X.XX</bdi></span> and themes often target the <bdi> directly. */
.ps-included .woocommerce-Price-amount,
.ps-included .woocommerce-Price-amount bdi {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    letter-spacing: 0 !important;
}
.ps-included__meta .woocommerce-Price-amount {
    font-size: inherit !important;
    font-weight: 500 !important;
    color: inherit !important;
}
.ps-included__total {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}

/* Totals footer */
.ps-included__totals {
    margin: 1.25rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: grid;
    gap: 6px;
}
.ps-included__totals-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 1rem;
}
.ps-included__totals-label {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}
.ps-included__totals-value {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-align: right;
}
.ps-included__totals-value--strike {
    color: #9ca3af;
    text-decoration: line-through;
}
/* "You save" chip — anchored in the header, top-right */
.ps-included__save-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #ec1d1d;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}
.ps-included__save-chip-label {
    font-weight: 600;
    opacity: .9;
}
.ps-included__save-chip-amount { font-weight: 700; }
.ps-included__save-chip-sep { opacity: .5; }
.ps-included__save-chip-pct {
    font-weight: 700;
    letter-spacing: .04em;
}

/* ---------- Protocol block ---------- */
.ps-protocol { margin: 2rem 0; }
.ps-protocol__inner { max-width: 100%; }

/* ---------- Cart line display ---------- */
.ps-cart-item--child td { background: #fafafa; }
.ps-child-bullet { color: #9ca3af; margin-right: .3em; }
.ps-included-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #16a34a;
    background: #f0fdf4;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1.1;
}
.ps-child-qty { color: #6b7280; font-weight: 500; }

/* ---------- Frequently Bought Together widget ---------- */
.ps-fbt {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.ps-fbt__title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 1rem !important;
    line-height: 1.3;
}
.ps-fbt__list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.ps-fbt__row {
    padding: .6rem;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color .15s;
}
.ps-fbt__row:has(input:checked) { border-color: #ec1d1d; background: #fff7f7; }
.ps-fbt__label {
    display: grid;
    grid-template-columns: auto 56px 1fr;
    gap: .75rem;
    align-items: center;
    cursor: pointer;
    margin: 0;
}
.ps-fbt__check {
    width: 18px;
    height: 18px;
    accent-color: #ec1d1d;
    cursor: pointer;
}
.ps-fbt__check:disabled { opacity: .5; cursor: not-allowed; }
.ps-fbt__thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.ps-fbt__thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.ps-fbt__body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ps-fbt__name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5em;
}
.ps-fbt__you {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ec1d1d;
    background: #fef2f2;
    padding: .2em .5em;
    border-radius: 999px;
}
.ps-fbt__price { font-size: 13px; color: #6b7280; }
.ps-fbt__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}
.ps-fbt__totals-row {
    display: flex;
    align-items: baseline;
    gap: .5em;
    font-size: 15px;
}
.ps-fbt__totals-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
}
.ps-fbt__totals-value del { color: #9ca3af; margin-right: .25em; }
.ps-fbt__totals-value strong { font-size: 20px; }
.ps-fbt__totals-save {
    font-size: 12px;
    font-weight: 700;
    color: #b91c1c;
    margin-top: .25rem;
}
.ps-fbt__submit {
    background: #ec1d1d !important;
    color: #fff !important;
    font-weight: 700;
    padding: .8em 1.5em !important;
    border-radius: 8px !important;
    border: 0 !important;
    cursor: pointer;
    transition: background .15s;
}
.ps-fbt__submit:hover { background: #d41a1f !important; }
.ps-fbt__submit:disabled { opacity: .6; cursor: not-allowed; }
.ps-fbt__hint {
    margin: .75rem 0 0;
    font-size: 12px;
    color: #6b7280;
}
.ps-fbt__error {
    margin: .75rem 0 0;
    padding: .6rem .8rem;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 6px;
    font-size: 13px;
}

/* ---------- FBT cart line chip ---------- */
.ps-fbt-chip {
    display: inline-block;
    margin-left: .4em;
    padding: .15em .5em;
    background: #16a34a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 999px;
    vertical-align: middle;
}
.ps-fbt-item td { background: #f0fdf4; }
