/* ================================================================
   UniqTrix - SOFTWARE STORE (store.html)
   Night colours come from the shared variables in style.css; the DAY block at the bottom applies only while body.day-mode is set.
   Phone first: one column of cards, a scrolling row of category chips, a full-screen product window.
   ================================================================ */

.store-hero p#storeSub { max-width: 720px; margin: 0 auto; }
.store-toolbar[hidden], .store-grid[hidden], .store-empty[hidden], .store-how[hidden], .store-custom-wrap[hidden], .store-modal[hidden],
#storeEyebrow[hidden], #storeSub[hidden], #storeCustomBtn[hidden] { display: none !important; }

/* ── toolbar ── */
.store-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 18px; }
.store-search { position: relative; flex: 1 1 260px; max-width: 380px; }
.store-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; pointer-events: none; }
.store-search input {
  width: 100%; height: 46px; padding: 0 16px 0 42px; border-radius: 50px; font: inherit; font-size: 0.92rem;
  background: var(--store-field); color: var(--text-primary); border: 1px solid var(--border); outline: none; transition: border-color .25s, box-shadow .25s;
}
.store-search input::placeholder { color: var(--text-muted); }
.store-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(123,108,246,0.22); }
.store-cats { display: flex; flex-wrap: wrap; gap: 8px; flex: 2 1 320px; min-width: 0; }
.store-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 50px; cursor: pointer; font: inherit; font-size: 0.84rem; font-weight: 600;
  color: var(--text-secondary); background: var(--store-field); border: 1px solid var(--border); transition: all .25s;
}
.store-chip b { font-weight: 700; font-size: 0.72rem; padding: 1px 7px; border-radius: 20px; background: rgba(123,108,246,0.16); color: var(--text-primary); }
.store-chip:hover { border-color: var(--border-glow); color: var(--text-primary); }
.store-chip.on { background: var(--gradient-royal); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(123,108,246,0.35); }
.store-chip.on b { background: rgba(10,8,50,0.34); color: #fff; }
.store-sort { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.store-sort select {
  height: 44px; padding: 0 38px 0 16px; border-radius: 50px; font: inherit; font-size: 0.88rem; cursor: pointer; appearance: none; -webkit-appearance: none;
  color: var(--text-primary); background: var(--store-field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 15px center;
  border: 1px solid var(--border); outline: none;
}
.store-sort select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(123,108,246,0.22); }
.store-sort select option { color: #111; background: #fff; }
.store-count { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 18px; min-height: 1.2em; }

/* ── grid + cards ── */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 26px; align-items: stretch; }
.store-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--radius); cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border); position: relative;
}
.store-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--store-media); }
.store-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.22,1,.36,1); }
@media (hover: hover) and (pointer: fine) { .store-card:hover .store-card-media img { transform: scale(1.06); } }
.store-card-ph {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px;
  background: linear-gradient(135deg, rgba(123,108,246,0.35), rgba(56,189,248,0.25)); color: #fff;
}
.store-card-ph i { font-size: 2.4rem; opacity: .95; }
.store-card-ph span { font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; opacity: .95; }
.store-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.sb { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 20px; font-size: 0.7rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.sb-feat { background: #FFD76A; color: #3B2A00; }
.sb-sale { background: #E11D74; color: #fff; }
.store-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 20px 18px; min-width: 0; }
.store-card-cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--secondary); margin-bottom: 6px; }
.store-card-name { font-size: 1.15rem; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.store-card-name a { color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-card-name a:hover { color: var(--primary); }
.store-card-tag { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.store-card-tech { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; margin-bottom: 4px; min-height: 28px; }
.store-card-tech span, .sm-tech span {
  flex: 0 0 auto; max-width: 100%; padding: 4px 11px; border-radius: 20px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--store-chip); color: var(--text-secondary); border: 1px solid var(--border);
}
.store-card-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 14px; }
.store-card-tag + .store-card-foot, .store-card-name + .store-card-tag + .store-card-foot { margin-top: auto; }
.store-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.store-card-body > .store-card-tech { margin-bottom: 14px; }

/* price */
.store-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; min-width: 0; }
.sp-now { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.2px; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sp-ask { font-size: 1rem; }
.sp-was { font-size: 0.84rem; color: var(--text-muted); text-decoration: line-through; }
.sp-off { font-style: normal; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 20px; background: rgba(244,114,182,0.16); color: var(--accent); }

.store-btn-demo {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; white-space: nowrap;
  color: var(--primary); border: 1px solid var(--border-glow); background: transparent; transition: all .25s;
}
.store-btn-demo:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.store-btn-order { white-space: nowrap; }

/* loading + empty */
.store-skel { border-radius: var(--radius); min-height: 400px; border: 1px solid var(--border); background: linear-gradient(100deg, var(--bg-card) 30%, rgba(123,108,246,0.12) 50%, var(--bg-card) 70%); background-size: 220% 100%; animation: storeShimmer 1.4s linear infinite; }
@keyframes storeShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .store-skel { animation: none; } }
.store-empty { text-align: center; padding: 56px 20px 40px; max-width: 520px; margin: 0 auto; }
.store-empty i { font-size: 2.6rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 16px; }
.store-empty h3 { font-size: 1.3rem; margin-bottom: 8px; }
.store-empty p { color: var(--text-secondary); margin-bottom: 20px; }

