body:not(.detail-open) .buy-bar{display:none!important}
body.detail-open .detail-view .buy-bar{display:flex;bottom:0}
body.detail-open .site-footer{display:none}

@media(max-width:699px){
  body.detail-open .topbar{display:none}
  body.detail-open .bottom-nav{display:none}
  body.detail-open .app-shell{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  body.detail-open .detail-tools{top:12px}
  body.detail-open .detail-image-wrap{height:390px}
  body.detail-open .buy-bar{left:50%;right:auto;transform:translateX(-50%);bottom:0;width:100%;max-width:430px;height:auto;min-height:calc(82px + env(safe-area-inset-bottom));padding:12px 14px calc(12px + env(safe-area-inset-bottom));gap:12px;box-sizing:border-box}
  body.detail-open .buy-bar>div{flex:1;min-width:0;gap:4px}
  body.detail-open #detailPrice .price-stack{gap:4px 6px}
  body.detail-open #detailPrice .current-price{flex-basis:100%;white-space:nowrap;font-size:clamp(17px,4.8vw,22px)}
  body.detail-open #detailPrice .original-price{font-size:10px;white-space:nowrap}
  body.detail-open #detailPrice .discount-badge{font-size:7px;padding:3px 5px}
  body.detail-open .buy-bar #addToBag{flex:0 0 142px;min-width:0;height:50px;padding:6px 6px 6px 12px;gap:8px;justify-content:space-between;font-size:9px;white-space:nowrap;letter-spacing:.08em}
  body.detail-open .buy-bar #addToBag .add-label{white-space:nowrap}
  body.detail-open .buy-bar #addToBag .add-arrow{width:32px;height:36px;flex:none;font-size:17px}
  body.detail-open .toast{bottom:calc(96px + env(safe-area-inset-bottom))}
}

@media(min-width:700px) and (max-width:999px){
  body.detail-open .bottom-nav{display:none}
  body.detail-open .app-shell{padding-bottom:72px}
  body.detail-open .buy-bar{left:50%;right:auto;transform:translateX(-50%);width:calc(100% - 48px);max-width:760px;bottom:24px}
}
@media(min-width:1000px){
  .detail-tools{width:calc(min(100vw,1440px)*.6 - 48px)}
  .detail-view.active{grid-template-columns:minmax(0,1.2fr) minmax(380px,.8fr)}
  .detail-copy{padding:48px clamp(28px,3.5vw,64px);align-content:center;overflow:visible}
  .detail-copy h2{font-size:clamp(36px,3.5vw,54px);overflow-wrap:anywhere}
  .detail-copy>.buy-bar{position:static;grid-column:1/-1;width:100%;max-width:none;height:auto;min-height:98px;margin-top:8px;padding:24px 0 0;border-top:1px solid var(--line);background:transparent;color:var(--ink);gap:20px;flex-wrap:wrap;z-index:auto}
  .detail-copy>.buy-bar>div{flex:1 1 130px;min-width:0;gap:7px}
  .detail-copy>.buy-bar small{color:#85847b;font-size:8px;letter-spacing:.16em}
  .detail-copy>.buy-bar strong{font-size:24px;line-height:1.2}
  .detail-copy>.buy-bar #detailPrice .price-stack{gap:7px 9px}
  .detail-copy>.buy-bar #detailPrice .current-price{flex-basis:100%}
  .detail-copy>.buy-bar #detailPrice .original-price{font-size:11px}
  .detail-copy>.buy-bar #detailPrice .discount-badge{font-size:8px}
  .detail-copy>.buy-bar #addToBag{flex:1 1 180px;justify-content:space-between;height:54px;min-width:0;padding:7px 8px 7px 18px;background:var(--ink);color:var(--paper);border:1px solid var(--ink);border-radius:3px;box-shadow:none;gap:12px;font-size:10px;white-space:nowrap}
  .detail-copy>.buy-bar #addToBag .add-arrow{width:36px;height:36px;flex:none;background:#f1efe7;color:var(--ink);font-size:18px}
  .detail-copy>.buy-bar #addToBag:hover{background:#292923}
  .detail-copy>.buy-bar #addToBag:hover .add-arrow{background:#fff}
}
/* Keep the two purchase actions together at every screen size. */
body.detail-open .detail-copy>.buy-bar{flex-direction:row;align-items:center;flex-wrap:nowrap;gap:12px}
body.detail-open .detail-copy>.buy-bar>.purchase-price{flex:1 1 120px;min-width:0;width:auto;gap:4px}
body.detail-open .detail-copy>.buy-bar>.purchase-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:1 0 178px;width:auto;gap:7px}
body.detail-open .detail-copy>.buy-bar .purchase-actions #addToBag,
body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-width:0;height:44px;padding:0 9px;margin:0;border-radius:3px;font:600 9px "Space Grotesk",sans-serif;letter-spacing:.04em;white-space:nowrap;box-shadow:none;cursor:pointer}
body.detail-open .detail-copy>.buy-bar .purchase-actions #addToBag{background:transparent;border:1px solid #66665e;color:#f7f6f2}
body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow{background:#f3f0e7;border:1px solid #f3f0e7;color:#111}
body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow span{font-size:16px;margin:0}
body.detail-open .detail-copy>.buy-bar .purchase-actions #addToBag:hover{background:#ffffff12}
body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow:hover{background:#fff}
@media(max-width:999px){
  body.detail-open .detail-copy>.buy-bar{height:calc(82px + env(safe-area-inset-bottom));min-height:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));gap:10px}
  body.detail-open #detailPrice .current-price{flex-basis:100%;font-size:clamp(16px,4.5vw,21px)}
  body.detail-open #detailPrice .price-stack{gap:5px 9px}
  body.detail-open .app-shell{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  body.detail-open .toast{bottom:calc(96px + env(safe-area-inset-bottom))}
}
@media(min-width:1000px){
  body.detail-open .detail-copy>.buy-bar .purchase-actions #addToBag{border-color:var(--ink);color:var(--ink)}
  body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow{background:var(--ink);border-color:var(--ink);color:var(--paper)}
  body.detail-open .detail-copy>.buy-bar .purchase-actions #addToBag:hover{background:#eeede7}
  body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow:hover{background:#333}
}

@media(max-width:380px){body.detail-open .detail-copy>.buy-bar>.purchase-actions{flex-basis:164px;gap:6px}body.detail-open .detail-copy>.buy-bar .purchase-actions #addToBag,body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow{font-size:8px;padding:0 5px;gap:4px}body.detail-open #detailPrice .price-stack{gap:3px 5px}body.detail-open #detailPrice .original-price{font-size:8px}body.detail-open #detailPrice .discount-badge{font-size:6px;padding:2px 4px}body.detail-open .detail-copy>.buy-bar .purchase-actions #buyNow span{display:none}}
