/* ── Option grid / card shared styles (mirrored from checkout.css for inline editor) ── */

.option-group {
    margin-bottom: 18px;
}

.option-group h3 {
    margin: 0 0 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.option-card {
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-field);
    background: var(--bc-surface);
    color: var(--bc-ink);
    padding: 10px 8px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.option-card:hover {
    border-color: var(--bc-border-strong);
}

.option-card.selected,
.option-card[aria-pressed="true"] {
    border-color: var(--bc-clay);
    background: var(--bc-clay-soft);
    color: var(--bc-text-clay-deep);
    box-shadow: none;
}

.option-card:disabled,
.option-card.option-unavailable {
    opacity: 0.4;
    cursor: not-allowed;
}

.option-card-title {
    font-size: 0.88rem;
}

.option-card-subtitle,
.option-price-label {
    font-size: 0.78rem;
    color: var(--bc-text-warm);
    font-weight: 500;
}

.option-card-visual { display: block; }

.option-frame-preview {
    display: block;
    width: 24px;
    height: 32px;
    border-radius: 2px;
    box-sizing: border-box;
    margin-bottom: 2px;
}

.option-frame-preview--unframed {
    background: var(--bc-surface);
    border: 1px dashed var(--bc-text-warm);
}

.option-frame-preview--black {
    background: var(--bc-surface);
    border: 4px solid var(--bc-ink);
}

.option-frame-preview--white {
    background: var(--bc-surface);
    border: 4px solid #e8e6e0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
}

/* Wood frame chips - grain borders in physical-preview-wood.css */

.option-frame-preview--hanger-black,
.option-frame-preview--hanger-white,
.option-frame-preview--hanger-natural,
.option-frame-preview--hanger-dark {
    position: relative;
    background: var(--bc-surface);
    border: none;
    overflow: visible;
}

.option-frame-preview--hanger-black::before,
.option-frame-preview--hanger-black::after,
.option-frame-preview--hanger-white::before,
.option-frame-preview--hanger-white::after,
.option-frame-preview--hanger-natural::before,
.option-frame-preview--hanger-natural::after,
.option-frame-preview--hanger-dark::before,
.option-frame-preview--hanger-dark::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    height: 4px;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.option-frame-preview--hanger-black::before,
.option-frame-preview--hanger-white::before,
.option-frame-preview--hanger-natural::before,
.option-frame-preview--hanger-dark::before { top: 1px; }

.option-frame-preview--hanger-black::after,
.option-frame-preview--hanger-white::after,
.option-frame-preview--hanger-natural::after,
.option-frame-preview--hanger-dark::after { bottom: 1px; }

/* Hanger rail colors - physical-preview-wood.css */

.option-grid-subheading {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bc-text-warm);
    margin: 0.25rem 0 0;
}

#boeFrameOptions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
    #boeFrameOptions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
#boePaperOptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#boeSizeOptions  { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── Basket page ─────────────────────────────────────────────────────────── */

.basket-page {
    background: var(--bc-bg);
    color: var(--bc-ink);
    min-height: 100vh;
}

.basket-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: calc(var(--header-offset) + 40px) 24px 60px;
}

/* ── Two-column layout ───────────────────────────────────────────────────── */

.basket-full-layout {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 380px);
    gap: 28px;
    align-items: start;
}

/* ── Left column: item list ──────────────────────────────────────────────── */

.basket-items-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.basket-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.basket-items-header h1 {
    margin: 0;
    font-size: 1.85rem;
}

.basket-add-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--bc-clay);
    text-decoration: none;
    white-space: nowrap;
}

.basket-add-more-link:hover {
    text-decoration: underline;
}

/* ── Item card ───────────────────────────────────────────────────────────── */

.basket-item-card {
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-card);
    box-shadow: var(--shadow-md);
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.bic-thumb-col {
    flex-shrink: 0;
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bic-thumb-wrap {
    width: 100%;
}

/* Extra inset so framed previews (box-shadow “frame”) are not clipped */
.bic-thumb-wrap--framed,
.bic-thumb-wrap--hanger {
    padding: 12px;
    box-sizing: border-box;
}

.bic-thumb-frame {
    width: 100%;
    aspect-ratio: 5 / 7;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bc-workspace);
    position: relative;
    transition: box-shadow 0.2s ease, border-radius 0.2s ease, opacity 0.18s ease;
}

.bic-thumb-frame[data-artwork-url] {
    cursor: zoom-in;
}

