/* Shared visual vocabulary for the purchase flow. */
.storefront {
  --purchase-paper:#fbf7ee;
  --purchase-cream:#eee6d8;
  --purchase-line:#d6c8b6;
  --purchase-radius:8px;
  --purchase-gap:clamp(16px,3vw,32px);
  --purchase-motion:180ms ease;
}
.storefront:not(.purchase-view) .store-checkout,
.purchase-view .store-hero,.purchase-view .collection,.purchase-view #product,
.purchase-view .gift,.purchase-view .store-experience,
.track-view .store-hero,.track-view .collection,.track-view #product,
.track-view .gift,.track-view .store-experience,.track-view .store-checkout {display:none!important}
.storefront .store-checkout {background:var(--purchase-cream);color:var(--ink);min-height:48vh}
.storefront .store-checkout .eyebrow {color:var(--wine)}
.storefront .store-checkout .store-demo {color:var(--muted)}
.storefront .checkout-steps {gap:8px clamp(10px,3vw,34px);margin:25px 0;padding:0 0 18px;border-bottom:1px solid var(--purchase-line)}
.storefront .checkout-steps li {color:#5d5348;font-size:.85rem}
.storefront .checkout-steps li span {border-color:#998471;color:var(--wine)}
.storefront .checkout-steps li[aria-current] {color:var(--wine)}
.storefront .checkout-steps li[aria-current] span {background:var(--wine);color:var(--purchase-paper);border-color:var(--wine)}
.storefront .checkout-layout {gap:var(--purchase-gap);grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr)}
.storefront .checkout-summary {position:sticky;top:18px;border:1px solid var(--purchase-line);border-radius:var(--purchase-radius);background:#f4eee2;padding:clamp(18px,3vw,28px)}
.storefront .checkout-summary > h3 {font-size:1.55rem;margin-bottom:14px}
.storefront .purchase-totals > div {border-color:var(--purchase-line)}
.storefront .purchase-totals > div:last-child {padding-top:12px}
.storefront .checkout-card,.storefront .checkout-main #checkout {
  border-radius:var(--purchase-radius);background:var(--purchase-paper);padding:clamp(16px,4vw,34px);
}
.storefront .checkout-main h3 {font-size:clamp(1.7rem,4vw,2.45rem);margin:0 0 14px}
.checkout-card > p,#buyer-step > p {color:var(--muted)}
.summary-line {display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:8px 0;overflow-wrap:anywhere}
.summary-line strong {flex-shrink:0}
.checkout-actions {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px 14px;margin-top:18px}
.storefront .checkout-main .store-cart-row,.storefront #bag .store-cart-row {grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;border-color:var(--purchase-line)}
.storefront .checkout-main .store-cart-item,.storefront #bag .store-cart-item {grid-column:1/-1}
.storefront .store-cart-item img {width:58px;height:58px;border-radius:4px}
.storefront .store-line-price {text-align:right;font-weight:700}
.storefront .checkout-main .store-remove,.storefront #bag .store-remove {color:var(--wine);padding-inline:0;justify-self:start}
.storefront .checkout-main .store-remove:hover,.storefront #bag .store-remove:hover {color:#6d3c4a;background:transparent}
.storefront #next-delivery,.storefront .store-checkout button[type=submit] {background:var(--wine);color:#fff8ed}
.storefront #next-delivery:hover,.storefront .store-checkout button[type=submit]:hover {background:#713b47}
.storefront .checkout-main #checkout label {font-size:.88rem;line-height:1.3;gap:6px}
.storefront #checkout input:not([type=checkbox]):not([type=radio]),.storefront #checkout select {
  background:#fffcf6;border:1px solid #a0927e;border-radius:5px;padding-inline:12px;min-height:48px;font-weight:400;
}
.storefront .fields {gap:7px 14px}
.storefront .delivery-options {grid-column:1/-1;border:0;padding:0;margin:0;display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
.storefront .delivery-options legend {font-weight:700;margin-bottom:12px}
.storefront .delivery-options label {border:1px solid var(--purchase-line);border-radius:5px;margin:0;min-height:54px;padding:8px 10px}
.storefront .delivery-options label:has(:checked) {border-color:var(--wine);background:#f6e9e9;color:var(--wine)}
.storefront .address-fields {border:0;border-top:1px solid var(--purchase-line);padding:10px 0 0;margin:22px 0 0}
.storefront .store-payment {border:0;padding-top:0}
.review-details {display:grid;grid-template-columns:1fr;gap:0;margin-block:12px 18px}
.review-details > div {border-bottom:1px solid var(--purchase-line);padding:12px 0;overflow-wrap:anywhere}
.review-details dt {font-weight:700;color:var(--wine);font-size:.83rem}
.review-details dd {font-size:1rem}
.storefront #bag {width:min(100%,480px);display:none}
.storefront #bag[open] {display:block}
.storefront #bag .bag-head {position:sticky;top:-16px;background:#fbf3e6;z-index:1;padding-block:8px;border-bottom:1px solid var(--purchase-line)}
.storefront #bag .bag-head button {border-color:var(--purchase-line);background:transparent;color:var(--wine)}
.bag-updated #count {animation:bag-count .32s ease}
@keyframes bag-count {50% {transform:scale(1.14)}}
.storefront button:disabled {cursor:wait}
.storefront .store-quantity button:disabled {cursor:default}
.order-view {padding-block:clamp(32px,7vw,80px);min-height:65vh}
.storefront #order:not(:empty) {padding:clamp(18px,4vw,40px);margin-top:12px;border:1px solid var(--purchase-line);border-radius:var(--purchase-radius);background:var(--purchase-paper)}
.storefront #order .order-number {letter-spacing:.09em;font-size:.84rem;font-weight:700}
.order-badge {display:inline-flex;padding:6px 12px;border-radius:4px;background:#e0ebdf;color:#254c34;font-weight:700}
.order-details {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--purchase-gap)}
.order-products {border-left:1px solid var(--purchase-line);padding-left:var(--purchase-gap)}
.storefront #order .store-secondary {color:var(--wine);border-color:var(--wine)}
.storefront #order .store-secondary:hover {color:var(--purchase-paper);background:var(--wine)}
.storefront .product-detail {border-radius:var(--purchase-radius);overflow:hidden}
.storefront .product-detail-copy .actions {align-items:end}
.storefront .product-detail-copy .actions input {border-radius:5px;min-height:48px}
.storefront .product-detail-copy .actions label {margin:0}
@media (max-width:820px) {
  .storefront .checkout-layout {grid-template-columns:minmax(0,1fr);grid-template-areas:'main' 'summary'}
  .storefront .checkout-summary {position:static}
}
@media (max-width:520px) {
  .storefront .checkout-steps li {font-size:.76rem;gap:4px}
  .storefront .checkout-steps li span {width:21px;height:21px}
  .storefront .checkout-actions button[type=submit],.storefront #next-delivery {width:100%}
  .order-details {grid-template-columns:1fr;gap:12px}
  .order-products {border:0;padding-left:0}
}
@media (prefers-reduced-motion:reduce) {.bag-updated #count {animation:none}}

/* Valle Andino purchase surfaces and controls */
.storefront {
  --deep:#101f19;
  --pine:#1b3027;
  --gold:#cfb58a;
  --cream:#f4f0e8;
  --purchase-paper:#fffaf0;
  --purchase-radius:16px;
}
.storefront .store-checkout,.storefront.track-view {background:radial-gradient(ellipse at 72% 0,#243b30,var(--deep) 66%);color:var(--cream)}
.storefront .store-checkout {min-height:70vh;padding-block:clamp(30px,5vw,72px)}
.storefront .store-checkout .eyebrow,.storefront .order-view > .eyebrow {color:var(--gold)}
.storefront .store-checkout .store-demo {color:#e0d4bf}
.storefront .checkout-steps {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;border-color:#546053}
.storefront .checkout-steps li {display:flex;align-items:center;flex-wrap:wrap;gap:6px;color:#e3d9c9;line-height:1.2}
.storefront .checkout-steps li span[aria-hidden] {color:#e3d9c9;border-color:#908471;flex-shrink:0}
.storefront .checkout-steps li .step-text {width:auto;height:auto;border:0;border-radius:0;display:inline;font:inherit;color:inherit}
.storefront .checkout-steps li[aria-current] {color:#fff6e4}
.storefront .checkout-steps li[aria-current] span[aria-hidden] {background:var(--gold);border-color:var(--gold);color:#1d271f}
.storefront .checkout-card,.storefront .checkout-main #checkout {
  color:var(--ink);box-shadow:0 22px 46px #080f0b50;margin:0;
}
.storefront .checkout-main :is(#cart-step,#buyer-step,#delivery-step,#payment-step):not([hidden]) {animation:step-in .17s ease-out}
.storefront .checkout-summary {background:var(--pine);color:var(--cream);border-color:#667163;box-shadow:0 14px 40px #080f0b38}
.checkout-summary summary {font-family:var(--serif,Georgia),serif;font-size:1.4rem;cursor:default;list-style:none}
.checkout-summary summary::-webkit-details-marker {display:none}
#summary-total {display:none}
.storefront .checkout-summary .purchase-totals > div {border-color:#697364}
.storefront .checkout-summary .purchase-totals > div:last-child dd {color:#ead2a9}
.storefront .checkout-summary .summary-line {padding-top:12px}
.storefront .checkout-main .store-text-link {color:var(--wine)}
.storefront .checkout-main #checkout .fields label {margin-bottom:7px}
.storefront .checkout-main #checkout .fields {align-items:start}
.storefront #checkout small {font-weight:400}
.storefront #checkout [type=checkbox] {accent-color:var(--wine)}
.storefront #pickup-note {border-left:2px solid var(--gold);padding-left:12px;margin:14px 0 0}
.storefront .checkout-main #checkout :is(input,select):user-invalid {border-color:#9c3450}
.storefront .checkout-main #checkout .store-secondary {border-color:#8c766a;color:var(--wine)}
.storefront .checkout-main #checkout .store-secondary:hover {background:var(--wine);color:white}
.storefront :is(button,.cta) {transition:background-color .18s,color .18s,border-color .18s}
.storefront :is(button,.cta,summary,input,select,a):focus-visible {outline:2px solid #a87436;outline-offset:3px}
.storefront [aria-disabled=true] {pointer-events:none}
.storefront button[disabled] {cursor:default}
.storefront [hidden] {display:none!important}
.storefront.track-view #open-bag {display:none}
.storefront .order-view {min-height:75vh}
.storefront #order:not(:empty) {color:var(--ink);box-shadow:0 24px 45px #080f0b50}
.storefront #order .order-badge {background:#f0e6cd;color:#594322}
.storefront #order .order-badge[data-state=approved] {background:#ddede1;color:#20523b}
.storefront #order .order-badge[data-state=rejected] {background:#f3dde2;color:#74283a}
.order-next {padding:12px 14px;background:#f0e9df;border-left:2px solid var(--gold);margin-top:18px}
.simulation-controls {border:1px solid var(--purchase-line);border-radius:9px;margin:16px 0;padding:12px}
.simulation-controls legend {padding:0 6px;font-size:.85rem;font-weight:700}
.storefront #order .store-text-link {color:var(--wine)}
.storefront #bag {
  --purchase-line:#ded1bf;
  width:min(100%,505px);padding:0;border-left:none;background:#f8f2e7;
  box-shadow:-18px 0 60px #09110b55;overscroll-behavior:contain;
}
.storefront #bag[open] {display:flex;flex-direction:column;animation:drawer-in .28s cubic-bezier(.22,.75,.3,1) both}
.storefront #bag.closing {animation:drawer-out .28s ease-in both}
.storefront #bag::backdrop {background:#0c170f81;animation:shade-in .28s ease-out both}
.storefront #bag.closing::backdrop {animation:shade-out .28s ease-in both}
html:has(#bag[open]) {overflow:hidden}
.storefront #bag .bag-head {background:var(--deep);color:var(--cream);margin:0;top:0;padding:20px clamp(16px,5vw,30px)}
.storefront #bag .bag-head .eyebrow {color:var(--gold);margin:0 0 3px}
.storefront #bag .bag-head h2 {margin:0}
.storefront #bag .bag-head button {display:grid;place-items:center;color:var(--cream);border-color:#8d8876}
#bag-feedback,#bag-error {margin:16px clamp(16px,5vw,30px) 0;padding:10px 12px;border-radius:8px;font-size:.89rem}
#bag-feedback {display:flex;align-items:center;gap:10px;background:#dfebdf;color:#244531}
#bag-error {background:#f3dde2;color:#74283a}
#bag-items {flex:1;padding:6px clamp(16px,5vw,30px);min-width:0}
.storefront #bag .store-cart-row {padding-block:16px}
.storefront .store-cart-item img {width:68px;height:68px;border-radius:8px;flex:none}
.cart-item-copy {display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.cart-item-copy span,.line-limit {font-size:.82rem;color:#5b5146}
.line-limit {justify-self:end}
.storefront .store-quantity button {min-width:44px;min-height:44px}
.bag-footer {padding:14px clamp(16px,5vw,30px) 22px;background:#efe5d6;border-top:1px solid #e3d3ba}
.bag-footer .bag-total {margin:0}
.bag-footer > p {font-size:.85rem;color:#5b5146}
.bag-footer .checkout-actions {display:grid;grid-template-columns:1fr}
.bag-footer .checkout-actions > * {justify-content:center;width:100%;text-align:center}
.storefront .product-detail {box-shadow:0 16px 42px #201a141a}
.storefront #experience-image {padding:0;aspect-ratio:16/9;background:var(--pine)}
.storefront #experience-image img {display:block;width:100%;height:100%;object-fit:cover}
.storefront #checkout-status:not(:empty) {color:#692839;font-weight:600}
@keyframes drawer-in {from {transform:translateX(100%)} to {transform:translateX(0)}}
@keyframes drawer-out {to {transform:translateX(100%)}}
@keyframes shade-in {from {opacity:0} to {opacity:1}}
@keyframes shade-out {to {opacity:0}}
@keyframes step-in {from {opacity:.65;transform:translateY(4px)}}
@media (max-width:820px) {
  .storefront .checkout-layout {grid-template-areas:'summary' 'main'}
  .storefront .checkout-summary {padding:13px 16px}
  .checkout-summary summary {display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer;font-size:1rem}
  #summary-total {display:inline;font:700 .86rem/1.3 system-ui,sans-serif;color:#ead2a9;text-align:right}
  .checkout-summary summary::after {content:'+';font:700 1rem system-ui,sans-serif}
  .checkout-summary[open] summary::after {content:'−'}
}
@media (max-width:520px) {
  .storefront .checkout-steps {grid-template-columns:repeat(4,minmax(0,1fr)) minmax(76px,1.2fr)}
  .storefront .checkout-steps li {flex-direction:column;align-items:flex-start;font-size:.69rem;gap:3px;white-space:nowrap}
  .storefront .checkout-steps li .step-text {display:none}
  .storefront #bag {width:100%}
}
@media (prefers-reduced-motion:reduce) {
  .storefront #bag[open],.storefront #bag::backdrop {animation:none}
  .storefront .checkout-main :is(#cart-step,#buyer-step,#delivery-step,#payment-step):not([hidden]) {animation:none}
  .storefront :is(button,.cta) {transition:none}
}
