/* Protocol Research Partners — cart + PDP shared */

.stack-partners-host[hidden] {
    display: none !important;
}

.stack-partners-inner {
    background: #f8fafc;
    border: 1px solid rgba(157, 180, 205, 0.35);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin: 1rem 0;
}

.stack-partners-inner--cart {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Bundle row — compact card in stack / protocol sheet */
.stack-bundle-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(23, 35, 144, 0.28);
    border-radius: 10px;
    background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
}

.stack-bundle-row--sheet {
    padding: 0.55rem 0.65rem;
    gap: 0.3rem;
}

.stack-bundle-head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.stack-bundle-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.stack-bundle-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #172390;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
}

.stack-bundle-name {
    font-size: 0.88rem;
    color: #111827;
    line-height: 1.3;
    min-width: 0;
}

.stack-bundle-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: #172390;
    white-space: nowrap;
    flex-shrink: 0;
}

.stack-bundle-savings {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
    line-height: 1.35;
}

.bundle-included-plain {
    list-style: none;
    padding-left: 0;
    margin: 0;
    gap: 0.12rem;
}

.bundle-included-plain li {
    font-size: 0.76rem;
    line-height: 1.4;
    color: #6b7280;
    padding: 0;
}

.stack-bundle-included {
    margin-top: 0.05rem;
}

.cart-bundle-included {
    margin-top: 0.35rem;
}

.stack-bundle-row .stack-bundle-add {
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.38rem 0.7rem;
    font-size: 0.78rem;
    min-height: 32px;
}

.stack-bundle-view {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 600;
    color: #172390;
}

/* Bundle replace modal */
.bundle-replace-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bundle-replace-modal[hidden] {
    display: none !important;
}

.bundle-replace-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.bundle-replace-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 16px 40px rgba(23, 35, 144, 0.18);
}

.bundle-replace-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: #172390;
}

.bundle-replace-lede {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.bundle-replace-list {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    color: #374151;
    font-size: 0.88rem;
}

.bundle-replace-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bundle-replace-actions .btn {
    width: 100%;
}

/* Bundle PDP + home */
.bundle-savings-callout {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #059669;
}

.bundle-value-copy {
    margin: 0.75rem 0;
    font-size: 0.92rem;
    color: #4b5563;
    line-height: 1.5;
}

.bundle-separate-note {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: #6b7280;
}

.bundle-home-card {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
    border: 1px solid rgba(157, 180, 205, 0.35);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 35, 144, 0.06);
}

.bundle-home-card-image,
.bundle-home-card-placeholder {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 1;
}

.bundle-home-card-title {
    margin: 0.35rem 0 0.5rem;
    color: #172390;
}

.bundle-home-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
}

.bundle-home-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #172390;
    margin-right: auto;
}

.products-section--bundles {
    padding-top: 0;
}

@media (max-width: 640px) {
    .bundle-home-card {
        grid-template-columns: 1fr;
    }
}

.stack-partners-heading {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
    color: #172390;
}

.stack-partners-sub {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
}

.stack-partners-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.stack-partner-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: #fff;
    border: 1px solid rgba(157, 180, 205, 0.25);
    border-radius: 10px;
}

.stack-partner-row-main {
    flex: 1;
    min-width: 0;
}

.stack-partner-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.stack-partner-name {
    font-size: 0.95rem;
    color: #111827;
    line-height: 1.3;
}

.stack-partner-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #172390;
    white-space: nowrap;
}

.stack-partner-rationale {
    margin: 0;
    font-size: 0.82rem;
    color: #4b5563;
    line-height: 1.45;
}

.stack-partner-details {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.stack-partner-details summary {
    cursor: pointer;
    color: #172390;
    font-weight: 600;
    list-style: none;
}

.stack-partner-details summary::-webkit-details-marker {
    display: none;
}

.stack-partner-details summary::before {
    content: '▸ ';
}

.stack-partner-details[open] summary::before {
    content: '▾ ';
}

.stack-partner-details p {
    margin: 0.35rem 0 0;
    line-height: 1.45;
}

.stack-partner-discount-note {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #059669;
}

.stack-partner-shipping-note {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #172390;
    font-weight: 600;
}

.stack-partner-add {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    min-height: 36px;
}

.stack-partners-bundle-link {
    display: block;
    margin-top: 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #172390;
    text-decoration: none;
}

.stack-partners-bundle-link:hover {
    text-decoration: underline;
}

/* PDP protocol sheet (after main Add to Cart) */
.protocol-sheet {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.protocol-sheet[hidden] {
    display: none !important;
}

.protocol-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.protocol-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(23, 35, 144, 0.15);
    animation: protocol-sheet-in 0.25s ease-out;
}

@keyframes protocol-sheet-in {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.protocol-sheet-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #172390;
}

.protocol-sheet-lede {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #6b7280;
}

.protocol-sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.protocol-sheet-actions .btn {
    width: 100%;
    text-align: center;
}

/* PDP mini cart summary */
.pdp-cart-mini {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 0.9rem;
    background: #f0fdf4;
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 10px;
    font-size: 0.88rem;
}

.pdp-cart-mini[hidden] {
    display: none !important;
}

.pdp-cart-mini-title {
    margin: 0 0 0.35rem;
    font-weight: 600;
    color: #065f46;
}

.pdp-cart-mini-list {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #374151;
}

.pdp-cart-mini-list li {
    padding: 0.15rem 0;
}

.pdp-cart-mini-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    color: #172390;
}
