/* ============================================================
   RennCraft — Store-specific styles (loads after styles.css)
============================================================ */

/* ---- page header ---- */
.store-head { padding: 56px 0 30px; position: relative; overflow: hidden; }
.store-head::before { content: ""; position: absolute; inset: -40% -10% auto -10%; height: 130%;
  background: radial-gradient(ellipse 55% 60% at 50% 0%, rgba(241,192,74,.14), transparent 65%); pointer-events: none; }
.store-head .inner { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.store-head h1 { font-family: var(--pixel); font-weight: 700; font-size: clamp(34px, 5vw, 52px); margin: 14px 0 0; }
.store-head p { color: var(--text-dim); margin: 12px 0 0; max-width: 52ch; font-size: 16.5px; }

/* delivery promise chips */
.promise { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; }
.promise .p { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--text-dim); }
.promise svg { color: var(--diamond-bright); }

/* currency toggle */
.cur-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cur-toggle button { padding: 9px 16px; font-weight: 700; font-size: 14px; color: var(--text-dim); transition: background .15s, color .15s; }
.cur-toggle button.active { background: rgba(61,155,255,.18); color: var(--diamond-bright); }

/* ---- category tabs (sticky) ---- */
.cat-bar { position: sticky; top: 70px; z-index: 40; background: rgba(8,13,26,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; font-weight: 700; font-size: 15px; color: var(--text-dim); border: 1px solid transparent; border-radius: var(--r); white-space: nowrap; transition: all .15s; }
.cat-tabs button:hover { color: var(--text); background: rgba(125,165,255,.07); }
.cat-tabs button.active { color: var(--diamond-bright); background: rgba(61,155,255,.12); border-color: rgba(61,155,255,.4); }
.cat-tabs button svg { width: 17px; height: 17px; }

/* ---- product grid ---- */
.cat-title { font-family: var(--pixel); font-weight: 700; font-size: 26px; text-align: center; margin: 8px 0 6px; letter-spacing: .5px; }
.store-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 40px 0 20px; }
.prod {
  position: relative; display: flex; flex-direction: column;
  background: #0a1326; border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  overflow: hidden; text-align: center; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.prod:hover { transform: translateY(-5px); box-shadow: var(--shadow-block); border-color: color-mix(in srgb, var(--accent, var(--diamond)) 60%, transparent); }
.prod.out { opacity: .62; }
.prod .top { position: relative; height: 164px; display: grid; place-items: center; border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    repeating-linear-gradient(45deg, #0f1d3a 0 12px, #0c1730 12px 24px); }
.prod .icon { width: 80px; height: 80px; display: grid; place-items: center; border-radius: var(--r); background: color-mix(in srgb, var(--accent) 16%, #0a1326); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 38%, transparent); }
.prod .icon span { font-family: var(--pixel); font-weight: 700; font-size: 36px; color: var(--accent); }
.prod .icon svg { width: 40px; height: 40px; color: var(--accent); }
.prod .ribbon { position: absolute; top: 12px; left: 12px; font-family: var(--pixel); font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 5px 10px; border-radius: 3px; background: var(--gold); color: #2a1c00; }
.prod .ribbon.blue { background: var(--diamond); color: #fff; }
.prod .oos { position: absolute; top: 12px; right: 12px; font-family: var(--pixel); font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 5px 10px; border-radius: 3px; background: #2a1622; color: var(--offline); border: 1px solid var(--offline); }
.prod .body { padding: 24px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.prod h3 { font-family: var(--pixel); font-size: 24px; margin: 0 0 16px; letter-spacing: .4px; }
.prod .desc { color: var(--text-dim); font-size: 14px; margin: 0 0 18px; }

/* always-visible perk list */
.perks-list { display: flex; flex-direction: column; gap: 9px; text-align: left; margin: 0 0 18px; padding: 16px 4px 0; border-top: 1px solid var(--line-soft); }
.perks-list li { font-size: 13.5px; color: var(--text-dim); display: flex; gap: 9px; align-items: flex-start; }
.perks-list li svg { flex: none; margin-top: 3px; color: var(--accent); }

.prod .price-block { margin-top: auto; }
.prod .price-row { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 4px; }
.prod .price { font-size: 28px; font-weight: 800; color: var(--text); }
.prod .alt { font-size: 12.5px; color: var(--text-mute); margin-bottom: 16px; }
.prod .buy { width: 100%; }
.add-flash { animation: flash .5s ease; }
@keyframes flash { 0% { transform: scale(1); } 40% { transform: scale(.94); } 100% { transform: scale(1); } }

/* ---- floating cart button ---- */
.cart-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 11px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #2a1c00; font-weight: 800;
  border-radius: 999px; padding: 13px 22px; box-shadow: 0 8px 0 #8a6614, 0 12px 30px rgba(0,0,0,.5); transition: transform .12s; }
.cart-fab:active { transform: translateY(3px); box-shadow: 0 3px 0 #8a6614; }
.cart-fab .count { background: #2a1c00; color: var(--gold-bright); font-size: 13px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; }

/* ---- cart drawer ---- */
.overlay { position: fixed; inset: 0; background: rgba(3,6,14,.66); backdrop-filter: blur(3px); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw); z-index: 95;
  background: var(--bg-1); border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.3,.8,.3,1); box-shadow: -20px 0 50px rgba(0,0,0,.5); }
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-family: var(--pixel); font-size: 22px; margin: 0; }
.drawer-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--r); display: grid; place-items: center; color: var(--text-dim); }
.drawer-close:hover { color: #fff; border-color: var(--diamond); }
.cart-items { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.cart-empty { text-align: center; color: var(--text-mute); padding: 60px 20px; }
.cart-empty svg { color: var(--line); margin-bottom: 14px; }
.ci { display: flex; gap: 13px; align-items: center; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 12px; }
.ci .ci-ic { width: 42px; height: 42px; flex: none; border-radius: 3px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, #0c1730); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); font-family: var(--pixel); font-weight: 700; color: var(--accent); }
.ci .ci-info { flex: 1; min-width: 0; }
.ci .ci-info .n { font-weight: 700; font-size: 14.5px; }
.ci .ci-info .pr { font-size: 13px; color: var(--text-mute); }
.qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.qty button { width: 26px; height: 26px; display: grid; place-items: center; color: var(--text-dim); font-weight: 700; }
.qty button:hover { background: rgba(125,165,255,.12); color: #fff; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: 13px; }
.ci .rm { color: var(--text-mute); width: 24px; height: 24px; display: grid; place-items: center; }
.ci .rm:hover { color: var(--offline); }
.drawer-foot { border-top: 1px solid var(--line); padding: 20px 24px; }
.disc-row { display: flex; gap: 8px; margin-bottom: 16px; }
.disc-row input { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 14px; color: var(--text); font-family: inherit; font-size: 14px; }
.disc-row input:focus { outline: none; border-color: var(--diamond); }
.disc-row button { padding: 0 16px; }
.disc-msg { font-size: 12.5px; margin: -8px 0 14px; font-weight: 600; }
.disc-msg.ok { color: var(--online); }
.disc-msg.bad { color: var(--offline); }
.totals { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.totals .t { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-dim); }
.totals .t.grand { font-size: 19px; font-weight: 800; color: var(--text); padding-top: 10px; border-top: 1px solid var(--line-soft); }
.totals .t.grand .pixel { font-family: var(--pixel); color: var(--cyan); }

/* ---- checkout modal ---- */
.modal-card { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.96); z-index: 100;
  width: min(520px, 94vw); max-height: 90vh; overflow-y: auto; background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.modal-card.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--pixel); font-size: 22px; margin: 0; }
.modal-body { padding: 24px 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 7px; }
.field label .hint { color: var(--text-mute); font-weight: 500; }
.field input { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 15px; }
.field input:focus { outline: none; border-color: var(--diamond); }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-weight: 700; font-size: 14px; transition: all .15s; }
.pay:hover { border-color: var(--diamond); }
.pay.sel { border-color: var(--diamond); background: rgba(61,155,255,.1); color: var(--diamond-bright); }
.pay .tick { margin-left: auto; opacity: 0; }
.pay.sel .tick { opacity: 1; }
.modal-foot { padding: 0 26px 26px; }
.checkout-success { text-align: center; padding: 40px 26px; }
.checkout-success .big { width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; background: rgba(70,209,127,.14); border: 1px solid var(--online); display: grid; place-items: center; }
.checkout-success h3 { font-family: var(--pixel); font-size: 24px; margin: 0 0 10px; }
.checkout-success p { color: var(--text-dim); margin: 0 auto; max-width: 38ch; }
.checkout-success .cmd { display: inline-block; margin-top: 16px; font-family: var(--pixel); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; color: var(--cyan); }

/* ---- info section ---- */
.info-band { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.info-band .i h4 { font-family: var(--pixel); font-size: 16px; margin: 0 0 8px; display: flex; align-items: center; gap: 9px; }
.info-band .i h4 svg { color: var(--diamond-bright); }
.info-band .i p { margin: 0; color: var(--text-dim); font-size: 14px; }
.info-band .i a { color: var(--diamond-bright); text-decoration: underline; }

@media (max-width: 940px) {
  .store-grid { grid-template-columns: repeat(2, 1fr); }
  .info-band { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  .store-grid { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
  .cat-bar { top: 70px; }
}
