/* Products page — scoped to .products-page, .products-* classes so it
   coexists with style.css without leaking across the rest of the site. */

/* The site-wide body uses --warm-bg (#383838) which shows through on the
   left/right via the scrollbar-gutter and any wider-than-100% transforms.
   On the products page we want full dark coverage, so override body bg. */
body {
    background: var(--bg, #0c0c0e);
}
html.light body {
    background: #ffffff;
}

.products-page {
    padding-top: 88px; /* clears the fixed nav */
    background: var(--bg, #0c0c0e);
    color: var(--text, #fff);
    min-height: 100vh;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.products-hero {
    padding: 80px 32px 56px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.products-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
            900px 380px at 18% 20%,
            rgba(196, 23, 23, 0.18),
            transparent 60%
        ),
        radial-gradient(
            700px 320px at 82% 70%,
            rgba(196, 23, 23, 0.1),
            transparent 60%
        );
    pointer-events: none;
}
.products-hero-inner {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
    text-align: center;
}
.products-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red, #c41717);
    margin-bottom: 18px;
}
.products-hero-title {
    font-size: clamp(34px, 5.4vw, 64px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 0 0 22px;
}
.products-hero-sub {
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.6;
    color: var(--text-mid, #a1a1aa);
    max-width: 640px;
    margin: 0 auto 32px;
}
.products-hero-sub strong {
    color: var(--text, #fff);
    font-weight: 600;
}
.products-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    background: var(--red, #c41717);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 10px 28px rgba(196, 23, 23, 0.28);
}
.products-hero-cta:hover {
    background: var(--red-dark, #9e1010);
    transform: translateY(-1px);
    box-shadow: 0 14px 38px rgba(196, 23, 23, 0.36);
}

/* ── Sticky category nav ──────────────────────────────────────────────── */

.products-catnav {
    position: sticky;
    top: 64px; /* below fixed main nav */
    z-index: 30;
    background: rgba(12, 12, 14, 0.82);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
html.light .products-catnav {
    background: rgba(255, 255, 255, 0.85);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
.products-catnav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.products-catnav-inner::-webkit-scrollbar { display: none; }

.products-catpill {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-mid, #a1a1aa);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.005em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
html.light .products-catpill {
    background: rgba(0, 0, 0, 0.04);
    color: #3a3a3c;
}
.products-catpill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text, #fff);
}
html.light .products-catpill:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #18181b;
}
.products-catpill.is-active {
    background: var(--red, #c41717);
    color: #fff;
    border-color: var(--red, #c41717);
    box-shadow: 0 6px 18px rgba(196, 23, 23, 0.32);
}

/* ── Category sections ────────────────────────────────────────────────── */

.products-sections {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 72px;
    /* Reserve enough vertical space during load that the bottom CTA
       doesn't briefly sit above-the-fold and then jump down when the
       catalog renders. */
    min-height: 60vh;
}

/* Staggered fade-in for each category section as it renders, so the
   catalog reveal feels intentional instead of snapping. */
@keyframes products-cat-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
.products-cat {
    opacity: 0;
    animation: products-cat-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.products-cat:nth-of-type(2) { animation-delay: 0.06s; }
.products-cat:nth-of-type(3) { animation-delay: 0.12s; }
.products-cat:nth-of-type(4) { animation-delay: 0.18s; }
.products-cat:nth-of-type(5) { animation-delay: 0.24s; }
.products-cat:nth-of-type(6) { animation-delay: 0.30s; }
.products-loading,
.products-empty {
    padding: 60px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-mid, #a1a1aa);
}

/* Skeleton loading state — exclude from the staggered fade-in cascade
   so it appears immediately while real cards animate in over the top. */
.products-cat--skeleton {
    opacity: 1 !important;
    animation: none !important;
}
/* Skeleton: keep the red eyebrow (it tracks the loaded state visually);
   only dim the title and count so the placeholder feels less assertive. */
.products-cat--skeleton .products-cat-title,
.products-cat--skeleton .products-cat-count {
    color: var(--text-mid, #a1a1aa);
    opacity: 0.55;
}
/* Skeleton state — uses the real .products-card markup so dimensions
   match exactly. We just suppress hover/transform and fill content slots
   with shimmer bars. */
.products-card.is-skeleton {
    cursor: default;
    pointer-events: none;
}
.products-card.is-skeleton:hover {
    border-color: rgba(255, 255, 255, 0.06);
    transform: none;
    box-shadow: none;
}
.products-card.is-skeleton .products-card-thumb.is-skel-shimmer {
    background-color: transparent;
}
@keyframes products-skel-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.is-skel-shimmer,
.skel-line {
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.10) 45%,
        rgba(255, 255, 255, 0.04) 90%
    );
    background-size: 200% 100%;
    animation: products-skel-shimmer 1.6s ease-in-out infinite;
    border-radius: 4px;
}
html.light .is-skel-shimmer,
html.light .skel-line {
    background: linear-gradient(
        100deg,
        rgba(0, 0, 0, 0.04) 0%,
        rgba(0, 0, 0, 0.10) 45%,
        rgba(0, 0, 0, 0.04) 90%
    );
    background-size: 200% 100%;
}
/* The shimmer bars step in for actual content, sized to typical text
   metrics so a card with bars is the same height as a card with words. */
.skel-line--title   { display: block; height: 18px; width: 70%; margin-bottom: 2px; }
.skel-line--full,
.skel-line--narrow  { display: block; height: 12px; margin-bottom: 4px; }
.skel-line--full    { width: 100%; }
.skel-line--narrow  { width: 60%; }
.skel-line--label   { display: inline-block; height: 10px; width: 40%; }
.skel-line--value   { display: inline-block; height: 10px; width: 35%; }
.skel-line--btn     { display: block; height: 36px; width: 100%; border-radius: 8px; }
/* Ensure spec-row layout still spreads label/value across with our bars */
.products-card.is-skeleton .products-card-spec {
    align-items: center;
}

.products-cat {
    scroll-margin-top: 130px;
}
.products-cat-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
html.light .products-cat-head {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
.products-cat-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}
/* Force the inner head block + its children to align to the left edge.
   Browser h2 defaults sometimes contribute extra inline-start spacing that
   subtly offsets the eyebrow vs. the title; these resets keep both flush. */
.products-cat-head > div {
    display: block;
    text-align: left;
    padding: 0;
    margin: 0;
    min-width: 0;
}
.products-cat-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red, #c41717);
    margin: 0 0 8px 0;
    padding: 0;
    text-align: left;
    /* Drop the trailing letter-spacing past the last glyph so "CATEGORY"
       doesn't render with a visual right-shift relative to the title's
       negative letter-spacing. */
    text-indent: 0;
}
.products-cat-title {
    text-align: left;
    margin: 0;
    padding: 0;
}
.products-cat-count {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mid, #a1a1aa);
    flex-shrink: 0;
    padding-bottom: 6px;
}

.products-grid {
    display: grid;
    /* Always 4 columns on desktop so the skeleton + the loaded state
       have an identical row shape. Steps down to 3/2/1 on narrower
       viewports. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 1080px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
}

/* ── Product card ─────────────────────────────────────────────────────── */

.products-card {
    background: var(--surface, #18181b);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
html.light .products-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}
.products-card:hover {
    border-color: rgba(196, 23, 23, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}
html.light .products-card:hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.products-card-thumb {
    aspect-ratio: 4 / 3;
    background-color: rgba(255, 255, 255, 0.04);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}
html.light .products-card-thumb {
    background-color: rgba(0, 0, 0, 0.04);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
.products-card-thumb.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim, #71717a);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.products-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.products-card-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
}
.products-card-desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-mid, #a1a1aa);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.products-card-specs {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
html.light .products-card-specs {
    border-top-color: rgba(0, 0, 0, 0.08);
}
.products-card-spec {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}
.products-card-spec-name {
    color: var(--text-mid, #a1a1aa);
    font-weight: 500;
}
.products-card-spec-value {
    color: var(--text, #fff);
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}
html.light .products-card-spec-value { color: #18181b; }
.products-card-spec.has-options .products-card-spec-value::after {
    content: " ⌄";
    color: var(--red, #c41717);
    font-weight: 700;
}
.products-card-specs-more {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-dim, #71717a);
    text-transform: uppercase;
    margin-top: 4px;
}

.products-card-actions {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    gap: 8px;
}
.products-card-cta {
    flex: 1;
    padding: 10px 14px;
    background: var(--red, #c41717);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: background 0.15s;
}
.products-card-cta:hover {
    background: var(--red-dark, #9e1010);
}

/* ── Bottom CTA ───────────────────────────────────────────────────────── */

.products-bottom-cta {
    padding: 80px 32px;
    background: linear-gradient(
        135deg,
        rgba(196, 23, 23, 0.12),
        rgba(196, 23, 23, 0.04)
    );
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
html.light .products-bottom-cta {
    background: linear-gradient(
        135deg,
        rgba(196, 23, 23, 0.06),
        rgba(196, 23, 23, 0.02)
    );
    border-top-color: rgba(0, 0, 0, 0.06);
}
.products-bottom-cta-inner {
    max-width: 720px;
    margin: 0 auto;
}
.products-bottom-cta h2 {
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
}
.products-bottom-cta p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-mid, #a1a1aa);
    margin: 0 0 28px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.products-footer {
    padding: 28px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg, #0c0c0e);
}
html.light .products-footer {
    background: #fff;
    border-top-color: rgba(0, 0, 0, 0.06);
}
.products-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.products-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-mid, #a1a1aa);
}
.products-footer-brand img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.85;
}
.products-footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
}
.products-footer-links a {
    font-size: 13px;
    color: var(--text-mid, #a1a1aa);
    text-decoration: none;
    transition: color 0.15s;
}
.products-footer-links a:hover { color: var(--text, #fff); }
html.light .products-footer-links a:hover { color: #18181b; }

@media (max-width: 720px) {
    .products-hero { padding: 56px 22px 40px; }
    .products-hero-title { font-size: 36px; }
    .products-sections { padding: 40px 18px 60px; gap: 56px; }
    .products-cat-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .products-cat-count { padding-bottom: 0; }
    .products-bottom-cta { padding: 56px 22px; }
}
