/* Bundle picker page */

/* Bottom-bar dock needs page padding so the last grid card isn't
   hidden behind it. On desktop the dock is on the right side so no
   bottom padding is needed. */
.bundle-page { padding-bottom: 220px; }
@media (min-width: 960px) {
    .bundle-page { padding-bottom: 2rem; }
}

/* Use a roomier grid on the bundle page since each card has inline controls */
.bundle-page .design-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1000px) { .bundle-page .design-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .bundle-page .design-grid { grid-template-columns: 1fr; } }

/* --- Bundle pick card: image + inline size/qty/add controls ----------- */
.bundle-pick-card .card-body {
    gap: 0.85rem;
    padding: 1rem 1.1rem 1.15rem;
}
.bundle-pick-card .card-name { font-size: 1rem; }
.bundle-pick-card .card-price { font-size: 0.82rem; }

.card-picker-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.card-picker-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
    font-weight: 700;
}
.card-size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
}
.card-size-grid .size-chip {
    width: 100%;
    height: 32px;
    font-size: 0.78rem;
    padding: 0 0.3rem;
}

/* Card add row: size on the left + qty on the right (top), full-width
   Add to Cart button along the bottom. Shared layout between bundle
   and catalog pages — kept here for the bundle-page tuning; the base
   structural rules also live in catalog.css for catalog-page reuse. */
.card-add-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
    width: 100%;
}
.card-controls-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}
.card-controls-row .size-select,
.card-controls-row .qty-stepper {
    flex: 1 1 0;
    min-width: 0;
    height: 40px;
}
.card-controls-row .size-select select {
    height: 40px;
    width: 100%;
    padding: 0 1.6rem 0 0.7rem;
    font-size: 0.85rem;
    background-position: right 0.55rem center;
}
.card-controls-row .qty-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-controls-row .qty-stepper .qty-btn,
.card-controls-row .qty-stepper .qty-input {
    height: 40px;
    line-height: 1;
}
.card-controls-row .qty-stepper .qty-btn { width: 32px; padding: 0; }
.card-controls-row .qty-stepper .qty-input {
    flex: 1; width: auto; padding: 0; text-align: center;
}
.card-add-row .pick-add-btn {
    width: 100%;
    height: 44px;
    padding: 0 0.8rem;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 8px;
}
.card-add-row .pick-add-btn.is-added {
    background: #6dd86d;
    color: #05010F;
}
.card-add-row .pick-add-btn:disabled {
    cursor: default;
    opacity: 1; /* let .is-added drive appearance */
}

/* When a card is open as a "pick" card, drop the hover-link cursor on the
   image area since the whole thing isn't a button anymore. */
.bundle-pick-card .card-thumb { cursor: default; }
.bundle-pick-card:hover { transform: translateY(-2px); }

/* Brief gold flash when this card was pre-seeded from a PDP deep-link. */
.bundle-pick-card.is-seeded-flash {
    box-shadow: 0 0 0 3px #E9C46A, 0 14px 38px -16px rgba(233, 196, 106, 0.6);
    transition: box-shadow 1.6s ease;
}

