/* ══════════════════════════════════════════════════════════
   Zenthrix Store: product listing (index.html)
   Self-contained: every rule is scoped under .shop so the older
   .collections / .collection-card styles can't leak in.
   ══════════════════════════════════════════════════════════ */
.shop {
    --s-accent: #00D4FF;
    --s-accent-ink: #001a20;
    --s-bg: #050505;
    --s-surface: #0f0f10;
    --s-surface-2: #161618;
    --s-line: rgba(255, 255, 255, 0.08);
    --s-line-2: rgba(255, 255, 255, 0.16);
    --s-text: #f4f4f5;
    --s-soft: rgba(255, 255, 255, 0.72);
    --s-muted: rgba(255, 255, 255, 0.48);
    --s-amber: #ffb020;
    --s-red: #ff5a5a;
    --s-radius: 16px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    color: var(--s-text);
    background:
        radial-gradient(900px 420px at 85% -120px, rgba(0, 212, 255, 0.10), transparent 70%),
        var(--s-bg);
    padding: 108px 0 80px;
    min-height: 100vh;
}
.shop *, .shop *::before, .shop *::after { box-sizing: border-box; }
/* The site sets overflow-x:hidden on html/body, which breaks position:sticky.
   "clip" hides sideways overflow the same way but keeps sticky working. */
html:has(.shop), body:has(.shop) { overflow-x: clip; }
.shop-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.shop-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--s-accent); margin: 0 0 10px; }
.shop-title { font-family: inherit; font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 0; color: var(--s-text); text-transform: none; }
.shop-title .shop-count { font-size: 0.42em; font-weight: 600; letter-spacing: 0; color: var(--s-muted); vertical-align: middle; margin-left: 10px; }
.shop-perks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shop-perks li {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px; border: 1px solid var(--s-line); border-radius: 999px;
    background: rgba(255, 255, 255, 0.025); font-size: 13px; color: var(--s-soft); white-space: nowrap;
}
.shop-perks svg { width: 15px; height: 15px; color: var(--s-accent); flex-shrink: 0; }

/* ── Sticky toolbar ── */
.shop-bar {
    position: sticky; top: var(--nav-h, 74px); z-index: 20;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; margin-bottom: 18px;
    background: var(--s-bg);
}
/* soft fade under the sticky bar so cards slide beneath it cleanly */
.shop-bar::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px;
    background: linear-gradient(var(--s-bg), rgba(5, 5, 5, 0)); pointer-events: none;
}
.shop-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.shop-chips::-webkit-scrollbar { display: none; }
.shop-chip {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--s-line-2); background: transparent; color: var(--s-soft);
    font: 500 14px/1 inherit; font-family: inherit; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
    text-transform: none; letter-spacing: 0;
}
.shop-chip:hover { border-color: rgba(255, 255, 255, 0.32); color: var(--s-text); }
.shop-chip[aria-pressed="true"] { background: var(--s-text); border-color: var(--s-text); color: #000; }
.shop-chip .n { font-size: 12px; color: var(--s-muted); font-variant-numeric: tabular-nums; }
.shop-chip[aria-pressed="true"] .n { color: rgba(0, 0, 0, 0.55); }
.shop-chip:focus-visible, .shop-search input:focus-visible, .shop-sort:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }

.shop-search { position: relative; flex: 0 1 260px; }
.shop-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--s-muted); pointer-events: none; }
.shop-search input {
    width: 100%; height: 38px; padding: 0 34px 0 38px; border-radius: 999px;
    border: 1px solid var(--s-line-2); background: var(--s-surface); color: var(--s-text);
    font: 400 14px/1 inherit; font-family: inherit; outline: none; transition: border-color .15s;
}
.shop-search input::placeholder { color: var(--s-muted); }
.shop-search input:focus { border-color: var(--s-accent); }
.shop-search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font: 600 11px/1 inherit; font-family: inherit; color: var(--s-muted);
    border: 1px solid var(--s-line-2); border-radius: 6px; padding: 3px 6px;
}
.shop-search input:focus + kbd, .shop-search input:not(:placeholder-shown) + kbd { display: none; }
.shop-sort {
    flex-shrink: 0; height: 38px; padding: 0 34px 0 14px; border-radius: 999px;
    border: 1px solid var(--s-line-2); background: var(--s-surface); color: var(--s-soft);
    font: 500 14px/1 inherit; font-family: inherit; cursor: pointer; outline: none;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
}
.shop-sort option { background: #111; color: #fff; }

.shop-meta { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; font-size: 13px; color: var(--s-muted); min-height: 18px; }
.shop-clear { background: none; border: 0; color: var(--s-accent); font: 600 13px/1 inherit; font-family: inherit; cursor: pointer; padding: 4px 0; }

/* ── Grid + cards ── */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.shop-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--s-surface); border: 1px solid var(--s-line); border-radius: var(--s-radius);
    overflow: hidden; cursor: pointer; outline: none;
    transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .25s, box-shadow .25s;
    animation: shopIn .5s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes shopIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (hover: hover) {
    .shop-card:hover { transform: translateY(-4px); border-color: rgba(0, 212, 255, 0.35); box-shadow: 0 18px 40px -18px rgba(0, 212, 255, 0.35); }
    .shop-card:hover .shop-img img { transform: scale(1.045); }
}
.shop-card:focus-visible { border-color: var(--s-accent); box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.25); }