.bic-thumb-frame[data-artwork-url]:hover {
    opacity: 0.92;
}

.bic-thumb-frame[data-artwork-url]:focus-visible {
    outline: 2px solid var(--bc-clay);
    outline-offset: 3px;
}

.bic-thumb-frame.physical-framed {
    border-radius: 0;
    overflow: visible;
}

.bic-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: inherit;
}

.bic-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bc-workspace);
    border-radius: 8px;
}

/* Physical frame previews on item thumbnails */
.bic-thumb-frame.physical-framed.physical-frame-white {
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.20),
        0 0 0 10px rgba(0, 0, 0, 0.12),
        0 0 0 9px  var(--bc-surface),
        0 0 0 3px  rgba(240, 240, 240, 0.98);
}

.bic-thumb-frame.physical-framed.physical-frame-black {
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.50),
        0 0 0 10px rgba(255, 255, 255, 0.06),
        0 0 0 9px  #1a1410,
        0 0 0 3px  #5c4c40;
}

.bic-thumb-frame.physical-framed.physical-frame-natural {
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.22),
        0 0 0 10px rgba(0, 0, 0, 0.10),
        0 0 0 9px  #c4a06a,
        0 0 0 8px  #b89560,
        0 0 0 3px  #a67c52;
}

.bic-thumb-frame.physical-framed.physical-frame-dark-wood {
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.40),
        0 0 0 10px rgba(255, 255, 255, 0.05),
        0 0 0 9px  #5c4030,
        0 0 0 8px  #4a3428,
        0 0 0 3px  #3d2a1a;
}

/* Poster hanger on basket thumbnails */
.bic-thumb-frame.physical-hanger {
    border-radius: 0;
    overflow: visible;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.bic-thumb-frame.physical-hanger .bic-thumb-img {
    position: relative;
    z-index: 1;
}

.bic-thumb-frame.physical-hanger::before,
.bic-thumb-frame.physical-hanger::after {
    content: '';
    position: absolute;
    left: calc(-1 * var(--hanger-rail-overhang-x));
    right: calc(-1 * var(--hanger-rail-overhang-x));
    height: 4px;
    z-index: 5;
    pointer-events: none;
    border-radius: 2px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.bic-thumb-frame.physical-hanger::before {
    top: 0;
    transform: translateY(calc(-1 * var(--hanger-rail-outside-y)));
}

.bic-thumb-frame.physical-hanger::after {
    bottom: 0;
    transform: translateY(var(--hanger-rail-outside-y));
}

.bic-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bic-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.bic-headings {
    min-width: 0;
}

.bic-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.bic-copy {
    margin-top: 4px;
}

.bic-copy-line {
    margin: 0;
    color: var(--bc-text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ── Actions cluster (pencil + remove) ────────────────────────────────── */

.bic-actions-cluster {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.bic-edit-btn,
.bic-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--bc-radius-field);
    color: var(--bc-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.bic-action-label {
    font-size: 0.78rem;
    font-weight: 500;
}

.bic-edit-btn:hover,
.bic-edit-btn:focus-visible {
    border-color: var(--bc-border);
    color: var(--bc-ink);
    background: var(--bc-workspace);
}

.bic-remove-btn:hover,
.bic-remove-btn:focus-visible {
    border-color: var(--bc-border);
    color: var(--bc-ink);
    background: var(--bc-workspace);
}

/* ── Bottom row (price aligned right) ────────────────────────────────── */

.bic-bottom {
    display: flex;
    justify-content: flex-end;
}

.bic-price {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.bic-price .price-was {
    color: var(--bc-text-muted);
    font-weight: 500;
    text-decoration: line-through;
    margin-right: 0.35em;
}

.bic-price-loading {
    opacity: 0.5;
}

/* ── Option chips (labeled tokens) ───────────────────────────────────── */

.bic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bic-option-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-pill);
    background: var(--bc-surface);
    color: var(--bc-text-warm);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.bic-chip-label {
    color: var(--bc-text-muted);
    font-weight: 400;
}

.bic-option-chip:hover,
.bic-option-chip:focus-visible {
    border-color: var(--bc-clay);
    background: var(--bc-clay-soft);
    color: var(--bc-text-clay-deep);
}

/* ── Quantity stepper (under thumbnail) ──────────────────────────────── */

.quantity-stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-pill);
    background: var(--bc-surface);
    color: var(--bc-ink);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quantity-value {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
}

/* ── Right column: summary card ──────────────────────────────────────────── */

.basket-summary-col {
    position: sticky;
    top: calc(var(--header-offset) + 32px);
}

.basket-summary-card {
    background: #33261F;
    border: 1px solid #4A3D34;
    border-radius: var(--bc-radius-card);
    box-shadow: var(--shadow-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.basket-summary-title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bc-decision-text);
}

.basket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.basket-row label {
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    color: var(--bc-decision-meta);
}

.basket-country-select {
    flex: 1;
    max-width: 200px;
    background: var(--bc-surface);
    color: var(--bc-ink);
    border: 1px solid var(--bc-border-strong);
    border-radius: var(--bc-radius-field);
    padding: 8px 10px;
    font-size: 0.88rem;
}

.basket-price-card {
    border: 1px solid var(--bc-border-strong);
    border-radius: var(--radius-lg);
    background: var(--bc-surface);
    padding: 16px;
    color: var(--bc-ink);
}

.basket-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--bc-text-warm);
}

.basket-price-row strong {
    color: var(--bc-ink);
    font-weight: 600;
}

.basket-price-row.basket-price-promo strong {
    color: #16a34a;
}

.basket-price-value-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.basket-price-row.basket-price-item > span:first-of-type {
    color: var(--bc-ink);
    font-weight: 500;
}

.basket-price-item {
    color: var(--bc-text-warm);
}

.basket-price-item-group {
    margin-bottom: 8px;
}

.basket-price-item-group:last-child {
    margin-bottom: 10px;
}

.basket-price-item-group > .basket-price-row {
    margin-bottom: 2px;
}

/* Per-poster breakdown under line total (indent + leading line) */
.basket-price-card .price-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 12px;
    padding-left: 10px;
    border-left: 2px solid var(--bc-border-strong);
    font-size: 0.8rem;
    color: var(--bc-text-warm);
    margin-bottom: 2px;
    opacity: 1;
}

.basket-price-card .price-sub-row:last-child {
    margin-bottom: 6px;
}

.basket-price-card .price-sub-row strong {
    font-weight: 600;
    color: var(--bc-ink);
}

.basket-price-card .price-sub-row-value {
    display: inline-flex;
    justify-content: flex-end;
    text-align: right;
    white-space: nowrap;
}

.basket-price-delivery {
    color: var(--bc-text-warm);
    font-size: 0.88rem;
}

.basket-price-delivery strong {
    font-weight: 600;
    color: var(--bc-ink);
}

.basket-price-delivery span:last-of-type:not(:only-of-type) {
    color: var(--bc-ink);
    font-weight: 600;
}

.basket-price-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--bc-border-strong);
    font-size: 1.05rem;
    margin-bottom: 0;
    color: var(--bc-ink);
}