.bundle-hero {
    padding: clamp(3rem, 6vw, 4.5rem) 1.5rem 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--line);
}
.bundle-hero .catalog-eyebrow { color: var(--accent); }
.bundle-hero .catalog-lede strong { color: #fff; }

.bundle-size-toggle {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5rem 1rem;
}
.bundle-size-chip {
    width: auto;
    padding: 0 0.8rem;
    height: 32px;
}

/* The bundle dock sits sticky at the bottom of the viewport */
.bundle-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(10, 10, 26, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 -16px 40px -20px rgba(0,0,0,0.7);
    transition: background 0.2s ease;
}
.bundle-dock.is-full { background: rgba(28, 18, 60, 0.95); }
.bundle-dock.flash-full { animation: flash-warn 0.6s ease; }
@keyframes flash-warn {
    0% { background: rgba(228, 100, 80, 0.4); }
    100% { background: rgba(10, 10, 26, 0.92); }
}
.bundle-dock-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 1.5rem;
}
@media (max-width: 900px) {
    .bundle-dock-inner {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
}
.bundle-dock-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.bundle-progress {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
    margin: 0;
    font-weight: 600;
}
.bundle-totals {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin: 0;
    line-height: 1;
}
.bundle-totals strong {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.7rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.bundle-totals .strike {
    color: var(--ink-faint);
    text-decoration: line-through;
    font-size: 0.9rem;
}
.bundle-totals em {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6dd86d;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Slots can overflow horizontally on narrow viewports; arrow buttons
   appear when there's overflow and let the shopper scroll through the
   shirts they've added so the dock doesn't squish or wrap. */
.bundle-slots-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}
.bundle-slots {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1 1 auto;
    min-width: 0;
}
.bundle-slots::-webkit-scrollbar { display: none; }
.bundle-slots-arrow {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--ink, #fff);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.bundle-slots-arrow:hover:not(:disabled) {
    background: #E9C46A;
    color: #05010F;
    border-color: #E9C46A;
}
.bundle-slots-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}
.bundle-slots-arrow[hidden] { display: none; }
.bundle-slot {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 62px;
    overflow: hidden;
}
.bundle-slot.empty {
    /* Slightly stronger dashed outline so the empty slots clearly read
       as "shirts still needed". */
    border: 1.5px dashed rgba(233, 196, 106, 0.45);
    background: rgba(233, 196, 106, 0.04);
}
.bundle-slot.empty .slot-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 999px;
    border: 1px dashed rgba(233, 196, 106, 0.55);
    color: rgba(233, 196, 106, 0.75);
    font-size: 0.7rem;
}
.bundle-slot.empty span {
    color: var(--ink-faint);
    font-size: 0.85rem;
    font-weight: 600;
}
.bundle-slot.filled {
    border-style: solid;
    border-color: rgba(184, 158, 255, 0.5);
    background: linear-gradient(160deg, rgba(184, 158, 255, 0.15), #131330);
}
.bundle-slot .slot-tee {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bundle-slot .slot-tee .tee-base {
    width: 92%;
    height: 92%;
    object-fit: contain;
}
.bundle-slot .slot-tee .tee-print {
    position: absolute;
    top: 22%;
    left: 28%;
    width: 44%;
    object-fit: contain;
    object-position: top center;
    opacity: 0.95;
}
.bundle-slot .slot-composite {
    width: 92%;
    height: 92%;
    object-fit: contain;
}
.bundle-slot .slot-size {
    position: absolute;
    bottom: 2px;
    right: 4px;
    background: rgba(10, 10, 26, 0.85);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}
.bundle-slot .slot-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.6rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bundle-slot .slot-remove:hover { background: #E9C46A; color: #05010F; }

/* Slot meta (design name + size/qty subtitle): hidden in the compact
   bottom-bar layout, revealed by the desktop sidebar media query. */
.bundle-slot .slot-meta { display: none; }

/* ============================================================
   Desktop ≥ 960px: bundle dock moves to a right-side sidebar
   and each picked shirt renders as a Shopify-style row.
   ============================================================ */
@media (min-width: 960px) {
    /* Push the browse grid left so the rail doesn't sit on top of it. */
    .bundle-page .catalog-main { padding-right: 360px; }

    .bundle-dock {
        top: 0;
        left: auto;
        right: 0;
        bottom: 0;
        width: 360px;
        border-top: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: -16px 0 40px -20px rgba(0, 0, 0, 0.7);
        display: flex;
        flex-direction: column;
    }
    .bundle-dock-inner {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        padding: 1.25rem 1.1rem;
        gap: 0.9rem;
        max-width: none;
        overflow: hidden;
    }
    .bundle-dock-left {
        flex: 0 0 auto;
        padding-bottom: 0.85rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .bundle-slots-wrap {
        flex: 1 1 auto;
        min-height: 0;
    }
    /* Arrows aren't needed in vertical layout. */
    .bundle-slots-arrow { display: none !important; }
    .bundle-slots {
        flex: 1 1 auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        align-content: flex-start;
        gap: 0.55rem;
        overflow-x: hidden;
        overflow-y: auto;
        flex-wrap: nowrap;
        min-height: 0;
        padding-right: 0.25rem;
    }
    .bundle-slot {
        width: 100%;
        height: auto;
        min-height: 64px;
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: 52px 1fr auto;
        align-items: center;
        gap: 0.7rem;
        padding: 0.55rem 0.6rem;
        border-radius: 10px;
        text-align: left;
    }
    /* Empty placeholder rows: same row layout as filled slots so the
       outlined "Shirt N - Pick a design" hint reads as one of the
       cart-style rows above it. */
    .bundle-slot.empty {
        justify-content: stretch;
        text-align: left;
        padding: 0.55rem 0.6rem;
    }
    .bundle-slot.empty .slot-empty-icon {
        grid-column: 1;
        justify-self: center;
        width: 36px; height: 36px;
        font-size: 0.85rem;
    }
    .bundle-slot.empty .slot-meta {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    .bundle-slot.empty .slot-name {
        font-size: 0.85rem;
        color: rgba(233, 196, 106, 0.85);
        font-weight: 700;
    }
    .bundle-slot.empty .slot-sub {
        font-size: 0.72rem;
        color: var(--ink-faint, rgba(255, 255, 255, 0.6));
    }
    .bundle-slot .slot-composite {
        width: 52px;
        height: 52px;
        background: #fff;
        border-radius: 8px;
        padding: 3px;
    }
    .bundle-slot .slot-meta {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        min-width: 0;
    }
    .bundle-slot .slot-name {
        font-weight: 700;
        font-size: 0.88rem;
        color: var(--ink, #fff);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .bundle-slot .slot-sub {
        font-size: 0.74rem;
        color: var(--ink-faint, rgba(255, 255, 255, 0.6));
        letter-spacing: 0.05em;
    }
    /* The compact bottom-bar size chip is redundant once we show the
       row-style meta block; hide it on desktop. */
    .bundle-slot .slot-size { display: none; }
    .bundle-slot .slot-remove {
        position: static;
        align-self: center;
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    #bundle-checkout {
        flex: 0 0 auto;
        width: 100%;
        margin-top: auto;
    }
}

#bundle-checkout:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(255,255,255,0.1);
    color: var(--ink-dim);
}
