/*
 * Transporter — base layer
 *
 * Tokens below are sampled from production computed styles (Tier 0 spec),
 * not chosen. Changing one changes the site; they are parity targets.
 */

:root {
    /* ── Brand ── */
    --tr-brand:        #BF3434;  /* menu button, active nav */
    --tr-brand-sale:   #C62D3C;  /* sale badges — see D-04, two reds in use */

    /* ── Surfaces ── */
    --tr-black:        #000000;  /* header row 1, mobile toolbar */
    --tr-dark:         #222222;  /* header row 2 */
    --tr-card:         #1A1A1A;  /* mega menu category card */
    --tr-white:        #FFFFFF;
    --tr-bg:           #F7F7F7;  /* global site background */
    --tr-btn-open:     #E0E0E0;  /* menu button, open state */

    /* ── Text ── */
    --tr-text:         #767676;  /* body */
    --tr-text-strong:  #111111;
    --tr-text-invert:  #FFFFFF;
    --tr-text-muted:   rgba(255, 255, 255, 0.8);

    /* ── Scrim ── */
    --tr-overlay:      rgba(0, 0, 0, 0.55);

    /* ── Type ──
       Bebas covers Latin display; "Gilroy Geo" carries Georgian headings and
       FiraGo carries Georgian body. The heading font was previously "MarkGeo",
       which is not loaded anywhere on the site, so every Georgian heading
       silently fell back to system sans-serif — the real brand heading face is
       "Gilroy Geo" (loaded weights 700/800). Bebas has no Georgian glyphs, so
       the display stack lists "Gilroy Geo" next: Latin renders in Bebas,
       Georgian falls through to Gilroy Geo. */
    --tr-font-body:    "Open Sans", "FiraGO", Arial, Helvetica, sans-serif; /* FiraGO carries the Georgian glyphs Open Sans lacks (QA design-01) */
    --tr-font-display: Bebas, "Gilroy Geo", sans-serif;
    --tr-font-ka:      FiraGO, sans-serif;
    --tr-font-ka-head: "Gilroy Geo", sans-serif;

    --tr-size-body:    15px;
    --tr-line-body:    24px;

    /* ── Layout ── */
    /* Measured on production (transportershop.ge) at a 1595px viewport:
       main.container       max-width 1560px, 0 padding  -> content 1560px
       header .container    max-width 1560px             -> content 1560px
       .whb-general-header-inner  padding-inline 36px    -> content 1488px
       The previous 1170px was Bootstrap's default, not a sampled value; it
       boxed every Elementor section ~442px narrower than production. */
    --tr-container:    1560px;
    --tr-gutter:       26px;      /* gutter only when viewport < container */
    --tr-header-pad:   26px;      /* measured: production logo sits 26px inside the 1560px container */
    --tr-header-1:     80px;
    --tr-header-2:     60px;
    --tr-toolbar:      55px;      /* mobile bottom bar */

    /* Global content inset. Production runs 0 here (its .container is full-bleed
       under the 1560px cap); this 5px is a deliberate PROJECT DIRECTIVE, not a
       sampled parity value — a small, even breathing gap from the viewport edge
       at every width. Applied once on .tr-main so it never disturbs the
       .tr-container / .tr-shell parity system above. */
    --tr-container-pad: 5px;

    /* ── Z-index scale ──
       Values match the existing stack so ported components keep their
       relationships. The mega menu genuinely sits at 9998/9999/10001. */
    --tr-z-toolbar:    350;
    --tr-z-overlay:    9998;
    --tr-z-panel:      9999;
    --tr-z-trigger:    10001;
}

/* ── Reset ── */

*,
*::before,
*::after { box-sizing: border-box; }

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    /* Global #F7F7F7 ground; !important beats Elementor's per-page
       `body.elementor-page-2031 { background:#fff }`. Sections layer their own
       bg on top. */
    background: var(--tr-bg) !important;
    color: var(--tr-text);
    font-family: var(--tr-font-body);
    font-size: var(--tr-size-body);
    line-height: var(--tr-line-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--tr-brand); }

button { cursor: pointer; background: none; border: 0; padding: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

table { border-collapse: collapse; width: 100%; }

/* ── Accessibility ── */

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--tr-brand);
    outline-offset: 2px;
}

.screen-reader-text {
    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:focus {
    position: fixed;
    top: 8px; left: 8px;
    z-index: 100000;
    padding: 10px 18px;
    background: var(--tr-black);
    color: var(--tr-white);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Layout primitives ── */

.tr-container {
    width: 100%;
    max-width: var(--tr-container);
    margin-inline: auto;
    padding-inline: 0;
}

/*
 * Gutters apply only once the viewport is narrower than the container.
 *
 * Keeping padding on at all widths would make the desktop content box
 * --tr-container MINUS 52px (1508px), which is not what production does:
 * its .container carries max-width 1560px with zero padding, so the content
 * box is exactly 1560px. Elementor sections are measured against that box, so
 * the 52px would show up as every section being narrow.
 *
 * The 1560px below must track --tr-container; media queries cannot read a
 * custom property, so this is the one place the value is repeated.
 */
@media (max-width: 1560px) {
    .tr-container { padding-inline: var(--tr-gutter); }
}

/*
 * .tr-shell — the container WITHOUT gutters, for Elementor-built content.
 *
 * Measured on production: main.container carries zero horizontal padding at
 * every viewport (390px -> width 390 left 0; 1285px -> width 1285 left 0;
 * 1595px -> width 1560 left 18). Elementor sections supply their own insets
 * (24px on 7802e53, 15px on ebf7093), so a theme gutter here is additive and
 * made every section 52px narrower than live below the 1560px cap.
 */
.tr-shell {
    width: 100%;
    max-width: var(--tr-container);
    margin-inline: auto;
    padding-inline: 0;
}

.tr-main {
    /* Global site wrapper: full width with a strict 5px inset on both sides, so
       every section sits inside a uniform 5px boundary. box-sizing:border-box
       (also set globally in the reset) keeps the 5px inside the 100% width.
       Scoped to main content, NOT the header chrome. See --tr-container-pad. */
    width: 100%;
    box-sizing: border-box;
    min-height: 40vh;
    padding: 0 var(--tr-container-pad);
}

/* Wide content must scroll inside its own box, never the page. */
.tr-scroll-x { overflow-x: auto; }

/* ── Homepage (front-page.php) section rhythm ──
 * Vertical gap between stacked homepage sections. First section (hero) gets none
 * because the rule only targets adjacent siblings. Dark bands set their own
 * padding; this is the inter-section breathing room. */
.tr-home > section + section { margin-top: 44px; }
