/* ==========================================================================
   Base — design tokens, reset, typography, layout primitives, buttons, forms
   ========================================================================== */

:root {
    /* Brand */
    /* IT Lobby: logo blue + navy (from the IT Lobby website theme) */
    --brand: #2e44a6;
    --brand-600: #24398f;
    --brand-700: #132a55;
    --brand-100: #d5e1ff;
    --brand-50: #eaf1ff;
    --accent: #f54927;
    --accent-50: #fff0ec;
    --amber: #ffb020;

    /* Neutrals */
    --ink: #0b1d33;
    --ink-2: #26344d;
    --muted: #60708a;
    --subtle: #8b93a7;
    --line: #e4e8f0;
    --line-2: #eef1f6;
    --bg: #ffffff;
    --surface: #f5f7fb;
    --surface-2: #eceff6;
    --night: #07111f;
    --night-2: #12345c;
    --night-gradient: linear-gradient(135deg, #07111f 0%, #0b1d33 52%, #12345c 100%);

    /* Status */
    --success: #12a150;
    --success-50: #e9f8ef;
    --danger: #e5484d;
    --danger-50: #fdeced;
    --warning: #b26b00;
    --warning-50: #fff5e0;

    /* Type */
    --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Sora", "Lato", system-ui, sans-serif;
    --fs-xs: .75rem;
    --fs-sm: .875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    --fs-3xl: clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem);
    --fs-4xl: clamp(2.25rem, 1.5rem + 3vw, 4rem);

    /* Shape & depth */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --shadow-sm: 0 1px 2px rgba(11, 21, 48, .06);
    --shadow: 0 6px 24px -8px rgba(11, 21, 48, .14);
    --shadow-lg: 0 24px 60px -18px rgba(11, 21, 48, .28);
    --ring: 0 0 0 3px rgba(46, 68, 166, .28);

    /* Layout — full-width: content spans the viewport with fluid side gutters */
    --gutter: clamp(16px, 3.4vw, 64px);
    --section: clamp(48px, 6vw, 36px);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--ink-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
/* Never let anything widen the page horizontally (keeps mobile viewport at device width) */
html, body { overflow-x: clip; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--ink); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.btn, .nav-link, .eyebrow, .price, .pill, .chip, .tag, .badge-count, .countdown, .cat-menu__toggle, .header-search__btn, .hero__badge, .promo__title, .side-banner__title, strong.display { font-family: var(--font-heading); }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-100); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Icons ---------- */
.icon {
    width: 1.25em; height: 1.25em; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

/* ---------- Layout ---------- */
.container { width: 100%; padding-inline: var(--gutter); margin-inline: auto; }
.narrow { max-width: 880px; }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .5); }
.section--flush-top { padding-top: clamp(24px, 3vw, 40px); }
.section--muted { background: var(--surface); }
.section + .section--tight, .section--tight + .section { padding-top: calc(var(--section) * .5); }
.section:has(+ .section--tight) { padding-bottom: calc(var(--section) * .5); }
/* Consecutive sections on the same (white) background share one gap */
.section:not(.section--muted):not(.deals):not(.warranty) + .section:not(.section--muted):not(.deals):not(.warranty):not(.section--tight) { padding-top: 0; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .75rem; }

