/* ══ Store page (uses landing yellow palette via body.lp) ══ */
.st-head { text-align: center; padding: 130px 6vw 24px; max-width: 760px; margin: 0 auto; }
.st-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -1px; margin-top: 8px;
  background: linear-gradient(135deg, #fff 30%, var(--primary) 130%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.st-head p { color: var(--text-muted); margin-top: 16px; line-height: 1.7; font-size: 1.05rem; }
.st-banner { margin-top: 22px; padding: 14px 18px; border-radius: 12px; font-weight: 600; }
.st-banner.ok { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.4); color: #34d399; }
.st-banner.warn { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.4); color: #f59e0b; }
.st-banner.bad { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #ef4444; }

/* cart button in nav */
.st-cart-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: var(--text-main); cursor: pointer; font-size: 1.05rem; transition: 0.15s; }
.st-cart-btn:hover { border-color: var(--primary); color: var(--primary); }
.st-cart-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 11px;
  background: var(--primary); color: var(--on-primary); font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.st-cart-count.empty { display: none; }

/* layout: category sidebar + content */
.st-layout { max-width: 1280px; margin: 0 auto; padding: 16px 6vw 90px; display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.st-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 6px; }
.st-side-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 0 12px 8px; }
.st-cat-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px; background: transparent;
  border: 1px solid transparent; color: var(--text-muted); cursor: pointer; font-weight: 600; font-size: 0.92rem; text-align: left; transition: 0.15s; }
.st-cat-btn:hover { background: var(--bg-surface); color: var(--text-main); }
.st-cat-btn.active { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.st-cat-btn .st-cat-count { margin-left: auto; font-size: 0.72rem; background: rgba(255,255,255,0.06); padding: 2px 8px; border-radius: 10px; }

.st-content { min-height: 300px; }
.st-loading { text-align: center; color: var(--text-muted); padding: 60px; font-size: 1.1rem; }
.st-content-head { margin-bottom: 20px; }
.st-content-head h2 { font-size: 1.7rem; font-weight: 800; }
.st-content-head p { color: var(--text-muted); margin-top: 4px; font-size: 0.92rem; }

.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.st-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; transition: 0.22s; }
.st-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: 0 18px 40px rgba(0,0,0,0.5); }
.st-card-imgwrap { position: relative; cursor: pointer; }
.st-card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--bg-dark); border-bottom: 1px solid var(--border); display: block; }
.st-card-img.placeholder { display: flex; align-items: center; justify-content: center; color: var(--border); font-size: 3rem; }
.st-ribbon { position: absolute; top: 12px; left: 12px; background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff;
  font-size: 0.72rem; font-weight: 800; padding: 5px 11px; border-radius: 8px; box-shadow: 0 6px 16px rgba(239,68,68,0.4); letter-spacing: 0.02em; }