/* ── how it works ── */
.store-how { padding-top: 30px; }
.store-how-head { text-align: center; margin-bottom: 30px; }
.store-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; counter-reset: none; }
.store-step { position: relative; padding: 26px 22px 22px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border); }
.store-step-n { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 12px; margin-bottom: 14px; font-weight: 800; color: #fff; background: var(--gradient-royal); box-shadow: 0 6px 18px rgba(123,108,246,0.4); }
.store-step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.store-step p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ── custom work ── */
.store-custom-wrap { padding-top: 10px; }
.store-custom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 30px; padding: 34px 36px; border-radius: 24px; background: linear-gradient(135deg, rgba(123,108,246,0.18), rgba(56,189,248,0.12)); border: 1px solid var(--border-glow); }
.store-custom-text { flex: 1 1 320px; min-width: 0; }
.store-custom h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-bottom: 8px; }
.store-custom p { color: var(--text-secondary); max-width: 640px; }

/* ── product window ── */
html.store-lock { overflow: hidden; }
.store-modal { position: fixed; inset: 0; z-index: 9996; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.store-modal-backdrop { position: absolute; inset: 0; background: rgba(3,4,14,0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: storeFade .25s ease both; }
.store-modal-box {
  position: relative; width: 100%; max-width: 1040px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 22px; background: var(--store-panel); border: 1px solid var(--border-glow); box-shadow: 0 30px 90px rgba(0,0,0,0.6); outline: none; padding: 30px;
  animation: storePop .34s cubic-bezier(.22,1,.36,1) both;
}
@keyframes storeFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes storePop { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .store-modal-backdrop, .store-modal-box { animation: none; } }
.store-modal-close {
  position: sticky; top: 0; float: right; z-index: 3; margin: -12px -12px 0 8px; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: var(--text-primary); background: var(--store-field); border: 1px solid var(--border); transition: all .25s;
}
.store-modal-close:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: rotate(90deg); }
.sm-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 30px; align-items: start; clear: both; }
.sm-main { aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--store-media); border: 1px solid var(--border); }
.sm-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-main-ph { display: flex; }
.sm-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.sm-thumb { flex: 0 0 82px; height: 56px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid var(--border); background: var(--store-media); opacity: .75; transition: all .2s; }
.sm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-thumb:hover { opacity: 1; }
.sm-thumb.on { border-color: var(--primary); opacity: 1; }
.sm-cat { display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--secondary); margin-bottom: 8px; }
.sm-info h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.25; margin-bottom: 8px; }
.sm-tag { color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.sm-price { margin: 4px 0 18px; }
.sm-price .sp-now { font-size: 1.75rem; }
.sm-price .sp-was { font-size: 1rem; }
.sm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.sm-actions .btn { flex: 1 1 auto; justify-content: center; }
.sm-note { display: flex; gap: 9px; align-items: flex-start; font-size: 0.83rem; line-height: 1.55; color: var(--text-secondary); margin-bottom: 18px; }
.sm-note i { color: var(--secondary); margin-top: 3px; }
.sm-facts { list-style: none; display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--store-chip); border: 1px solid var(--border); }
.sm-facts li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.9rem; color: var(--text-primary); line-height: 1.45; }
.sm-facts i { width: 18px; text-align: center; margin-top: 2px; color: var(--primary); }
.sm-demo { display: flex; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--store-chip); border: 1px dashed var(--border-glow); font-size: 0.86rem; }
.sm-demo i { color: var(--primary); margin-top: 3px; }
.sm-demo b { display: block; margin-bottom: 2px; color: var(--text-primary); }
.sm-demo span { color: var(--text-secondary); word-break: break-word; white-space: pre-line; }
.sm-more { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.sm-more h3 { font-size: 1.05rem; margin: 22px 0 10px; }
.sm-more h3:first-child { margin-top: 0; }
.sm-desc p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; overflow-wrap: anywhere; }
.sm-feat { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px 22px; }
.sm-feat li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.5; }
.sm-feat i { color: #22C55E; margin-top: 4px; font-size: 0.8rem; }
.sm-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-terms { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }

/* ── phones ── */
@media (max-width: 860px) {
  .sm-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .store-modal-box { padding: 20px 18px 24px; }
}
@media (max-width: 640px) {
  .store-hero { padding-bottom: 30px !important; }
  .store-toolbar { gap: 12px; }
  .store-search { flex: 1 1 100%; max-width: none; }
  .store-cats { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .store-cats::-webkit-scrollbar { display: none; }
  .store-chip { flex: 0 0 auto; }
  .store-sort { margin-left: 0; width: 100%; justify-content: space-between; }
  .store-sort select { flex: 1 1 auto; max-width: none; }
  .store-grid { gap: 20px; }
  .store-card-foot { flex-direction: column; align-items: stretch; }
  .store-card-actions { margin-left: 0; width: 100%; }
  .store-card-actions .btn, .store-card-actions .store-btn-demo { flex: 1 1 0; justify-content: center; }
  .store-custom { padding: 26px 22px; }
  .store-custom .btn { width: 100%; justify-content: center; }
  .store-modal { padding: 0; align-items: flex-end; }
  .store-modal-box { max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0; max-width: none; }
  .sm-actions .btn { flex: 1 1 100%; }
}

/* ================================================================
   DAY MODE - only while body.day-mode is set
   ================================================================ */
:root { --store-field: rgba(255,255,255,0.05); --store-chip: rgba(123,108,246,0.09); --store-media: rgba(123,108,246,0.08); --store-panel: #0D0A24; }
body.day-mode { --store-field: #FFFFFF; --store-chip: #F1EEFF; --store-media: #E8E4FF; --store-panel: #FFFFFF; }
body.day-mode .store-search input,
body.day-mode .store-sort select { border-color: rgba(84,72,200,0.28); }
body.day-mode .store-chip { color: #2E2A66; border-color: rgba(84,72,200,0.28); }
body.day-mode .store-chip b { background: rgba(84,72,200,0.14); color: #2E2480; }
body.day-mode .store-chip:hover { color: #1B1650; border-color: #5448C8; background: #F6F4FF; }
body.day-mode .store-chip.on { color: #fff; background: linear-gradient(135deg, #5448C8, #0277BD); border-color: transparent; }
body.day-mode .store-chip.on b { background: rgba(10,8,50,0.34); color: #fff; }
body.day-mode .store-card,
body.day-mode .store-step { background: #FFFFFF; border-color: rgba(84,72,200,0.18); box-shadow: 0 8px 26px rgba(84,72,200,0.08); }
body.day-mode .store-card-cat,
body.day-mode .sm-cat { color: #0369A1; }
body.day-mode .store-card-name a { color: #0F0D2E; }
body.day-mode .store-card-name a:hover { color: #5448C8; }
body.day-mode .store-card-tag,
body.day-mode .store-step p,
body.day-mode .sm-tag, body.day-mode .sm-desc p, body.day-mode .sm-feat li, body.day-mode .sm-note, body.day-mode .sm-demo span { color: rgba(15,13,46,0.78); }
body.day-mode .store-card-tech span, body.day-mode .sm-tech span { color: #2E2A66; background: #F1EEFF; border-color: rgba(84,72,200,0.22); }
body.day-mode .sp-now { background: linear-gradient(135deg, #4A3FC0, #0369A1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
body.day-mode .sp-was { color: rgba(15,13,46,0.6); }
body.day-mode .sp-off { background: #FCE7F3; color: #9D174D; }
body.day-mode .store-btn-demo { color: #4A3FC0; border-color: rgba(84,72,200,0.5); background: #FFFFFF; }
body.day-mode .store-btn-demo:hover { background: #4A3FC0; color: #fff; border-color: #4A3FC0; }
body.day-mode .store-empty h3, body.day-mode .store-step h3, body.day-mode .store-custom h2, body.day-mode .sm-info h2, body.day-mode .sm-more h3 { color: #0F0D2E; }
body.day-mode .store-empty p, body.day-mode .store-custom p, body.day-mode .store-count { color: rgba(15,13,46,0.72); }
body.day-mode .store-custom { background: linear-gradient(135deg, rgba(84,72,200,0.1), rgba(2,119,189,0.08)); border-color: rgba(84,72,200,0.32); }
body.day-mode .store-modal-backdrop { background: rgba(30,27,75,0.55); }
body.day-mode .store-modal-box { border-color: rgba(84,72,200,0.35); box-shadow: 0 30px 90px rgba(40,30,120,0.35); }
body.day-mode .store-modal-close { color: #0F0D2E; border-color: rgba(84,72,200,0.28); background: #F1EEFF; }
body.day-mode .store-modal-close:hover { color: #fff; background: #4A3FC0; }
body.day-mode .sm-facts, body.day-mode .sm-demo { background: #F6F4FF; border-color: rgba(84,72,200,0.25); }
body.day-mode .sm-facts li, body.day-mode .sm-demo b { color: #0F0D2E; }
body.day-mode .sm-facts i, body.day-mode .sm-demo i, body.day-mode .sm-note i { color: #4A3FC0; }
body.day-mode .sm-feat i { color: #15803D; }
body.day-mode .sm-terms { color: rgba(15,13,46,0.62); }
body.day-mode .sm-thumb { border-color: rgba(84,72,200,0.25); }
body.day-mode .sm-thumb.on { border-color: #4A3FC0; }
body.day-mode .store-skel { background: linear-gradient(100deg, #FFFFFF 30%, #ECE9FF 50%, #FFFFFF 70%); background-size: 220% 100%; }
body.day-mode .sb-sale { background: #BE185D; }

/* the category chips run edge to edge on a phone: they bleed out by the page's own side padding, which is 14px below 480px (16px above) */
@media (max-width: 479px) {
  .store-cats { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}