.basket-price-total > span:first-of-type {
    color: var(--bc-text-warm);
    font-weight: 500;
}

.basket-price-total-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.basket-price-list-total {
    color: var(--bc-text-muted);
    font-weight: 400;
    font-size: 0.9em;
    text-decoration: line-through;
}

.basket-price-note {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--bc-text-muted);
}

.basket-price-card .basket-vat-note {
    color: var(--bc-text-muted);
    text-align: right;
}

.basket-price-card .price-was {
    color: var(--bc-text-muted);
}

.basket-price-note:empty {
    display: none;
}

.basket-retry-btn {
    margin-top: 8px;
    width: 100%;
}

.basket-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.basket-actions .btn {
    justify-content: center;
}

.basket-legal-note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--bc-decision-text);
    text-align: center;
}

.basket-legal-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.basket-secure-note {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--bc-decision-text);
    justify-content: center;
}

/* ── Inline option editor ────────────────────────────────────────────────── */

.basket-option-editor {
    background: var(--bc-surface);
    border: 1px solid var(--bc-clay);
    border-radius: 0 0 var(--bc-radius-card) var(--bc-radius-card);
    box-shadow: var(--shadow-md);
    padding: 16px 20px 20px;
    margin: -1px 0 8px;
}

.basket-item-card:has(+ .basket-option-editor:not([hidden])) {
    border-radius: var(--bc-radius-card) var(--bc-radius-card) 0 0;
    border-bottom-color: var(--bc-clay);
}

.boe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.boe-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bc-ink);
}

