/* The shopping bag extends the collection's quiet ivory and taupe palette. */
:root{
  --bag-ink:#302b24;
  --bag-muted:#756b5f;
  --bag-line:#d9d1c5;
  --bag-paper:#f7f5f0;
  --bag-accent:#8d7256;
}

.masthead{position:sticky;top:0}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:20px;flex-shrink:0}
.header-actions .languages{gap:3px}
.header-actions .languages [data-lang]{min-width:44px;min-height:44px;padding:10px 7px}
.bag-open{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;padding:8px 4px;color:var(--bag-ink)}
.bag-open svg{display:block;width:21px;height:23px;flex-shrink:0;stroke-width:1.25}
/* One quiet glint, with a long rest between appearances. */
.bag-open::after{content:"";position:absolute;left:20px;top:calc(50% - 13px);width:7px;height:7px;background:var(--bag-accent);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:0;pointer-events:none;animation:bag-glint 8s ease-in-out .6s infinite}
.bag-is-open .bag-open::after{visibility:hidden;animation-play-state:paused}
.bag-count{display:inline-flex;align-items:center;justify-content:center;min-width:17px;min-height:17px;font-size:10px;font-variant-numeric:tabular-nums;line-height:1}
.bag-count:empty{display:none}

.product-purchase{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:5px 16px;margin-top:13px;padding-top:8px;border-top:1px solid var(--bag-line)}
.price-pending{margin:0;color:var(--bag-muted);font-size:10px;letter-spacing:.015em;line-height:1.5}
.save-piece{min-height:44px;max-width:100%;padding:10px 0;font-size:11px;line-height:1.5;text-align:right;text-decoration:underline;text-decoration-color:#c3b6a4;text-underline-offset:5px;text-decoration-thickness:1px;transition:color .2s ease,text-decoration-color .2s ease}
.save-piece[aria-pressed="true"]{color:#73614e}
.detail-purchase{margin-top:25px;padding-top:21px;border-top:1px solid var(--bag-line);display:flex;flex-direction:column;align-items:stretch;gap:12px}
.detail-layout .detail-purchase .price-pending{margin:0;font-size:11px;color:var(--bag-muted)}
.detail-purchase .save-piece{width:100%;padding:15px 20px;background:var(--bag-ink);color:var(--bag-paper);text-align:center;text-decoration:none;letter-spacing:.025em;min-height:48px}
.detail-purchase .save-piece[aria-pressed="true"]{background:#655748;color:#fff}

body.bag-is-open{overflow:hidden}
.bag-dialog{position:fixed;inset:0 0 0 auto;width:min(500px,100vw);max-width:100vw;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;overflow:hidden;background:var(--bag-paper);color:var(--bag-ink);border:0;box-shadow:-18px 0 70px #30251c14;overscroll-behavior:contain}
.bag-dialog::backdrop{background:#211c1766;backdrop-filter:blur(4px)}
.bag-dialog[open]{animation:bag-enter .28s cubic-bezier(.2,.7,.3,1) both}
.bag-shell{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.bag-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:32px 32px 19px;flex-shrink:0}
.bag-heading .eyebrow{margin:0 0 11px;color:var(--bag-muted);font-size:9px;letter-spacing:.18em}
.bag-heading h2{font-family:EditorialFallback,Baskerville,'Times New Roman',serif;font-weight:400;font-size:42px;letter-spacing:-.025em;line-height:1.05;margin:0}
#bag-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;margin:-7px -10px 0 0;padding:9px;border-radius:50%;font-size:28px;font-weight:300;line-height:1;transition:background .2s ease}
#bag-close svg{width:20px;height:20px;stroke-width:1.25}
.bag-intro{margin:0;padding:0 32px 19px;color:var(--bag-muted);font-size:12px;line-height:1.7;flex-shrink:0}
.bag-notice{margin:0 32px 6px;padding:14px 16px;background:#ede7dd;border:1px solid #e1d8ca;font-size:11px;line-height:1.7;color:#6f5f4c;flex-shrink:0}
.bag-notice p{margin:0}
.bag-notice strong{font-weight:500;color:#514637}
.bag-items{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 32px;scrollbar-width:thin;scrollbar-color:#c4b7a5 transparent}
.bag-item{display:grid;grid-template-columns:100px minmax(0,1fr);gap:20px;padding:26px 0;border-bottom:1px solid var(--bag-line)}
.bag-item:last-child{border-bottom:0}
.bag-image{width:100%;height:126px;object-fit:contain;background:#f0ede6;mix-blend-mode:multiply}
.bag-item-info{min-width:0;display:flex;flex-direction:column;align-items:flex-start;padding-top:3px}
.bag-item-name{font-size:12px;font-weight:400;line-height:1.65;margin:0 0 6px;overflow-wrap:anywhere}
.bag-item-price{font-size:10px;color:var(--bag-muted);margin:0 0 14px;line-height:1.5}
.bag-item-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;width:100%;margin-top:auto}
.quantity-control{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cfc4b4;min-height:44px;max-width:100%;background:#ffffff24}
.quantity-control button{display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;padding:0;font-size:16px;font-weight:300;line-height:1}
.quantity-control span{display:inline-flex;align-items:center;justify-content:center;min-width:24px;max-width:40px;padding:0 2px;font-size:11px;font-variant-numeric:tabular-nums;line-height:1}
.quantity-control button:disabled{cursor:default;color:#b4aa9d}
.bag-remove{min-height:44px;padding:10px 0;font-size:10px;line-height:1.5;color:var(--bag-muted);text-decoration:underline;text-decoration-color:#c3b6a4;text-underline-offset:4px}
.bag-empty{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;padding:45px 32px;text-align:center;color:var(--bag-muted)}
.bag-items .bag-empty{min-height:260px;padding-left:0;padding-right:0}
.bag-empty>svg,.bag-empty .bag-empty-icon{display:block;width:42px;height:48px;margin-bottom:24px;color:#a39480;stroke-width:1}
.bag-empty h3{font-family:EditorialFallback,Baskerville,'Times New Roman',serif;font-size:28px;line-height:1.15;font-weight:400;letter-spacing:-.015em;margin:0 0 12px;color:var(--bag-ink)}
.bag-empty p{max-width:250px;font-size:12px;line-height:1.8;margin:0 0 20px}
.bag-browse{display:inline-flex;align-items:center;justify-content:center;min-height:48px;max-width:100%;padding:13px 24px;border:1px solid #b8a78e;font-size:11px;color:var(--bag-ink);line-height:1.5}
.bag-footer{display:block;flex:0 0 auto;padding:20px 32px max(20px,env(safe-area-inset-bottom));background:#f1ede5;border-top:1px solid var(--bag-line);font-size:11px;color:var(--bag-ink)}
.bag-save-status{margin:0 0 16px;font-size:10px;line-height:1.6;color:var(--bag-muted)}
.bag-summary{display:flex;align-items:baseline;justify-content:space-between;gap:20px;margin-bottom:17px;font-size:12px;line-height:1.5}
.bag-summary span:last-child{font-family:EditorialFallback,Baskerville,'Times New Roman',serif;font-size:21px;font-weight:400;line-height:1.2}
.bag-checkout{display:block;width:100%;min-height:48px;padding:14px 18px;background:var(--bag-ink);color:#fff;font-size:11px;line-height:1.5;text-align:center;letter-spacing:.025em}
.bag-checkout:disabled{background:#ded6c9;color:#6f6456;cursor:not-allowed}
.bag-disclaimer{max-width:330px;margin:11px auto 0;font-size:10px;line-height:1.7;text-align:center;color:var(--bag-muted)}
.bag-privacy{margin:14px 0 0;padding-top:12px;border-top:1px solid var(--bag-line);font-size:11px;line-height:1.6;color:var(--bag-muted)}
.bag-continue{display:block;min-height:44px;max-width:100%;margin:8px auto -5px;padding:10px 14px;font-size:10px;line-height:1.5;color:#605547;text-decoration:underline;text-decoration-color:#bcb09d;text-underline-offset:4px}
.bag-toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));z-index:30;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 40px);padding:14px 22px;background:#302b24;color:#f7f5f0;box-shadow:0 5px 24px #241c1829;font-size:11px;line-height:1.7;text-align:center;pointer-events:none}
.bag-dialog button:focus-visible,.bag-open:focus-visible,.save-piece:focus-visible,.header-actions .languages [data-lang]:focus-visible{outline:2px solid var(--bag-accent);outline-offset:4px}
.quantity-control button:focus-visible{outline-offset:-4px}

@media(hover:hover){
  .bag-open:hover{color:#8b7051}
  .save-piece:hover,.bag-remove:hover,.bag-continue:hover{text-decoration-color:currentColor;color:#4b3d2d}
  .detail-purchase .save-piece:hover,.bag-checkout:not(:disabled):hover{background:#554636;color:#fff}
  #bag-close:hover,.quantity-control button:not(:disabled):hover{background:#e9e2d7}
  .bag-browse:hover{background:#e9e2d7}
}

@media(max-width:700px){
  html{scroll-padding-top:64px}
  .header-actions{gap:8px}
  .header-actions .languages{gap:0}
  .header-actions .languages [data-lang]{padding:10px 4px}
  .product-purchase{margin-top:13px}
  .price-pending{font-size:10px}
  .detail-purchase{margin-top:20px}
}
@media(max-width:560px){
  html{scroll-padding-top:100px}
  .masthead{display:grid;grid-template-columns:minmax(0,1fr) auto;height:auto;min-height:96px;column-gap:12px;row-gap:0;padding-top:7px;padding-bottom:3px}
  .masthead>.wordmark{grid-column:1;grid-row:1;max-width:100%}
  .masthead>.header-actions{grid-column:2;grid-row:1}
  .masthead>nav{grid-column:1 / -1;grid-row:2;justify-content:center;align-items:center;min-height:38px}
  .masthead nav a:first-child{display:flex;align-items:center;justify-content:center;min-height:44px;padding:6px 16px}
}
@media(max-width:420px){
  .bag-heading{padding:26px 24px 17px}
  .bag-heading h2{font-size:38px}
  .bag-intro{padding:0 24px 17px;font-size:11px}
  .bag-notice{margin:0 24px 5px;padding:12px 14px;font-size:10px}
  .bag-items{padding:0 24px}
  .bag-item{grid-template-columns:78px minmax(0,1fr);gap:16px;padding:22px 0}
  .bag-image{height:100px}
  .bag-item-name{font-size:11px;line-height:1.6}
  .bag-item-price{margin-bottom:10px}
  .bag-item-controls{gap:0 10px}
  .bag-footer{padding:16px 24px max(16px,env(safe-area-inset-bottom))}
  .bag-save-status{margin-bottom:12px}
  .bag-summary{margin-bottom:13px}
  .bag-empty{padding:32px 24px}
}
@media(max-height:650px){
  .bag-heading{padding-top:17px;padding-bottom:12px}
  .bag-heading h2{font-size:34px}
  .bag-heading .eyebrow{margin-bottom:6px}
  .bag-intro{padding-bottom:12px}
  .bag-notice{padding-top:10px;padding-bottom:10px}
  .bag-footer{padding-top:13px;padding-bottom:max(13px,env(safe-area-inset-bottom))}
  .bag-save-status{margin-bottom:9px}
  .bag-summary{margin-bottom:10px}
  .bag-empty{padding-top:24px;padding-bottom:24px}
  .bag-empty>svg,.bag-empty .bag-empty-icon{margin-bottom:15px}
}
@keyframes bag-enter{from{transform:translateX(28px);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes bag-glint{0%,20%,100%{opacity:0}10%{opacity:.58}}
@media(prefers-reduced-motion:reduce){.bag-open::after{content:none;animation:none}.bag-dialog[open]{animation:none}.bag-dialog button,.save-piece{transition:none}}
