/* ============================================================
   RK Threads, Smart Cart, v2 (calm). Stripped-back from the
   neo-brutalist first pass: hierarchy from whitespace + type,
   ONE accent used sparingly, a single slim reward line, clean
   rows, design details + the customiser revealed on demand.
   The customiser opens as a MODAL over the page (the real one
   later; a stub here so the flow is testable).
   ============================================================ */

:root {
  --ink: #1a1614;
  --muted: #8a8178;
  --soft: #b8afa5;
  --line: rgba(26,22,20,0.10);
  --line-2: rgba(26,22,20,0.16);
  --cream: #FAF6F0;
  --paper: #fff;
  --pink: #F38BB9;
  --pink-pale: #FDF2F8;
  --plum: #5C1756;
  --plum-2: #4A1145;
  --mint: #B4DAA6;
  --forest: #3f7a55;
  --accent: var(--pink);
  --f-display: "Nuckle", "Hanken Grotesk", Arial, sans-serif;
  --f-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }

/* faux storefront + scene */
.rkc-scene {
  position: relative; width: 100%; min-height: 100vh; overflow: hidden;
  background: var(--cream); font-family: var(--f-body); color: var(--ink);
  display: flex; justify-content: flex-end; align-items: stretch;
}
.rkc-store { position: absolute; inset: 0; overflow: hidden; filter: blur(3px) saturate(.7); opacity: .8; pointer-events: none; }
.rkc-store__nav { height: 66px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 40px; }
.rkc-store__logo { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.rkc-store__links { display: flex; gap: 28px; font: 500 13px/1 var(--f-body); color: var(--muted); }
.rkc-store__hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px; padding: 56px 40px 30px; align-items: center; }
.rkc-store__eyebrow { font: 600 11px/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--plum); }
.rkc-store__h1 { font-family: var(--f-display); font-weight: 700; font-size: 60px; line-height: .94; letter-spacing: -.025em; margin-top: 16px; }
.rkc-store__cta { margin-top: 26px; height: 50px; width: 200px; background: var(--pink); border-radius: 999px; }
.rkc-store__media { aspect-ratio: 4/3; border-radius: 18px; background: #FCDAF4; }
.rkc-store__row { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; padding: 6px 40px 40px; }
.rkc-store__tile { aspect-ratio: 1/1; border-radius: 16px; }
.rkc-scrim { position: absolute; inset: 0; background: rgba(26,22,20,.18); pointer-events: none; }

/* ===== drawer ===== */
.rkc-drawer {
  position: relative; width: 420px; max-width: 100%; flex: none;
  display: flex; flex-direction: column; background: var(--paper);
  border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(26,22,20,.10);
  height: 100vh; z-index: 2;
  animation: rkc-in .42s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rkc-in { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* header */
.rkc-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 16px; }
.rkc-head__title { display: flex; align-items: baseline; gap: 9px; }
.rkc-head__title h2 { font-family: var(--f-display); font-weight: 700; font-size: 23px; letter-spacing: -.01em; margin: 0; }
.rkc-head__count { font-size: 13px; color: var(--muted); }
.rkc-close { width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); cursor: pointer; display: grid; place-items: center; color: var(--ink); transition: background .15s ease; }
.rkc-close:hover { background: var(--cream); }

/* reward, single slim line */
.rkc-reward { flex: none; padding: 4px 22px 18px; }
.rkc-reward__copy { font-size: 13px; color: var(--ink); margin-bottom: 9px; }
.rkc-reward__copy b { font-weight: 400; color: var(--plum); }
.rkc-reward__copy .good { color: var(--forest); }
.rkc-reward__track { height: 6px; border-radius: 999px; background: rgba(26,22,20,.07); overflow: hidden; }
.rkc-reward__fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .6s cubic-bezier(.2,.8,.2,1), background .3s ease; }
.rkc-reward__fill.is-unlocked { background: var(--mint); }

/* body */
.rkc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.rkc-body::-webkit-scrollbar { width: 0; }
.rkc-body { scrollbar-width: none; }

/* line items */
.rkc-items { padding: 0 22px; }
.rkc-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.rkc-items .rkc-item:first-child { border-top: 0; }
.rkc-thumb { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--cream); display: grid; place-items: center; }
.rkc-thumb svg { width: 44px; height: 44px; }
.rkc-thumb__design { position: relative; font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.rkc-thumb__design::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(58deg, rgba(255,255,255,.18) 0 2px, rgba(0,0,0,.04) 2px 4px); }
.rkc-tag { position: absolute; top: 5px; left: 5px; font: 600 8px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--plum); background: rgba(255,255,255,.85); border-radius: 4px; padding: 2px 4px; }

.rkc-item__name { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.2; }
.rkc-item__var { font-size: 12px; color: var(--muted); margin-top: 3px; }
.rkc-item__edit { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--plum); cursor: pointer; }
.rkc-item__edit:hover { text-decoration: underline; text-underline-offset: 2px; }
.rkc-soldout { margin-top: 8px; font-size: 11px; color: #a3402f; }

.rkc-item__right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.rkc-price { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.rkc-stepper { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--muted); }
.rkc-stepper button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0; width: 14px; transition: color .12s ease; }
.rkc-stepper button:hover { color: var(--ink); }
.rkc-stepper span { color: var(--ink); min-width: 10px; text-align: center; font-variant-numeric: tabular-nums; }

