/* „Wie viele Flaschen?“ – Auswahl vor dem Warenkorb (bottle-chooser.js) */

/* Knopf „Menge wählen“ ersetzt Mengenauswahl + „In den Warenkorb“ */
.ws-bc-form .custom-number-input { display: none; }

.ws-bc-lock { overflow: hidden; }

.ws-bc {
    --bc-ink: #000;
    --bc-gold: #c8ba00;
    --bc-line: #e1e1e1;
    --bc-muted: #7a7a7a;
    position: fixed;
    inset: 0;
    /* auch über dem Wein-Modal (wines.css .ws-wm: 10005) */
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .25s ease;
}
.ws-bc.is-open { opacity: 1; }

.ws-bc__card {
    position: relative;
    width: 100%;
    max-width: 44rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 2.25rem 2.25rem 1.75rem;
    background: #fff;
    border-top: 3px solid var(--bc-gold);
    font-family: Lato, "Helvetica Neue", Arial, sans-serif;
    color: var(--bc-ink);
    transform: translateY(12px);
    transition: transform .25s ease;
}
.ws-bc.is-open .ws-bc__card { transform: none; }

.ws-bc__close {
    position: absolute;
    top: .75rem;
    right: .9rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--bc-muted);
    cursor: pointer;
}
.ws-bc__close:hover { color: var(--bc-ink); }

.ws-bc__title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 100;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ws-bc__product {
    margin: .4rem 0 1.5rem;
    font-size: .95rem;
    color: var(--bc-muted);
}

.ws-bc__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .75rem;
}
.ws-bc__option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: 1.1rem .6rem 1rem;
    border: 1px solid var(--bc-line);
    border-radius: 0;
    background: #fff;
    font: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, transform .2s;
}
.ws-bc__option:hover,
.ws-bc__option:focus-visible {
    border-color: var(--bc-ink);
    transform: translateY(-2px);
    outline: none;
}
.ws-bc__option.is-selected {
    border-color: var(--bc-ink);
    box-shadow: inset 0 0 0 1px var(--bc-ink);
}

.ws-bc__crate {
    display: grid;
    grid-template-columns: repeat(3, 9px);
    gap: 3px;
    align-content: center;
    justify-content: center;
    box-sizing: border-box;
    height: 41px; /* drei Reihen – alle Kacheln gleich hoch */
    min-width: 41px;
    margin-bottom: .6rem;
    padding: 4px;
    border: 1px solid #cfcfcf;
    background: #faf9f6;
}
.ws-bc__crate.is-double { grid-template-columns: repeat(6, 9px); }
.ws-bc__crate i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #555 0, #111 60%);
}

.ws-bc__label { font-size: .95rem; font-weight: 700; }
.ws-bc__note { font-size: .75rem; color: var(--bc-muted); }
.ws-bc__price { margin-top: .35rem; font-size: .9rem; }

.ws-bc__other {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin: 1.1rem 0 0;
    font-size: .85rem;
}
.ws-bc__other-input {
    width: 5rem;
    padding: .35rem .5rem;
    border: 1px solid var(--bc-line);
    border-radius: 0;
    font: inherit;
    text-align: center;
}
.ws-bc__other.is-selected .ws-bc__other-input,
.ws-bc__other-input:focus {
    border-color: var(--bc-ink);
    outline: none;
}

.ws-bc__total {
    margin: 1.4rem 0 0;
    font-size: 1.25rem;
    font-weight: 300;
    text-align: center;
}

.ws-bc__legal {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--bc-line);
    font-size: .8rem;
    line-height: 1.55;
    text-align: center;
    color: var(--bc-muted);
}
.ws-bc__legal p { margin: 0 0 .35rem; }
.ws-bc__legal a { color: inherit; text-decoration: underline; }

.ws-bc .ws-bc__confirm,
.ws-bc .ws-bc__confirm.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    min-height: 56px;
    margin-top: 1.25rem;
    padding: .9rem 1.5rem;
    border: 1px solid #000;
    border-radius: 0;
    background: #000;
    color: #fff;
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: 1;
    box-shadow: none;
    transition: background-color .2s, color .2s;
}
/* Das Theme (.btn) macht den Knopf sonst transparent mit grauer Schrift – daher .ws-bc davor */
.ws-bc .ws-bc__confirm:hover,
.ws-bc .ws-bc__confirm:focus-visible,
.ws-bc .ws-bc__confirm.btn:hover,
.ws-bc .ws-bc__confirm.btn:focus-visible {
    background: #fff;
    color: #000;
    border-color: #000;
    outline: 2px solid #c8ba00;
    outline-offset: 2px;
}
.ws-bc__confirm-price { font-weight: 400; letter-spacing: .04em; }

@media (max-width: 575.98px) {
    .ws-bc { align-items: flex-end; padding: 0; }
    .ws-bc__card { padding: 2rem 1.25rem 1.25rem; max-height: 92vh; }
    .ws-bc__options { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .5rem; }
    .ws-bc__title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ws-bc, .ws-bc__card, .ws-bc__option { transition: none; }
}
