/* Cart panel (sticky aside >= lg; bottom sheet below), meter, mobile bar */

.cart-aside { min-width: 0; }
@media (min-width: 992px) {
    .cart-aside {
        position: sticky; top: calc(var(--topbar-h) + 12px);
        max-height: calc(100vh - var(--topbar-h) - 24px);
        display: flex; flex-direction: column;
    }
}

.cart-panel {
    background: var(--bg-1); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-1);
    display: flex; flex-direction: column;
    max-height: 100%; overflow: hidden;
}

.cart-panel__head {
    display: flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
    border-bottom: 1px solid var(--border);
}
.cart-panel__head .head-label {
    font-size: 12px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--gold);
}
.cart-panel__head .head-count { color: var(--text-3); font-size: 13px; }
.cart-panel__head .btn-close-panel { margin-left: auto; }
@media (min-width: 992px) { .cart-panel__head .btn-close-panel { display: none; } }

.cart-panel__scroll { overflow-y: auto; padding: var(--sp-4); flex: 1; min-height: 0; }
.cart-panel__foot {
    border-top: 1px solid var(--border); padding: var(--sp-4);
    background: var(--bg-1);
}

/* ---------- meter ---------- */
.meter-block { margin-bottom: var(--sp-4); }
.meter {
    position: relative; height: 14px; border-radius: var(--r-pill);
    background: var(--bg-0); border: 1px solid var(--border);
    overflow: visible;
}
.meter-fill {
    position: absolute; inset: 0 auto 0 0; border-radius: var(--r-pill);
    background: var(--success); max-width: 100%;
    transition: width var(--t-slow) var(--ease), background var(--t-fast);
}
.meter-fill.warn { background: var(--warn); }
.meter-fill.over { background: var(--danger); }
.meter-over-seg {
    position: absolute; top: 0; bottom: 0; left: 100%;
    background: repeating-linear-gradient(45deg, var(--danger) 0 6px, #7c2a22 6px 12px);
    border-radius: 0 var(--r-pill) var(--r-pill) 0;
}
.meter-tick {
    position: absolute; top: -3px; bottom: -3px; width: 2px;
    background: var(--border-input);
}
.meter-tick[data-major] { background: var(--gold); }
.meter-caption {
    display: flex; justify-content: space-between; gap: var(--sp-3);
    margin-top: 6px; font-size: 13px; color: var(--text-2);
}
.meter-caption .over-note { color: var(--danger-text); font-weight: 600; }
.tier-hint { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.tier-hint b { color: var(--gold); font-weight: 600; }

/* ---------- package selector (etsy) ---------- */
.package-row { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.package-row select { flex: 1; }
.package-row input { width: 110px; }

/* ---------- selected items ---------- */
.cart-items { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.cart-item {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--sp-3); align-items: center;
    padding: var(--sp-2) 0; border-bottom: 1px solid var(--border);
}
.cart-item__name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item__meta { font-size: 12px; color: var(--text-3); }
.cart-item__controls { grid-row: span 2; display: flex; align-items: center; gap: var(--sp-1); }
.cart-item__controls .btn-icon { width: 30px; height: 30px; min-height: 30px; font-size: 15px; }
.cart-item__qty { min-width: 26px; text-align: center; font-weight: 600; font-size: 14px; }

/* ---------- price table ---------- */
.price-rows { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-3); }
.price-rows td { padding: 3px 0; font-size: 14px; color: var(--text-2); }
.price-rows td.num { text-align: right; color: var(--text-1); font-weight: 500; }
.price-rows tr.grand td {
    padding-top: 8px; border-top: 1px solid var(--border);
    font-weight: 700; font-size: 16px; color: var(--text-1);
}
.info-dot {
    display: inline-flex; width: 16px; height: 16px; border-radius: 50%;
    border: 1px solid var(--border-input); color: var(--text-3);
    font-size: 10px; align-items: center; justify-content: center;
    background: none; cursor: help; padding: 0; margin-left: 6px; vertical-align: 1px;
}

/* ---------- build code block (etsy) ---------- */
.build-code-block {
    background: var(--bg-2); border: 1px dashed var(--gold);
    border-radius: var(--r-md); padding: var(--sp-4); text-align: center;
    margin-bottom: var(--sp-3);
}
.build-code {
    font-size: 24px; font-weight: 700; letter-spacing: .12em;
    color: var(--gold-strong); font-family: var(--font-body);
}
.build-code-actions { display: flex; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-3); flex-wrap: wrap; }
.build-code-help { font-size: 13px; color: var(--text-2); margin-top: var(--sp-3); }

/* share link box */
.share-box { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.share-box input { flex: 1; font-size: 13px; }

/* actions */
.cart-actions { display: flex; flex-direction: column; gap: var(--sp-2); }
.cart-actions .row2 { display: flex; gap: var(--sp-2); }
.cart-actions .row2 .btn { flex: 1; }
details.notes-details { margin-top: var(--sp-3); }
details.notes-details summary { cursor: pointer; color: var(--text-2); font-size: 14px; }
details.notes-details textarea { margin-top: var(--sp-2); }

/* ---------- mobile bottom bar ---------- */
.mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; align-items: center; gap: var(--sp-3);
    background: var(--bg-1); border-top: 2px solid var(--gold);
    padding: 10px var(--sp-4);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .4);
}
.mobile-bar .bar-stats { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-bar .bar-stats .dim { display: block; font-weight: 400; }
.mobile-bar .btn { margin-left: auto; flex: 0 0 auto; }
@media (min-width: 992px) { .mobile-bar { display: none; } }
body.has-mobile-bar { padding-bottom: 84px; }
@media (min-width: 992px) { body.has-mobile-bar { padding-bottom: 0; } }

/* offcanvas (bottom sheet) overrides */
.offcanvas-cart { --bs-offcanvas-height: 88vh; --bs-offcanvas-bg: transparent; border: none; }
.offcanvas-cart .cart-panel { border-radius: var(--r-lg) var(--r-lg) 0 0; height: 100%; }
@media (min-width: 992px) {
    .offcanvas-cart { position: static; visibility: visible !important; transform: none !important; height: auto; }
}

/* ---------- volume pricing scale ---------- */
.scale-block { margin-bottom: var(--sp-4); }
.scale-table { width: 100%; border-collapse: collapse; }
.scale-table td {
    padding: 5px 8px; font-size: 13px; color: var(--text-2);
    border-radius: var(--r-sm);
}
.scale-table td.num { text-align: right; font-weight: 600; color: var(--text-1); }
.scale-table .per { font-weight: 400; color: var(--text-3); font-size: 11px; }
.scale-table tr.is-active td {
    background: rgba(227, 184, 79, .14);
    color: var(--text-1);
}
.scale-table tr.is-active td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.scale-table tr.is-active td.num { color: var(--gold); }
.scale-note {
    margin: var(--sp-2) 0 0; font-size: 12px; color: var(--text-3); line-height: 1.45;
}
.min-order-note {
    margin: 0 0 var(--sp-2); font-size: 13px; color: var(--warn);
    text-align: center;
}

.finish-note {
    margin: var(--sp-2) 0 0; font-size: 12px; color: var(--text-3); line-height: 1.45;
}
.finish-note strong { color: var(--text-2); }

/* ---------- Texas -> Etsy hand-off inside the checkout modal ---------- */
.etsy-handoff {
    background: var(--bg-2); border: 1px dashed var(--gold);
    border-radius: var(--r-md); padding: var(--sp-4); margin-top: var(--sp-3);
}
.etsy-handoff h3 {
    font-family: var(--font-body); font-size: 16px; font-weight: 600;
    color: var(--gold); margin: 0 0 var(--sp-2);
}
.etsy-handoff p { font-size: 14px; margin: 0 0 var(--sp-2); }
.etsy-handoff__code {
    font-size: 22px; font-weight: 700; letter-spacing: .12em;
    color: var(--gold-strong); text-align: center; margin: var(--sp-3) 0;
}
.etsy-handoff__actions {
    display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center;
}