.boe-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bc-workspace);
    color: var(--bc-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.boe-close-btn {
    background: none;
    border: none;
    color: var(--bc-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boe-close-btn:hover {
    color: var(--bc-ink);
    background: var(--bc-workspace);
}

.boe-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.boe-actions .btn-primary {
    flex: 1;
}

/* ── Banners ─────────────────────────────────────────────────────────────── */

.basket-banner {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.basket-banner-error {
    background: rgba(190, 70, 70, 0.16);
    color: #ffd5d5;
    border: 1px solid rgba(255, 130, 130, 0.3);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.basket-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    min-height: calc(100vh - var(--header-offset) - 80px);
    padding: 2rem 1rem;
}

.basket-empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bc-radius-pill);
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    color: var(--bc-text-muted);
    margin-bottom: 0.5rem;
}

.basket-empty-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bc-ink);
}

.basket-empty-body {
    margin: 0;
    color: var(--bc-text-muted);
    max-width: 34ch;
    line-height: 1.55;
    font-size: 0.95rem;
}

.basket-empty-cta {
    margin-top: 0.5rem;
    padding: 0.7rem 1.75rem;
    font-size: 1rem;
}

/* ── Mobile basket sticky bar ────────────────────────────────────────────── */

.basket-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #33261F;
    border-top: 1px solid #4A3D34;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 16px 16px 0 0;
}

.basket-sticky-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px 0;
    background: none;
    border: none;
    color: var(--bc-decision-text);
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    text-align: left;
}

.basket-sticky-label {
    flex: 1;
    color: var(--bc-decision-meta);
}

.basket-sticky-amount {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bc-decision-text);
}

.basket-sticky-chevron {
    transition: transform 0.2s ease;
    color: var(--bc-decision-meta);
    flex-shrink: 0;
}

.basket-sticky-chevron.rotated {
    transform: rotate(180deg);
}

.basket-sticky-details {
    padding: 8px 12px 6px;
    border-top: 1px solid #4A3D34;
    margin: 8px 12px 0;
    background: #FFFFFF;
    border-radius: 10px;
    border: 1px solid #DDD1C7;
}

.basket-sticky-details .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 0.88rem;
    color: var(--bc-text-muted);
}

.basket-sticky-details .price-row-value {
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.basket-sticky-details .price-row .price-was {
    margin-right: 6px;
    opacity: 0.75;
    text-decoration: line-through;
    font-weight: 400;
}

.basket-sticky-details .price-row strong {
    color: var(--bc-ink);
    font-weight: 600;
}

.basket-sticky-item-group {
    margin-bottom: 8px;
}

.basket-sticky-details .price-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 12px;
    padding-left: 10px;
    border-left: 2px solid #DDD1C7;
    font-size: 0.8rem;
    color: var(--bc-text-muted);
    margin-bottom: 2px;
}

.basket-sticky-details .price-sub-row:last-child {
    margin-bottom: 6px;
}

.basket-sticky-details .price-sub-row strong {
    font-weight: 600;
    color: var(--bc-ink);
}

.basket-sticky-details .price-sub-row-value {
    display: inline-flex;
    justify-content: flex-end;
    text-align: right;
    white-space: nowrap;
}

/* Mobile-only promo in sticky bar (desktop uses summary column) */
.basket-sticky-promo {
    padding: 0 16px 8px;
    border-top: 1px solid #4A3D34;
}

.basket-sticky-promo-toggle {
    display: flex;
    width: 100%;
    margin-top: 8px;
    padding: 8px 0;
    background: none;
    border: none;
    color: var(--bc-decision-meta);
    font-size: 0.88rem;
    font-family: inherit;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.basket-sticky-promo-field {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.basket-sticky-promo-field .promo-code-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--bc-decision-stroke);
    color: var(--bc-decision-text);
}

.basket-sticky-promo-field .promo-code-input::placeholder {
    color: var(--bc-decision-meta);
}

.basket-sticky-promo .promo-code-msg {
    color: var(--bc-decision-meta);
}

.basket-sticky-promo .promo-code-msg--success {
    color: #16a34a;
}

.basket-sticky-promo .promo-code-msg--error {
    color: #fca5a5;
}

.basket-sticky-cta-wrap {
    padding: 10px 16px 14px;
}

.basket-sticky-cta {
    width: 100%;
    justify-content: center;
    min-height: 46px;
    background: var(--bc-clay);
    color: var(--bc-decision-cta-text);
    border-color: var(--bc-clay);
}

