/* ==========================================================================
   dtcrompton.com — store. Loaded alongside styles.css on shop-enabled pages.
   Uses the existing design tokens, adds no new colours.
   ========================================================================== */

/* ---------- header cart ---------- */
#cart-link{display:inline-flex;align-items:center;gap:7px}
#cart-count:empty{display:none}
#cart-count{font-family:var(--mono);font-size:10.5px;line-height:1.6;background:var(--coral);
  color:#1a1210;border-radius:999px;padding:1px 7px;letter-spacing:.02em}

/* ---------- purchase block inside the piece modal ---------- */
.prints.buy-box p{max-width:none}
.sizes{display:flex;flex-direction:column;gap:1px;background:var(--line-d);
  border:1px solid var(--line-d);border-radius:3px;overflow:hidden;margin:2px 0 16px}
.size-row{display:grid;grid-template-columns:auto auto 1fr auto;grid-template-areas:"r s d p" ". . t t";
  gap:2px 10px;align-items:center;background:#0c0f15;padding:11px 13px;cursor:pointer}
.size-row:hover{background:#101520}
.size-row.off{cursor:not-allowed;opacity:.5}
.size-row.off:hover{background:#0c0f15}
.size-row input{grid-area:r;accent-color:var(--coral);width:15px;height:15px;cursor:inherit;margin:0}
.size-row .sz{grid-area:s;font-family:var(--serif);font-size:17px;color:var(--fg)}
.size-row .dm{grid-area:d;font-family:var(--mono);font-size:10.5px;color:var(--mut2);letter-spacing:.02em}
.size-row .pr{grid-area:p;font-family:var(--serif);font-size:17px;color:var(--fg)}
.size-row .lf,.size-row .so,.size-row .rs{grid-area:t;font-family:var(--mono);font-size:10px;
  letter-spacing:.08em;text-transform:uppercase}
.size-row .lf{color:var(--sage)}
.size-row .so{color:var(--mut2)}
.size-row .rs{color:var(--amber)}
@media(max-width:560px){
  .size-row{grid-template-columns:auto auto 1fr;grid-template-areas:"r s p" ". d d" ". t t"}
}

/* quantity stepper, shared by the modal and the cart */
.qty{display:inline-flex;align-items:center;border:1px solid var(--line-d);border-radius:3px;overflow:hidden}
.qty button{background:transparent;border:0;color:var(--fg2);font-size:16px;line-height:1;
  padding:9px 13px;cursor:pointer}
.qty button:hover{color:var(--k)}
.qty output{font-family:var(--mono);font-size:13px;min-width:2.5ch;text-align:center;color:var(--fg)}

.buy-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.buy-row .btn{flex:1 1 auto}
.ship-note{font-family:var(--mono);font-size:10.5px;line-height:1.7;color:var(--mut2);
  letter-spacing:.02em;margin:12px 0 0}
.ship-note a{color:var(--k);border-bottom:1px solid rgba(232,168,153,.45)}
.ship-note.err{color:#c9645a}

/* ---------- "From £65" on the tile caption ---------- */
.cap-from{display:block;margin-top:3px;color:var(--sage)}
.cap-from.gone{color:var(--mut2)}

/* ---------- cart page ---------- */
.cart-wrap{max-width:900px;margin:0 auto;padding:0 40px}
.cart-row{display:grid;grid-template-columns:72px 1fr auto auto auto;gap:18px;align-items:center;
  padding:20px 0;border-bottom:1px solid var(--line)}
.cart-row img{width:72px;height:72px;object-fit:cover;border:1px solid var(--line);border-radius:2px}
.cart-row .ci h4{font-size:17px;margin:0}
.cart-row .ci .attr{font-family:var(--mono);font-size:10.5px;color:var(--mut2);margin:5px 0 0;letter-spacing:.02em}
.cart-row .ci .unit{font-family:var(--mono);font-size:11px;color:var(--mut);margin:4px 0 0}
.cart-row .line{font-family:var(--serif);font-size:18px;color:var(--fg);min-width:5ch;text-align:right}
.cart-row .rm{background:transparent;border:0;cursor:pointer;font-family:var(--mono);font-size:10px;
  letter-spacing:.1em;text-transform:uppercase;color:var(--mut2)}
.cart-row .rm:hover{color:#c9645a}
.cart-total{display:flex;justify-content:space-between;align-items:baseline;padding:22px 0 0}
.cart-total span{font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--mut)}
.cart-total b{font-family:var(--serif);font-weight:400;font-size:28px;color:var(--fg)}
.cart-actions{display:flex;gap:12px;flex-wrap:wrap;margin:26px 0 0}
.cart-actions .btn{padding:12px 26px}
.cart-empty{font-size:16px;color:var(--fg2);margin:0 0 22px}
@media(max-width:700px){
  .cart-wrap{padding:0 20px}
  .cart-row{grid-template-columns:56px 1fr auto;grid-template-areas:"i c c" "i q l" "i r r";gap:10px 14px}
  .cart-row img{grid-area:i;width:56px;height:56px;align-self:start}
  .cart-row .ci{grid-area:c}
  .cart-row .qty{grid-area:q}
  .cart-row .line{grid-area:l}
  .cart-row .rm{grid-area:r;justify-self:start;padding:0}
}

/* ---------- editions tables (prints page) ---------- */
.ed-table{width:100%;border-collapse:collapse;margin:18px 0 10px;font-size:14px}
.ed-table th{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--mut2);text-align:left;font-weight:500;padding:0 14px 9px 0;border-bottom:1px solid var(--line)}
.ed-table td{padding:11px 14px 11px 0;border-bottom:1px solid var(--line);color:var(--fg2);vertical-align:top}
.ed-table td:first-child{color:var(--fg);white-space:nowrap}
@media(max-width:560px){.ed-table{font-size:13px}.ed-table td,.ed-table th{padding-right:8px}}

/* ---------- modal order on small screens ----------
   With a purchase block the panel gets long, so on mobile the buy controls
   are lifted above the writing. Desktop keeps the reading order. */
@media(max-width:760px){
  .modal-info.has-buy .btns{order:1}
  .modal-info.has-buy h2{order:2}
  .modal-info.has-buy .attr{order:3}
  .modal-info.has-buy .prints.buy-box{order:4;margin-top:20px}
  .modal-info.has-buy .note{order:5}
  .modal-info.has-buy .prints:not(.buy-box){order:6}
}

/* ---------- modal: keep the actions reachable, tame the scrollbar ----------
   .modal-info .prints p is (0,2,1) and was beating .ship-note at (0,1,0),
   which is why font-size and margin were being ignored. */
.modal-info .prints p.ship-note{font-size:10.5px;line-height:1.7;margin:12px 0 0;
  color:var(--mut2);max-width:none}
.modal-info .prints p.ship-note.err{color:#c9645a}

/* buttons stay put while the panel scrolls under them.
   The fade sits INSIDE the button row's own top padding rather than above it,
   so it never falls across the last line of text. */
.modal-info .btns{position:sticky;bottom:0;z-index:3;background:#0c0f15;
  margin-top:auto;padding:26px 0 4px}
.modal-info .btns::before{content:"";position:absolute;left:0;right:0;top:0;height:26px;
  background:linear-gradient(to bottom,rgba(12,15,21,0),#0c0f15);pointer-events:none}
@media(max-width:760px){
  .modal-info.has-buy .btns{position:static;padding:0}
  .modal-info.has-buy .btns::before{display:none}
}
.modal-card{scrollbar-width:thin;scrollbar-color:rgba(244,241,236,.18) transparent}
.modal-card::-webkit-scrollbar{width:9px}
.modal-card::-webkit-scrollbar-track{background:transparent}
.modal-card::-webkit-scrollbar-thumb{background:rgba(244,241,236,.18);border-radius:9px;
  border:3px solid #0c0f15}
.modal-card::-webkit-scrollbar-thumb:hover{background:rgba(244,241,236,.3)}


/* urgency, shown only when it is actually true */
.size-row .band{grid-area:t;font-family:var(--mono);font-size:10px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--amber)}

/* three buttons on one line, wrapping only if they must */
.modal-info .btns{flex-wrap:wrap}
.modal-info .btns #addbtn{flex:1 1 auto}
@media(max-width:400px){.modal-info .btns .btn{padding:10px 13px}}

/* ---------- modal tightening ---------- */
/* no rules between the sections; the track line reads as part of the note */
.modal-info .prints,
.modal-info .prints.buy-box{border-top:0;padding-top:0}
.modal-info .prints{margin-top:18px}
.modal-info .prints:has(#mtrack){margin-top:10px}
.modal-info .prints:has(#mtrack) h4{display:none}
.modal-info .prints p#mtrack{font-size:15.5px;line-height:1.64;color:#B4BAC2;max-width:46ch}

/* The notes were shortened, so they no longer need clamping. The expander is
   hidden rather than removed: shop.js still injects it, and on mobile the
   reordered modal gave it no place in the sequence, so it surfaced in the
   wrong spot. It comes out of the script in the next build. */
.modal-info .note{display:block;overflow:visible}
.note-more{display:none !important}

/* button labels centred */
.modal-info .btns button{justify-content:center;text-align:center}

/* ---------- cart tweaks ---------- */
/* remove sits before the stepper so every price lines up on the right edge */
.cart-row{grid-template-columns:72px 1fr auto auto auto}
.cart-actions{margin-bottom:26px}
.qty button[disabled]{opacity:.3;cursor:not-allowed}
.qty button[disabled]:hover{color:var(--fg2)}

/* confirmation copy, matching the page's own intro scale */
.cart-lede{font-size:17px;line-height:1.65;color:var(--fg2);max-width:52ch;margin:0 0 26px}
/* the confirmation reads like a page opening, not a cart with a note on it:
   eyebrow, title at collection scale, accent rule, then the text */
/* The heading is sized and ruled entirely in CSS. Both used to be applied by
   JavaScript after load, which made the heading jump from the base size to this
   one and pushed the content down when the rule appeared. */
.cart-wrap h1.title{font-size:clamp(46px,7vw,86px);line-height:.98;margin:0}
.cart-wrap h1.title::after{content:"";display:block;width:99px;height:3px;
  background:linear-gradient(90deg,var(--amber),var(--sage));border-radius:2px;
  margin:22px 0 28px}
.cart-lede.thanks{font-size:16px;line-height:1.66;color:var(--fg2);max-width:52ch;margin:0 0 34px}
.cart-row .ci .unit .why{color:var(--mut2);font-style:italic}

/* destination picker above the totals */
.dest{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:20px 0 4px;
  border-top:1px solid var(--line)}
.dest label{font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--mut)}
.dest select{font-family:var(--sans);font-size:14px;color:var(--fg);background:#0c0f15;
  border:1px solid var(--line-d);border-radius:3px;padding:9px 12px}
.dest-note{flex:1 1 100%;font-family:var(--mono);font-size:10.5px;line-height:1.7;color:var(--mut2)}
@media(max-width:560px){.dest select{flex:1 1 auto}}

/* Added-to-cart feedback: the button holds sage for three seconds, then eases
   back to coral over one. Long enough to register if you glanced away,
   short enough not to look stuck. The text feedback is unchanged. */
.modal-info .btns #addbtn{transition:background-color .9s ease,border-color .9s ease,color .9s ease}
.modal-info .btns #addbtn.added{background:var(--sage);border-color:var(--sage);color:#10180f;
  transition:background-color .12s ease,border-color .12s ease,color .12s ease}
@media(prefers-reduced-motion:reduce){
  .modal-info .btns #addbtn,.modal-info .btns #addbtn.added{transition:none}
}
/* which service the order will actually travel on */
.ship-svc{font-family:var(--mono);font-size:10.5px;line-height:1.7;letter-spacing:.02em;
  color:var(--sage);margin:10px 0 0}

/* empty cart, in the register of the 404 page */
.cart-none{font-family:var(--serif);font-weight:400;font-size:clamp(24px,3vw,32px);
  line-height:1.2;color:var(--fg);margin:0 0 12px}
.cart-empty{max-width:46ch}

/* On mobile the stepper is a grid item in a 1fr column, so its box stretches to
   meet the price. Centring its contents keeps the value under the box rather
   than stranded at the left edge. */
@media(max-width:700px){
  .cart-row .qty{justify-content:center}
}
