/* The cart that floats on the right of the store: a frosted panel with a gold hairline, a glowing piece count, one tidy row per piece (or per
   category when the cart is big) and a gold-edged Checkout button. Colours follow the store theme. */

.cs-box { position: relative; display: flex; flex-direction: column; max-height: calc(100vh - var(--header-height, 90px) - 1.5rem); padding: 1rem 1rem .9rem; border-radius: 1.4rem; overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 251, 245, .96));
    border: 1px solid rgba(var(--maroon-rgb, 123, 30, 58), .13);
    box-shadow: 0 22px 50px rgba(60, 20, 40, .2), 0 2px 0 rgba(var(--gold-rgb, 201, 162, 39), .35) inset; }
.cs-box::before { content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-light, #e8c766), transparent); box-shadow: 0 0 14px 1px rgba(var(--gold-rgb, 201, 162, 39), .7); }

.cs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.cs-title { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display, 'Playfair Display', serif); font-weight: 700; font-size: 1.12rem; color: var(--maroon-dark, #5c1329); }
.cs-title i { color: var(--gold-dark, #a3801d); font-size: 1.1rem; }
.cs-count { min-width: 1.9rem; height: 1.9rem; padding: 0 .55rem; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 800; font-size: .82rem; color: #2a1a22;
    background: linear-gradient(135deg, var(--gold-light, #e8c766), var(--gold, #c9a227) 60%, var(--gold-dark, #a3801d)); box-shadow: 0 0 0 3px rgba(var(--gold-rgb, 201, 162, 39), .2), 0 4px 12px rgba(var(--gold-rgb, 201, 162, 39), .45); }

.cs-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .15rem; margin: 0 -.35rem .6rem; padding: 0 .35rem; scrollbar-width: thin; scrollbar-color: rgba(var(--maroon-rgb, 123, 30, 58), .3) transparent; }
.cs-items::-webkit-scrollbar { width: 6px; }
.cs-items::-webkit-scrollbar-thumb { background: rgba(var(--maroon-rgb, 123, 30, 58), .25); border-radius: 6px; }

.cs-item { display: grid; grid-template-columns: 3.1rem 1fr auto; gap: .65rem; align-items: center; padding: .5rem .4rem; border-radius: 1rem; transition: background .18s; }
.cs-item:hover { background: rgba(var(--maroon-rgb, 123, 30, 58), .045); }
.cs-item img { width: 3.1rem; height: 3.1rem; object-fit: cover; border-radius: .85rem; background: var(--ivory-deep, #f7ecd9); border: 1px solid rgba(var(--gold-rgb, 201, 162, 39), .4); box-shadow: 0 4px 10px rgba(60, 20, 40, .12); }
.cs-info { min-width: 0; }
.cs-name { font-weight: 700; font-size: .84rem; line-height: 1.25; color: #2a1a22; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cs-var { font-size: .73rem; color: #8a7b72; }
.cs-qty { font-size: .73rem; color: #8a7b72; margin-top: .1rem; }
.cs-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.cs-price { font-weight: 800; font-size: .84rem; color: var(--maroon-dark, #5c1329); white-space: nowrap; }
.cs-rm { width: 1.55rem; height: 1.55rem; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: .62rem; color: #a39489; background: transparent; transition: background .15s, color .15s, transform .15s; }
.cs-rm:hover, .cs-rm:focus-visible { background: #fde8e8; color: #c0392b; transform: rotate(90deg); outline: 0; }

/* a category when the cart is big: overlapping thumbnails, the name, "19 pieces", the amount */
.cs-group { border-radius: 1rem; border: 1px solid rgba(var(--maroon-rgb, 123, 30, 58), .08); background: rgba(var(--maroon-rgb, 123, 30, 58), .025); margin: .12rem 0; }
.cs-group[open] { background: rgba(var(--gold-rgb, 201, 162, 39), .07); border-color: rgba(var(--gold-rgb, 201, 162, 39), .35); }
.cs-group > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto auto; gap: .6rem; align-items: center; padding: .55rem .6rem; cursor: pointer; border-radius: 1rem; }
.cs-group > summary::-webkit-details-marker { display: none; }
.cs-group > summary:hover { background: rgba(var(--maroon-rgb, 123, 30, 58), .05); }
.cs-group > summary:focus-visible { outline: 3px solid rgba(var(--maroon-rgb, 123, 30, 58), .3); outline-offset: 1px; }
.cs-stack { display: inline-flex; padding-left: .55rem; }
.cs-stack img { width: 2.1rem; height: 2.1rem; border-radius: 50%; object-fit: cover; margin-left: -.55rem; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); background: var(--ivory-deep, #f7ecd9); }
.cs-ginfo { display: flex; flex-direction: column; min-width: 0; }
.cs-gname { font-weight: 800; font-size: .86rem; color: var(--maroon-dark, #5c1329); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-gmeta { font-size: .73rem; color: #8a7b72; }
.cs-chev { font-size: .75rem; color: var(--maroon, #7b1e3a); transition: transform .25s; }
.cs-group[open] .cs-chev { transform: rotate(180deg); }
.cs-gitems { padding: 0 .3rem .4rem; border-top: 1px dashed rgba(var(--maroon-rgb, 123, 30, 58), .12); }

.cs-total { display: flex; align-items: baseline; justify-content: space-between; padding: .7rem .2rem .55rem; border-top: 1px solid rgba(var(--maroon-rgb, 123, 30, 58), .1); color: #6e5f57; font-size: .85rem; font-weight: 600; }
.cs-total b { font-family: var(--font-display, 'Playfair Display', serif); font-size: 1.35rem; color: var(--maroon-dark, #5c1329); }

.cs-actions { display: flex; gap: .5rem; }
.cs-view, .cs-go { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.6rem; border-radius: 999px; font-weight: 800; font-size: .82rem; text-decoration: none !important; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .15s; }
.cs-view { color: var(--maroon, #7b1e3a); background: #fff; border: 1.5px solid rgba(var(--maroon-rgb, 123, 30, 58), .25); }
.cs-view:hover { background: var(--maroon-tint, #fbf1f4); border-color: var(--maroon, #7b1e3a); color: var(--maroon, #7b1e3a); }
.cs-go { position: relative; overflow: hidden; color: #fff; border: 1px solid rgba(var(--gold-rgb, 201, 162, 39), .75);
    background: linear-gradient(135deg, var(--maroon, #7b1e3a), var(--maroon-dark, #5c1329)); box-shadow: 0 8px 20px rgba(var(--maroon-rgb, 123, 30, 58), .32), inset 0 1px 0 rgba(255, 255, 255, .2); }
.cs-go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-18deg); transition: left .6s; }
.cs-go:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(var(--maroon-rgb, 123, 30, 58), .4), 0 0 0 3px rgba(var(--gold-rgb, 201, 162, 39), .3); }
.cs-go:hover::after { left: 120%; }
.cs-go i { color: var(--gold-light, #e8c766); transition: transform .2s; }
.cs-go:hover i { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) { .cs-go::after, .cs-chev, .cs-rm, .cs-go i { transition: none; } }
