:root {
    --ink: #162016;
    --muted: #617065;
    --field: #2f5d45;
    --field-dark: #193628;
    --harvest: #f2c14e;
    --sky: #dcecf2;
    --paper: #fbfaf5;
    --panel: #ffffff;
    --line: #d8dfd5;
    --danger: #a33d2f;
    --success: #2d7150;
    --shadow: 0 18px 55px rgba(22, 32, 22, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 58px);
    background: rgba(251, 250, 245, 0.94);
    border-bottom: 1px solid rgba(216, 223, 213, 0.8);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--field-dark);
    background: var(--harvest);
    border: 2px solid var(--field-dark);
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a {
    padding: 9px 13px;
    color: var(--field-dark);
    text-decoration: none;
    font-weight: 700;
}

.nav a:hover,
.text-link:hover {
    color: var(--success);
}

.hero {
    position: relative;
    min-height: 78vh;
    display: grid;
    align-items: end;
    padding: clamp(48px, 8vw, 98px) clamp(18px, 5vw, 72px);
    overflow: hidden;
    background: var(--field-dark);
}

.hero-media {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
}

.hero-media::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(14, 31, 22, 0.86) 0%, rgba(14, 31, 22, 0.56) 48%, rgba(14, 31, 22, 0.18) 100%);
}

.hero-copy {
    position: relative;
    max-width: 760px;
    color: #fff;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--harvest);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.product-info h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5.8rem);
    line-height: 0.98;
}

.hero p {
    max-width: 650px;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.hero-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.button,
button.button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 17px;
    border: 2px solid var(--field-dark);
    color: var(--field-dark);
    background: #fff;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.button.primary {
    color: var(--field-dark);
    background: var(--harvest);
}

.button.light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.12);
}

.button.small {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.section {
    padding: clamp(42px, 7vw, 88px) clamp(18px, 5vw, 72px);
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: var(--sky);
}

.intro-strip h2,
.section-heading h2,
.service-panel h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
}

.intro-strip p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.text-link {
    color: var(--field-dark);
    font-weight: 800;
    white-space: nowrap;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 28px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.category-card {
    min-height: 186px;
    padding: 22px;
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--line);
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(22, 32, 22, 0.05);
}

.category-card span {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
}

.category-card p {
    margin: 14px 0 0;
    color: var(--muted);
}

.category-card:hover {
    border-color: var(--field);
    transform: translateY(-2px);
}

.stock-band {
    background: #eff2e9;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-grid.listing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(22, 32, 22, 0.08);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e7ece5;
}

.product-card-body {
    padding: 18px;
}

.tag {
    margin: 0 0 8px;
    color: var(--field);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.product-card h3 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
}

.product-card h3 a {
    text-decoration: none;
}

.part-number {
    margin: 10px 0 0;
    color: var(--field-dark);
    font-weight: 900;
}

.part-number.small {
    margin: 8px 0 0;
    color: var(--field);
    font-size: 0.86rem;
}

.product-card p {
    color: var(--muted);
}

.product-card .part-number {
    color: var(--field);
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}

.card-meta strong {
    color: var(--ink);
}

.service-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 40px;
    color: #fff;
    background: var(--field-dark);
}