.basket-sticky-cta:hover {
    filter: brightness(0.95);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
    .basket-full-layout {
        grid-template-columns: 1fr;
    }

    .basket-summary-col {
        display: none;
    }

    .basket-sticky-bar {
        display: block;
    }

    .basket-main {
        /* Room for expanded sticky bar + promo row + safe-area */
        padding-bottom: max(220px, calc(180px + env(safe-area-inset-bottom, 0px)));
    }
}

/* Desktop: hide celebratory % badge (line-level discounts remain in price rows) */
@media (min-width: 981px) {
    #basketDiscountBadge {
        display: none !important;
    }

    .basket-sticky-promo {
        display: none;
    }
}

/* ── Clay CTA (for decision zones) ─────────────────────────────────────────── */
.basket-actions .btn-primary {
    background: var(--bc-clay);
    color: var(--bc-decision-cta-text);
    border-color: var(--bc-clay);
}

.basket-actions .btn-primary:hover {
    filter: brightness(0.95);
    box-shadow: var(--shadow-md);
}

/* ── Promo code ─────────────────────────────────────────────────────────────── */

.promo-code-row {
    margin: 1rem 0 0.5rem;
}

.promo-code-field {
    display: flex;
    gap: 8px;
}

.promo-code-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bc-surface);
    border: 1px solid var(--bc-border-strong);
    border-radius: var(--bc-radius-field);
    color: var(--bc-ink);
    font-size: 0.9rem;
    min-height: 42px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.promo-code-input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    color: var(--bc-text-warm);
}

.promo-apply-btn {
    white-space: nowrap;
    min-width: 72px;
}

.promo-code-msg {
    margin: 6px 0 0;
    font-size: 0.85rem;
}

.promo-code-msg--success {
    color: #16a34a;
}

/* ── Poster lightbox ─────────────────────────────────────────────────────── */

.poster-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.poster-lightbox[hidden] {
    display: none;
}

.poster-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.poster-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 640px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.poster-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    cursor: zoom-in;
    transition: max-width 0.25s ease, max-height 0.25s ease;
}

.poster-lightbox-img.is-zoomed {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
    border-radius: 4px;
}

.poster-lightbox-content.is-zoomed {
    max-width: 95vw;
    max-height: 95vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.poster-lightbox-hint {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    transition: opacity 0.2s;
}

.poster-lightbox-content.is-zoomed .poster-lightbox-hint {
    opacity: 0;
    pointer-events: none;
}

.poster-lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bc-ink);
    cursor: pointer;
    transition: background 0.15s ease;
}

.poster-lightbox-close:hover {
    background: var(--bc-workspace);
}

body.lightbox-open {
    overflow: hidden;
}

.promo-code-msg--error {
    color: var(--color-error, #ff8080);
}

@media (max-width: 980px) {
    .bic-action-label {
        display: none;
    }

    .bic-edit-btn,
    .bic-remove-btn {
        width: 30px;
        height: 30px;
        padding: 0;
    }
}

@media (max-width: 560px) {
    .basket-main {
        padding: 96px 16px 40px;
    }

    .basket-items-header h1 {
        font-size: 1.5rem;
    }

    .basket-item-card {
        gap: 12px;
    }

    .bic-thumb-col {
        width: 72px;
    }

    .quantity-btn {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }

    .basket-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .basket-country-select {
        max-width: 100%;
        width: 100%;
    }
}

/* ── Remove line item confirmation ───────────────────────────────────────── */
/* Native <dialog>: inset + margin auto centers in the top layer (transform alone often sticks top-left). */
.basket-remove-confirm {
    position: fixed;
    inset: 0;
    width: min(92vw, 400px);
    max-width: min(92vw, 400px);
    height: fit-content;
    max-height: min(90vh, 420px);
    margin: auto;
    border: none;
    border-radius: 16px;
    padding: 0;
    background: var(--bc-surface);
    color: var(--bc-ink);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.basket-remove-confirm::backdrop {
    background: rgba(26, 26, 26, 0.45);
    backdrop-filter: blur(2px);
}

.basket-remove-confirm-inner {
    padding: 1.35rem 1.4rem 1.25rem;
}

.basket-remove-confirm-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.basket-remove-confirm-body {
    margin: 0 0 1.15rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--bc-text-muted);
}

.basket-remove-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.basket-remove-confirm-btn {
    background: var(--bc-text-warm, #8b5a3c);
    border-color: var(--bc-text-warm, #8b5a3c);
    color: #fff;
}

.basket-remove-confirm-btn:hover {
    filter: brightness(0.95);
}