/* the in-cart customisation upsell, calm */
.rkc-upsell { grid-column: 1 / -1; margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--pink-pale); border-radius: 10px; cursor: pointer; transition: background .15s ease; }
.rkc-upsell:hover { background: #fbe7f1; }
.rkc-upsell__icon { width: 26px; height: 26px; flex: none; border-radius: 999px; background: #fff; display: grid; place-items: center; color: var(--plum); }
.rkc-upsell__copy { flex: 1; min-width: 0; font-size: 13px; color: var(--plum); }
.rkc-upsell__copy b { font-weight: 700; }
.rkc-upsell__go { flex: none; font-size: 12px; font-weight: 700; color: var(--plum); }

/* cross-sell */
.rkc-cross { padding: 18px 22px 8px; border-top: 1px solid var(--line); }
.rkc-cross__head { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.rkc-cross__grid { display: flex; gap: 16px; }
.rkc-xcard { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.rkc-xcard__thumb { width: 40px; height: 40px; flex: none; border-radius: 8px; background: var(--cream); display: grid; place-items: center; }
.rkc-xcard__thumb svg { width: 30px; height: 30px; }
.rkc-xcard__name { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rkc-xcard__price { font-size: 11px; color: var(--muted); margin-top: 1px; }
.rkc-xadd { width: 26px; height: 26px; flex: none; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); cursor: pointer; display: grid; place-items: center; color: var(--ink); transition: background .12s ease; }
.rkc-xadd:hover { background: var(--cream); }
.rkc-xcard.is-design .rkc-xcard__thumb { background: var(--pink-pale); }
.rkc-xcard.is-design .rkc-xadd { background: var(--pink-pale); color: var(--plum); border-color: transparent; }

/* footer */
.rkc-foot { flex: none; padding: 16px 22px 20px; background: var(--cream); border-top: 1px solid var(--line); }
.rkc-foot__totals { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.rkc-foot__label { font-size: 13px; color: var(--muted); }
.rkc-foot__amt { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.rkc-checkout { position: relative; width: 100%; height: 50px; border: none; border-radius: 999px; background: var(--plum); color: #fff; cursor: pointer; font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .01em; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: background .15s ease, transform .12s ease; }
.rkc-checkout:hover { background: var(--plum-2); transform: translateY(-1px); }
.rkc-checkout svg { width: 16px; height: 16px; }
.rkc-foot__sub { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.rkc-foot__sub span { font-size: 11px; color: var(--muted); }
.rkc-foot__sub .link { color: var(--plum); cursor: pointer; }

/* empty */
.rkc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 30px; }
.rkc-empty__ic { width: 120px; height: 120px; border-radius: 999px; background: var(--pink-pale); display: grid; place-items: center; margin-bottom: 20px; }
.rkc-empty__h { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: -.01em; }
.rkc-empty__h .accent { color: var(--plum); }
.rkc-empty__p { margin-top: 8px; font-size: 13px; color: var(--muted); max-width: 260px; }
.rkc-empty__cta { margin-top: 20px; height: 46px; padding: 0 26px; border: none; border-radius: 999px; background: var(--plum); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 14px; cursor: pointer; }

/* ===== customiser modal (opens over the page) ===== */
.rkc-modal { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(26,22,20,.45); animation: rkc-fade .2s ease both; }
@keyframes rkc-fade { from { opacity: 0; } to { opacity: 1; } }
.rkc-modal__card { width: 440px; max-width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--paper); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(26,22,20,.3); animation: rkc-pop .26s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rkc-pop { from { transform: scale(.96) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.rkc-modal__head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.rkc-modal__title { display: flex; align-items: baseline; gap: 8px; }
.rkc-modal__title b { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.rkc-modal__title span { font-size: 12px; color: var(--muted); }
.rkc-modal__frame { flex: 1; min-height: 0; overflow-y: auto; background: var(--cream); padding: 14px 18px 18px; }
.rkc-frame-note { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; margin-bottom: 14px; }
.rkc-cz-preview { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.rkc-cz-tile { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; position: relative; }
.rkc-cz-tile__t { position: relative; font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.rkc-cz-tile__t::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(58deg, rgba(255,255,255,.18) 0 2px, rgba(0,0,0,.04) 2px 4px); }
.rkc-cz-pcopy b { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.rkc-cz-pcopy span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.rkc-cz-row { margin-bottom: 14px; }
.rkc-cz-label { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.rkc-cz-input { width: 100%; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; font: 400 14px var(--f-body); color: var(--ink); outline: none; background: #fff; }
.rkc-cz-input:focus { border-color: var(--plum); }
.rkc-cz-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.rkc-cz-thread { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line-2); cursor: pointer; padding: 0; transition: transform .1s ease; }
.rkc-cz-thread.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); transform: scale(1.05); }
.rkc-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; font-size: 12px; }
.rkc-seg button { border: none; background: none; cursor: pointer; padding: 8px 14px; color: var(--muted); border-left: 1px solid var(--line); }
.rkc-seg button:first-child { border-left: 0; }
.rkc-seg button.is-on { background: var(--ink); color: #fff; }
.rkc-modal__foot { flex: none; padding: 14px 18px; border-top: 1px solid var(--line); }
.rkc-cz-add { width: 100%; height: 48px; border: none; border-radius: 999px; background: var(--plum); color: #fff; cursor: pointer; font-family: var(--f-display); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s ease; }
.rkc-cz-add:hover { background: var(--plum-2); }
.rkc-cz-add:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 480px) {
  .rkc-drawer { width: 100%; border-left: 0; }
  .rkc-store { display: none; }
}
