/* ========================================================
   Till layout - shown after sign-in
   Two columns: catalogue left, basket right
   ======================================================== */

.till {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    grid-template-rows: 64px 1fr;
    grid-template-areas:
        "header header"
        "left   right";
    overflow: hidden;
    background: var(--bb-canvas);
}

/* ============================================================
   Top bar
   ============================================================ */
.till__header {
    grid-area: header;
    background: var(--bb-walnut);
    color: var(--bb-text-on-chrome);
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    border-bottom: 3px solid var(--bb-jute);
}
.till__brand {
    font-family: var(--bb-display);
    font-size: 18px;
    font-weight: 700;
}
.till__brand-mark {
    color: var(--bb-jute);
    margin-right: 4px;
}
.till__search-wrap {
    position: relative;
    max-width: 480px;
}
.till__search {
    width: 100%;
    height: 40px;
    background: var(--bb-walnut-soft);
    border: 1px solid rgba(184,149,106,0.25);
    border-radius: var(--bb-radius-sm);
    color: var(--bb-text-on-chrome);
    padding: 0 14px;
    font-size: 14px;
}
.till__search::placeholder { color: var(--bb-text-on-chrome-muted); }
.till__search:focus { outline: 1px solid var(--bb-jute); }

.till__operator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--bb-text-on-chrome-muted);
}
.till__operator strong {
    color: var(--bb-text-on-chrome);
    font-weight: 600;
}

.till__lock-btn {
    height: 36px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid rgba(184,149,106,0.4);
    border-radius: var(--bb-radius-sm);
    color: var(--bb-text-on-chrome);
    font-family: var(--bb-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ============================================================
   Left pane - catalogue + product grid
   ============================================================ */
.till__left {
    grid-area: left;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.till__shop-tabs {
    background: var(--bb-card-alt);
    border-bottom: 1px solid var(--bb-line);
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.till__shop-tabs::-webkit-scrollbar { display: none; }
.till__shop-tab {
    height: 38px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--bb-radius-sm);
    font-family: var(--bb-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bb-text-tertiary);
    font-weight: 700;
    white-space: nowrap;
}
.till__shop-tab.is-active {
    background: var(--bb-meadow);
    color: var(--bb-text-on-chrome);
}

.till__category-pills {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--bb-line);
    background: var(--bb-canvas);
}
.till__category-pills::-webkit-scrollbar { display: none; }
.till__category-pill {
    height: 36px;
    padding: 0 14px;
    background: var(--bb-card);
    border: 1px solid var(--bb-line);
    border-radius: 18px;
    font-size: 13px;
    color: var(--bb-text-secondary);
    white-space: nowrap;
}
.till__category-pill.is-active {
    background: var(--bb-text-primary);
    color: var(--bb-text-on-chrome);
    border-color: var(--bb-text-primary);
}

.till__grid-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.till__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.till__tile {
    aspect-ratio: 1;
    background: var(--bb-card);
    border: 1px solid var(--bb-line);
    border-radius: var(--bb-radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    transition: transform 0.05s;
}
.till__tile:active { transform: scale(0.96); }
.till__tile-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bb-text-primary);
}
.till__tile-price {
    font-family: var(--bb-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--bb-meadow);
}
.till__tile-swatch {
    width: 100%;
    height: 36px;
    border-radius: var(--bb-radius-sm);
    margin-bottom: 8px;
    background: var(--bb-jute-tint);
    display: grid;
    place-items: center;
    font-size: 22px;
}

/* ============================================================
   Right pane - basket
   ============================================================ */
.till__right {
    grid-area: right;
    background: var(--bb-meadow);
    color: var(--bb-text-on-chrome);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.till__basket-header {
    padding: 16px 18px 10px;
    border-bottom: 1px solid var(--bb-meadow-deep);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 10px;
}
.till__basket-title {
    font-family: var(--bb-display);
    font-size: 18px;
    font-weight: 700;
}
.till__basket-clear {
    background: var(--bb-critical);
    color: white;
    border: none;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--bb-radius-sm);
    font-family: var(--bb-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}

.till__basket-customer {
    padding: 10px 18px;
    background: var(--bb-meadow-deep);
    font-size: 12px;
    color: var(--bb-text-on-chrome-muted);
}
.till__basket-customer strong { color: var(--bb-text-on-chrome); font-weight: 600; }

.till__basket-lines {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.till__basket-line {
    padding: 10px 18px;
    border-bottom: 1px solid rgba(244, 236, 224, 0.08);
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}
.till__basket-line-info { min-width: 0; }
.till__basket-line-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bb-text-on-chrome);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.till__basket-line-meta {
    font-size: 11px;
    color: var(--bb-text-on-chrome-muted);
    margin-top: 2px;
    font-family: var(--bb-mono);
}
.till__basket-line-total {
    font-family: var(--bb-mono);
    font-weight: 700;
    color: var(--bb-text-on-chrome);
}
.till__basket-line-remove {
    width: 28px;
    height: 28px;
    background: var(--bb-critical);
    border: none;
    border-radius: var(--bb-radius-sm);
    color: white;
    font-size: 14px;
    line-height: 1;
}

.till__basket-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--bb-text-on-chrome-muted);
    font-size: 13px;
}

.till__basket-totals {
    padding: 14px 18px;
    border-top: 1px solid var(--bb-meadow-deep);
    background: var(--bb-meadow-deep);
}
.till__basket-row {
    display: grid;
    grid-template-columns: 1fr auto;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--bb-text-on-chrome-muted);
}
.till__basket-row--total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(244, 236, 224, 0.15);
    font-family: var(--bb-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--bb-text-on-chrome);
}
.till__basket-row .tabular { font-family: var(--bb-mono); }

.till__basket-actions {
    padding: 12px 18px 16px;
    background: var(--bb-meadow-deep);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.till__action-btn {
    height: 56px;
    background: var(--bb-card);
    color: var(--bb-text-primary);
    border: none;
    border-radius: var(--bb-radius-sm);
    font-family: var(--bb-display);
    font-size: 13px;
    font-weight: 700;
}

.till__pay-buttons {
    padding: 0 18px 16px;
    background: var(--bb-meadow-deep);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.till__pay-btn {
    height: var(--bb-touch-cta);
    background: var(--bb-jute);
    color: var(--bb-meadow-deep);
    border: none;
    border-radius: var(--bb-radius-sm);
    font-family: var(--bb-display);
    font-size: 14px;
    font-weight: 700;
}
.till__pay-btn:disabled {
    opacity: 0.4;
    background: var(--bb-text-tertiary);
}

/* ============================================================
   Hidden when display: none doesn't apply due to grid
   ============================================================ */
[hidden] { display: none !important; }
