/* gearshop — base: tokens, reset, typography, controls */
:root {
    --accent: #1f5fae;
    --accent-dark: #174a88;
    --accent-soft: #e8f0fa;
    --ink: #1e2630;
    --ink-2: #4a5563;
    --ink-3: #7a8594;
    --line: #dde3ea;
    --line-2: #eef1f5;
    --surface: #ffffff;
    --bg: #f3f5f8;
    --ok: #1f8a4c;
    --ok-soft: #e6f4ec;
    --warn: #a55d00;
    --warn-soft: #fdf1e1;
    --danger: #b3261e;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(20, 32, 48, .06), 0 4px 16px rgba(20, 32, 48, .06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.55 var(--font);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.25; font-weight: 700; color: var(--ink); }
h1 { font-size: 28px; letter-spacing: -.3px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; }
.skip-link:focus { left: 8px; top: 8px; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .93em; }

/* Buttons */
.btn, .button, button.validate, input[type=submit] {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 18px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    background: var(--accent); color: #fff;
    font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover, .button:hover, input[type=submit]:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--accent); border-color: var(--line); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); border-color: #c5d6ee; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 50px; font-size: 16px; }

/* Inputs */
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], select, textarea {
    width: 100%; min-height: 42px; padding: 8px 12px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 95, 174, .15); }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-stock { background: var(--ok-soft); color: var(--ok); }
.badge-order { background: var(--warn-soft); color: var(--warn); }
.badge-plain::before { display: none; }

/* Tables */
.table { width: 100%; font-size: 14.5px; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.table th { color: var(--ink-3); font-weight: 500; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Joomla system messages */
#system-message-container { margin-bottom: 16px; }
#system-message-container .alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--accent-soft); border: 1px solid #c5d6ee; margin-bottom: 8px;
}
#system-message-container .alert-error, #system-message-container .alert-danger { background: #fdecea; border-color: #f5c2bd; }
#system-message-container .alert-warning { background: var(--warn-soft); border-color: #f3d3a6; }
#system-message-container .close { float: right; background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-3); }
#system-message-container .alert-heading { font-size: 15px; margin: 0 0 4px; }

/* Articles (com_content: «Доставка», «Контакты») */
.item-page, .page-text {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px 32px; box-shadow: var(--shadow);
}
.item-page .page-header h2, .item-page h1 { font-size: 26px; }
.item-page .article-info, .item-page .icons, .item-page .pager { display: none; }
.item-page h2, .item-page h3 { margin-top: 1.2em; }
.item-page table td, .item-page table th { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: left; }

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    h1 { font-size: 22px; }
    h2 { font-size: 19px; }
    .item-page, .page-text { padding: 18px 16px; }
}