.st-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.st-card-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; cursor: pointer; }
.st-card-desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; flex: 1; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* prices (before/after) — .st-was = original price, always red + strikethrough */
.st-was { color: #ef4444 !important; text-decoration: line-through; font-weight: 500; margin-left: 7px; opacity: 0.95; }
.st-price { display: flex; flex-direction: column; line-height: 1.15; }
.st-manage-price .st-was { font-size: 1rem; }
.st-price b { font-size: 1.3rem; font-weight: 800; }
.st-price .st-was { color: #ef4444; font-size: 0.82rem; text-decoration: line-through; }
.st-addbtn { white-space: nowrap; padding: 9px 15px !important; font-size: 0.85rem !important; }
.st-addbtn.in-cart { background: color-mix(in srgb, var(--ok,#34d399) 16%, transparent) !important; border-color: color-mix(in srgb, var(--ok,#34d399) 45%, transparent) !important; color: var(--ok,#34d399) !important; }
.st-addbtn.in-cart:hover { background: color-mix(in srgb, #ef4444 16%, transparent) !important; border-color: color-mix(in srgb, #ef4444 45%, transparent) !important; color: #ef4444 !important; }

body.has-marquee .st-head { padding-top: 34px; }

/* manage-in-cart modal */
.st-manage { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 22px; padding: 28px 26px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.7); animation: stPop 0.28s cubic-bezier(0.175,0.885,0.32,1.275); }
.st-manage-badge { width: 60px; height: 60px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 14px; }
.st-manage h3 { font-size: 1.3rem; font-weight: 800; }
.st-manage-item { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 18px 0; }
.st-manage-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--bg-dark); flex-shrink: 0; }
.st-manage-name { font-weight: 700; font-size: 0.98rem; }
.st-manage-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; margin-top: 3px; }
.st-manage-qty { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 20px; }
.st-manage-qty button { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-dark); color: var(--text-main); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.st-manage-qty button:hover { border-color: var(--primary); color: var(--primary); }
.st-manage-qty .q { font-size: 1.4rem; font-weight: 800; min-width: 40px; }
.st-manage-note { color: var(--text-muted); font-size: 0.82rem; margin: -6px 0 16px; }
.st-manage-btns { display: flex; gap: 10px; }
.st-manage-btns .lp-btn { flex: 1; justify-content: center; }
.lp-btn.danger { background: #ef4444; border-color: #ef4444; color: #fff; }
.lp-btn.danger:hover { background: #dc2626; }

/* cart drawer discounted price */
.st-citem-price .st-was { color: #ef4444; font-size: 0.78rem; text-decoration: line-through; margin-left: 6px; font-weight: 500; }
.st-citem-single { font-size: 0.7rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }

/* details modal */
.st-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(6px); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px; }
.st-modal-bg.show { display: flex; }
.st-modal { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 20px; max-width: 560px; width: 100%;
  max-height: 90vh; overflow: auto; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,0.7); }
.st-modal-x { position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 10px; border: 0;
  background: rgba(0,0,0,0.55); color: #fff; cursor: pointer; font-size: 1.1rem; }
.st-modal-imgwrap { position: relative; }
.st-modal-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-dark); }
.st-modal-body { padding: 24px 26px 28px; }
.st-modal-body h2 { font-size: 1.6rem; font-weight: 800; }
.st-modal-price { display: flex; align-items: baseline; gap: 12px; font-size: 1.6rem; font-weight: 800; margin: 12px 0 18px; }
.st-modal-price .st-was { color: #ef4444; font-size: 1rem; font-weight: 500; text-decoration: line-through; }
.st-modal-desc { color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; margin-bottom: 22px; }
.st-modal-desc p { margin-bottom: 8px; }
.st-modal-buy { width: 100%; justify-content: center; }

/* added prompt */
.st-added { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 22px; padding: 30px 28px; text-align: center; max-width: 420px; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,0.7); animation: stPop 0.28s cubic-bezier(0.175,0.885,0.32,1.275); }
@keyframes stPop { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
.st-added-badge { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--ok,#34d399) 18%, transparent); color: var(--ok,#34d399); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 14px; }
.st-added h3 { font-size: 1.35rem; font-weight: 800; }
.st-added-item { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 18px 0 22px; }
.st-added-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--bg-dark); flex-shrink: 0; }
.st-added-name { font-weight: 700; font-size: 0.98rem; }
.st-added-cartline { color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; }
.st-added-btns { display: flex; gap: 10px; }
.st-added-btns .lp-btn { flex: 1; justify-content: center; }

/* cart drawer */
.st-drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 110; opacity: 0; pointer-events: none; transition: 0.25s; }
.st-drawer-bg.show { opacity: 1; pointer-events: auto; }
.st-drawer { position: fixed; top: 0; right: 0; width: 420px; max-width: 92vw; height: 100%; background: var(--bg-panel);
  border-left: 1px solid var(--border); z-index: 111; transform: translateX(100%); transition: 0.3s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; }
.st-drawer.show { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,0.6); }
.st-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.st-drawer-head h3 { font-size: 1.2rem; font-weight: 800; }
.st-drawer-head i { color: var(--primary); margin-right: 6px; }
.st-drawer-items { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.st-drawer-empty { text-align: center; color: var(--text-muted); padding: 50px 20px; }
.st-citem { display: flex; gap: 12px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.st-citem img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--bg-dark); flex-shrink: 0; }
.st-citem-info { flex: 1; min-width: 0; }
.st-citem-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-citem-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; margin-top: 2px; }
.st-citem-bottom { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.st-qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.st-qty button { width: 26px; height: 26px; border: 0; background: var(--bg-dark); color: var(--text-main); cursor: pointer; font-weight: 700; }
.st-qty button:hover { background: var(--primary); color: var(--on-primary); }
.st-qty span { min-width: 30px; text-align: center; font-size: 0.85rem; font-weight: 600; }
.st-citem-rm { margin-left: auto; background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
.st-citem-rm:hover { color: #ef4444; }
.st-drawer-foot { padding: 18px 22px; border-top: 1px solid var(--border); }
.st-drawer-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; }
.st-drawer-foot .lp-btn { width: 100%; justify-content: center; margin-bottom: 8px; }

@media (max-width: 860px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-side { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) { .st-grid { grid-template-columns: 1fr 1fr; gap: 14px; } }

/* ══ Checkout page ══ */
.ck-wrap { max-width: 1080px; margin: 0 auto; padding: 120px 6vw 80px; }
.ck-title { font-size: 2rem; font-weight: 900; margin-bottom: 6px; }
.ck-sub { color: var(--text-muted); margin-bottom: 28px; }
.ck-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.ck-panel { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.ck-panel h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.ck-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ck-item:last-child { border-bottom: 0; }
.ck-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--bg-dark); flex-shrink: 0; }
.ck-item-info { flex: 1; min-width: 0; }
.ck-item-name { font-weight: 600; }
.ck-item-meta { color: var(--text-muted); font-size: 0.85rem; margin-top: 3px; }
.ck-item-price { font-weight: 800; white-space: nowrap; }
.ck-item-rm { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; margin-left: 8px; }
.ck-item-rm:hover { color: #ef4444; }

.ck-coupon { display: flex; gap: 8px; margin-top: 8px; }
.ck-coupon input { flex: 1; padding: 11px 14px; background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-main); border-radius: 10px; outline: none; }
.ck-coupon input:focus { border-color: var(--primary); }
.ck-applied { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ck-chip { display: inline-flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--ok,#34d399) 14%, transparent); color: var(--ok,#34d399); border: 1px solid color-mix(in srgb, var(--ok,#34d399) 40%, transparent); padding: 5px 10px; border-radius: 20px; font-size: 0.82rem; font-weight: 600; }
.ck-chip button { background: none; border: 0; color: inherit; cursor: pointer; }
.ck-msg { margin-top: 10px; font-size: 0.85rem; }
.ck-msg.bad { color: #ef4444; }

.ck-sum { position: sticky; top: 90px; }
.ck-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text-muted); }
.ck-row.discount { color: var(--ok, #34d399); }
.ck-row.total { color: var(--text-main); font-size: 1.3rem; font-weight: 800; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; }
.ck-pay { width: 100%; justify-content: center; margin-top: 16px; }
.ck-fallback { display: block; text-align: center; margin-top: 12px; color: var(--text-muted); font-size: 0.82rem; }
.ck-fallback:hover { color: var(--primary); }
.ck-secure { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); font-size: 0.8rem; margin-top: 14px; }

/* success */
.ck-success { max-width: 520px; margin: 0 auto; text-align: center; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 22px; padding: 50px 36px; }
.ck-success .ck-check { width: 84px; height: 84px; border-radius: 50%; background: color-mix(in srgb, var(--ok,#34d399) 18%, transparent); color: var(--ok,#34d399); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; margin: 0 auto 22px; }
.ck-success h1 { font-size: 1.8rem; font-weight: 800; }
.ck-success p { color: var(--text-muted); margin: 12px 0 0; line-height: 1.6; }
.ck-txid { margin: 22px auto; background: var(--bg-dark); border: 1px dashed var(--border); border-radius: 12px; padding: 14px 18px; font-family: monospace; font-size: 0.95rem; word-break: break-all; }
.ck-txid span { color: var(--text-muted); font-family: 'Inter'; display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }

.ck-item-was { color: #ef4444; font-size: 0.8rem; text-decoration: line-through; margin-left: 8px; font-weight: 500; }

/* success overlay (over the checkout page) */
.ck-ovl { position: fixed; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(6px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: 0.25s; }
.ck-ovl.show { opacity: 1; }
.ck-ovl-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 24px; padding: 40px 34px; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 40px 100px rgba(0,0,0,0.7); transform: scale(0.92); transition: 0.28s cubic-bezier(0.175,0.885,0.32,1.275); }
.ck-ovl.show .ck-ovl-card { transform: none; }
.ck-ovl-card .ck-check { width: 80px; height: 80px; border-radius: 50%; background: color-mix(in srgb, var(--ok,#34d399) 18%, transparent); color: var(--ok,#34d399); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; margin: 0 auto 20px; }
.ck-ovl-card h1 { font-size: 1.7rem; font-weight: 800; }
.ck-ovl-card > p { color: var(--text-muted); margin: 10px 0 0; line-height: 1.6; }
.ck-rows { text-align: left; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 16px; margin: 22px 0 16px; }
.ck-orow { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.ck-orow:last-child { border-bottom: 0; }
.ck-orow span { color: var(--text-muted); flex-shrink: 0; }
.ck-orow b { text-align: right; }

@media (max-width: 820px) { .ck-grid { grid-template-columns: 1fr; } .ck-sum { position: static; } }
@media (max-width: 600px) {
  .st-head { padding-top: 104px; }
  .st-cart-btn { width: 40px; height: 40px; }
  .st-drawer { width: 100%; max-width: 100%; }
  .ck-wrap { padding-top: 100px; }
  .st-added-btns, .st-manage-btns { flex-direction: column; }
}