.shop-img { position: relative; aspect-ratio: 1 / 1; background: #f3f4f6; overflow: hidden; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.shop-card.is-out .shop-img img { filter: grayscale(1); opacity: .55; }

.shop-tag {
    position: absolute; top: 10px; left: 10px; z-index: 1;
    padding: 5px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 1;
    background: rgba(10, 10, 10, 0.82); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.shop-tag.sale { background: var(--s-accent); color: var(--s-accent-ink); }
.shop-tag.low { background: var(--s-amber); color: #241500; }
.shop-tag.out { background: #2a2a2a; color: rgba(255, 255, 255, 0.8); }

.shop-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 14px; flex: 1; }
.shop-name {
    font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; margin: 0; color: var(--s-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-transform: none;
}
.shop-sub { font-size: 13px; color: var(--s-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; }
.shop-rating { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--s-soft); }
.shop-rating svg { width: 13px; height: 13px; color: #ffc53d; }
.shop-rating span { color: var(--s-muted); }
.shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.shop-price { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--s-text); font-variant-numeric: tabular-nums; }
.shop-price s { font-size: 13px; font-weight: 500; color: var(--s-muted); margin-right: 6px; }
.shop-price .now { color: var(--s-accent); }
.shop-card.is-out .shop-price { color: var(--s-muted); }

.shop-add {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; min-width: 36px; padding: 0 12px; border-radius: 999px; border: 0;
    background: var(--s-accent); color: var(--s-accent-ink); font: 700 13px/1 inherit; font-family: inherit;
    cursor: pointer; transition: transform .15s, background .15s, opacity .15s;
}
.shop-add svg { width: 16px; height: 16px; }
.shop-add:hover { transform: scale(1.05); }
.shop-add:active { transform: scale(0.95); }
.shop-add:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.shop-add.ghost { background: transparent; color: var(--s-text); border: 1px solid var(--s-line-2); }
.shop-add[disabled] { background: #222; color: rgba(255, 255, 255, 0.4); cursor: not-allowed; transform: none; }
.shop-add.added { background: #00c853; color: #001b0b; }

/* Skeletons while loading */
.shop-skel { border-radius: var(--s-radius); border: 1px solid var(--s-line); overflow: hidden; background: var(--s-surface); }
.shop-skel .a { aspect-ratio: 1 / 1; }
.shop-skel .b { height: 14px; margin: 16px 14px 8px; border-radius: 6px; width: 75%; }
.shop-skel .c { height: 12px; margin: 0 14px 18px; border-radius: 6px; width: 45%; }
.shop-skel .a, .shop-skel .b, .shop-skel .c {
    background: linear-gradient(90deg, #141416 0%, #1d1d20 50%, #141416 100%);
    background-size: 200% 100%; animation: shopShimmer 1.3s linear infinite;
}
@keyframes shopShimmer { to { background-position: -200% 0; } }

/* Empty + error states */
.shop-empty { text-align: center; padding: 64px 20px; border: 1px dashed var(--s-line-2); border-radius: var(--s-radius); color: var(--s-soft); }
.shop-empty h3 { font-family: inherit; font-size: 18px; margin: 0 0 6px; color: var(--s-text); text-transform: none; letter-spacing: 0; }
.shop-empty p { margin: 0 0 16px; font-size: 14px; color: var(--s-muted); }
.shop-empty button { height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--s-line-2); background: transparent; color: var(--s-text); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; }

/* ── Phones ── */
@media (max-width: 760px) {
    .shop { padding-top: 92px; }
    .shop-wrap { padding: 0 14px; }
    .shop-head { margin-bottom: 14px; gap: 14px; }
    .shop-perks { gap: 6px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; width: 100%; }
    .shop-perks::-webkit-scrollbar { display: none; }
    .shop-perks li { font-size: 12px; padding: 7px 10px; }
    .shop-bar { flex-wrap: wrap; gap: 8px; padding: 8px 0 10px; margin-bottom: 12px; }
    .shop-chips { order: 2; flex: 0 0 100%; }
    .shop-search { flex: 1 1 0; min-width: 0; order: 1; }
    .shop-search input { height: 40px; }
    .shop-search kbd { display: none; }
    .shop-sort { order: 1; flex: 0 0 auto; width: 128px; height: 40px; }
    .shop-chip { height: 34px; padding: 0 12px; font-size: 13px; }
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .shop-body { padding: 10px 10px 12px; gap: 4px; }
    .shop-name { font-size: 13.5px; }
    .shop-sub { font-size: 12px; }
    .shop-price { font-size: 15px; }
    .shop-price s { display: block; font-size: 11px; margin: 0; }
    .shop-add { height: 32px; min-width: 32px; padding: 0 9px; }
    .shop-add .lbl { display: none; }
    .shop-tag { top: 8px; left: 8px; font-size: 10px; padding: 4px 7px; }
}
@media (prefers-reduced-motion: reduce) {
    .shop-card, .shop-card:hover, .shop-img img, .shop-add { animation: none; transition: none; transform: none; }
}

/* Nav: keep Login and Sign Up on the same baseline (site-wide fix) */
.auth-buttons { display: flex; align-items: center; gap: 18px; }
.auth-buttons .nav-link { display: inline-flex; align-items: center; margin: 0; padding-top: 0; padding-bottom: 0; line-height: 1; }