/* ---------- Typography helpers ---------- */
.display-2 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.03em; }
.h3 { font-size: var(--fs-xl); }
.lead { font-size: var(--fs-lg); color: var(--muted); }
.muted { color: var(--muted); }
.text-success { color: var(--success); font-weight: 600; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand);
    margin-bottom: .75rem;
}
.eyebrow .icon { width: 16px; height: 16px; }
.eyebrow--light { color: #9fb0ff; }
.link-arrow {
    display: inline-flex; align-items: center; gap: .4rem;
    font-weight: 700; font-size: var(--fs-sm); color: var(--brand);
}
.link-arrow .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon, a:hover > .link-arrow .icon, a:hover .link-arrow .icon { transform: translateX(3px); }
.link-muted { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link-muted:hover { color: var(--ink); }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 1000;
    background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); font-weight: 600;
    transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--surface-2); --btn-fg: var(--ink); --btn-bd: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .65rem 1.25rem;
    border-radius: 999px; border: 1.5px solid var(--btn-bd);
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 700; font-size: var(--fs-sm); line-height: 1.2; white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--brand); --btn-fg: #fff; box-shadow: 0 8px 20px -10px rgba(46, 68, 166, .8); }
.btn--primary:hover { --btn-bg: var(--brand-600); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn--dark:hover { --btn-bg: #1b2747; }
.btn--soft { --btn-bg: var(--brand-50); --btn-fg: var(--brand-700); }
.btn--soft:hover { --btn-bg: var(--brand); --btn-fg: #fff; }
.btn--outline { --btn-bg: transparent; --btn-bd: var(--line); --btn-fg: var(--ink); }
.btn--outline:hover { --btn-bd: var(--ink); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--muted); }
.btn--ghost:hover { --btn-fg: var(--danger); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn--light:hover { --btn-bg: var(--brand-50); }
.btn--ghost-light { --btn-bg: rgba(255, 255, 255, .08); --btn-bd: rgba(255, 255, 255, .35); --btn-fg: #fff; backdrop-filter: blur(6px); }
.btn--ghost-light:hover { --btn-bg: rgba(255, 255, 255, .18); }
.btn--lg { min-height: 52px; padding: .8rem 1.6rem; font-size: var(--fs-base); }
.btn--sm { min-height: 34px; padding: .4rem .9rem; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.btn-row--center { justify-content: center; }
.center-link { margin-top: 2rem; text-align: center; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 42px; height: 42px; border-radius: 999px;
    color: var(--ink); background: var(--surface);
    transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm .icon { width: 16px; height: 16px; }
.icon-btn--glass { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .25); }
.icon-btn--glass:hover { background: rgba(255, 255, 255, .28); }
.text-btn { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: var(--fs-sm); color: var(--muted); }
.text-btn:hover, .text-btn.is-on { color: var(--brand); }
.text-btn.is-on .icon-heart { fill: currentColor; }

/* ---------- Pills, chips, tags ---------- */
.pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .7rem; border-radius: 999px;
    background: var(--brand-50); color: var(--brand-700);
    font-size: var(--fs-xs); font-weight: 700;
}
.pill .icon { width: 14px; height: 14px; }
.pill--accent { background: var(--accent); color: #fff; }
.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem .95rem; border-radius: 999px;
    border: 1.5px solid var(--line); background: #fff;
    font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
    transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip--removable .icon { width: 14px; height: 14px; }
.tag {
    display: inline-block; padding: .25rem .55rem; border-radius: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: .02em; line-height: 1.2;
}
.tag--sale { background: var(--accent); color: #fff; }
.tag--new { background: var(--ink); color: #fff; }
.tag--warn { background: var(--warning-50); color: var(--warning); }

/* ---------- Forms ---------- */
.input {
    width: 100%; min-height: 48px; padding: .7rem 1rem;
    border: 1.5px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--subtle); }
.input:hover { border-color: #cdd3e0; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 130px; }
.select { position: relative; }
.select select { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.select > .icon { position: absolute; right: .9rem; top: 50%; translate: 0 -50%; width: 16px; height: 16px; pointer-events: none; color: var(--muted); }
.field { display: grid; gap: .4rem; }
.field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field__req { color: var(--danger); }
.field__error { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
.field.has-error .input { border-color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.check a { color: var(--brand); font-weight: 600; }
.check.has-error { color: var(--danger); }

/* ---------- Notices ---------- */
.notice { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.25rem; border-radius: var(--radius); font-weight: 600; margin-block: 1.5rem; }
.notice--error { background: var(--danger-50); color: var(--danger); }
