/* Document reset, type, and layout utilities (.tk-container, .tk-grid, .tk-row).
   Small-screen changes for these live in 06-responsive.css.
   Signed-in pages restyle .tk-main and .tk-container again in 14-overrides.css. */

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--silver);
    font-family: var(--font);
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: var(--lh-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
/* Never letter-space Arabic — it tears connected letterforms. */
:lang(ar) { letter-spacing: normal; }

html { overflow-x: clip; }
/* clip (not hidden) so descendants can use position:sticky against the viewport. */
body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }

/* Lock page scroll while the mobile drawer or admin sidebar is open. */
body:has(#tk-burger:checked),
body:has(#tk-adminmenu:checked),
body.tk-nav-open,
body.tk-sidebar-open { overflow: hidden; }
body.tk-nav-open .tk-wadock,
body:has(#tk-burger:checked) .tk-wadock {
    pointer-events: none;
    opacity: .35;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-bright); }

h1, h2, h3, h4 { color: var(--text); font-weight: 700; line-height: 1.3; margin: 0 0 .6rem; }
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p  { margin: 0 0 1rem; }

img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }

/* Latin numerals read better than Arabic-Indic for prices and phone numbers,
   even when the rest of the page is Arabic. Isolate so an LTR number cannot
   flip a surrounding RTL row (footer / contact hotline + copy). */
.tk-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
a.tk-phone[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.tk-container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }
.tk-main { flex: 1 0 auto; padding-block: 34px 64px; }
.tk-section { padding-block: 52px; }
.tk-section--alt { background: var(--bg-raised); border-block: 1px solid var(--line-soft); }

.tk-grid { display: grid; gap: 18px; }
.tk-grid--2 { grid-template-columns: repeat(2, 1fr); }
.tk-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tk-grid--4 { grid-template-columns: repeat(4, 1fr); }

.tk-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.tk-row:has(> .tk-field) { align-items: flex-end; }
.tk-row > .tk-field { flex: 1 1 16rem; min-width: 12rem; margin-bottom: 0; }
.tk-row--between { justify-content: space-between; align-items: center; }
.tk-row--middle { align-items: center; }

.tk-center { text-align: center; }
.tk-muted { color: var(--silver-dim); }
.tk-faint { color: var(--silver-faint); font-size: .88rem; }
.tk-small { font-size: .88rem; }
.tk-strong { color: var(--text); font-weight: 700; }
.tk-mt { margin-top: 1rem; }
.tk-mt-2 { margin-top: 2rem; }
.tk-mb { margin-bottom: 1rem; }
.tk-mb-0 { margin-bottom: 0; }
.tk-nowrap { white-space: nowrap; }