.service-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-list li {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.service-list span {
    color: rgba(255, 255, 255, 0.78);
}

.page-hero {
    padding: clamp(52px, 8vw, 92px) clamp(18px, 5vw, 72px);
    color: #fff;
    background: var(--field-dark);
}

.page-hero.compact p:not(.eyebrow) {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.1rem;
}

.two-column {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 28px;
    align-items: start;
}

.filter-panel {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 8px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.filter-panel h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.stock-search {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.stock-search input {
    padding: 10px 11px;
}

.filter-panel a {
    padding: 10px 12px;
    color: var(--muted);
    text-decoration: none;
}

.filter-panel a.active,
.filter-panel a:hover {
    color: var(--field-dark);
    background: var(--sky);
}

.empty-state,
.contact-card,
.form-card {
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
    gap: clamp(28px, 5vw, 68px);
    align-items: start;
}

.product-gallery {
    background: #e8eee5;
    border: 1px solid var(--line);
}

.product-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-info {
    padding-top: 8px;
}

.product-info .lead {
    color: var(--field-dark);
    font-size: 1.25rem;
    font-weight: 700;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 800;
}

.price-box {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0;
    padding: 18px;
    background: var(--sky);
    border-left: 6px solid var(--harvest);
}

.price-box span {
    color: var(--muted);
    font-weight: 800;
}

.price-box strong {
    font-size: 1.5rem;
}

.spec-list {
    display: grid;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.spec-list li {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
}

.detail-actions .button.light {
    color: var(--field-dark);
    border-color: var(--field-dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--field-dark);
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #c9d2c7;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

.form-card,
.edit-form {
    display: grid;
    gap: 16px;
}

.screen-reader {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.notice {
    padding: 12px 14px;
    border-left: 5px solid currentColor;
    font-weight: 700;
}

.notice.success {
    color: var(--success);
    background: #e7f3ec;
}

.notice.error {
    color: var(--danger);
    background: #f9ebe8;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 30px clamp(18px, 5vw, 72px);
    color: #fff;
    background: #101810;
}

.site-footer p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.footer-actions {
    display: grid;
    gap: 6px;
    text-align: right;
}

.footer-actions a {
    color: #fff;
}

.admin-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background: #eef2ea;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px;
    color: #fff;
    background: var(--field-dark);
}

.admin-sidebar nav {
    display: grid;
    gap: 7px;
}

.admin-sidebar nav a,
.ghost-button {
    padding: 11px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-align: left;
    text-decoration: none;
}

.admin-sidebar form {
    margin-top: auto;
}

.ghost-button {
    width: 100%;
}

.admin-brand {
    color: #fff;
}

.admin-brand small {
    color: rgba(255, 255, 255, 0.72);
}

.admin-main {
    padding: 28px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card,
.admin-card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(22, 32, 22, 0.07);
}

.stat-card {
    padding: 20px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 2.6rem;
}

.admin-card {
    padding: 20px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-card-header h2 {
    margin: 0;
}

.admin-table {
    display: grid;
    gap: 8px;
}

.table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(100px, 0.7fr) minmax(90px, 0.4fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: #f8faf6;
    border: 1px solid var(--line);
}

.table-row small {
    display: block;
    color: var(--muted);
}

.product-admin-list .table-row {
    grid-template-columns: 72px minmax(0, 1.4fr) minmax(90px, 0.4fr) minmax(90px, 0.4fr) auto;
}

.user-admin-list .table-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.8fr) minmax(150px, 0.6fr) auto;
}

.product-admin-list img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    background: #e6ece3;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.check-grid {
    grid-template-columns: repeat(2, max-content);
}

.check-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-field input {
    width: auto;
}

.field-note {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
}

.current-image {
    display: grid;
    gap: 10px;
    justify-items: start;
}

.danger-check {
    color: var(--danger);
}

.status-ok,
.status-warning {
    font-weight: 800;
}

.status-ok {
    color: var(--success);
}

.status-warning,
.danger-text {
    color: var(--danger);
}

.inline-form {
    margin: 0;
}

.text-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.form-preview {
    width: 220px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--line);
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--field-dark);
}

.login-card {
    width: min(420px, 100%);
    display: grid;
    gap: 16px;
    padding: 28px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.login-brand {
    margin-bottom: 10px;
}

@media (max-width: 1120px) {
    .product-grid,
    .product-grid.listing {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .site-header,
    .site-footer,
    .intro-strip,
    .service-panel,
    .contact-grid,
    .product-detail,
    .two-column,
    .admin-body {
        grid-template-columns: 1fr;
    }

    .site-header,
    .site-footer,
    .intro-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-actions {
        text-align: left;
    }

    .filter-panel {
        position: static;
    }

    .service-list li,
    .form-grid,
    .stat-grid,
    .table-row,
    .product-admin-list .table-row {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .hero {
        min-height: 72vh;
    }

    .hero-media::after {
        background: rgba(14, 31, 22, 0.7);
    }

    .product-grid,
    .product-grid.listing,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .check-grid {
        grid-template-columns: 1fr;
    }
}
