:root {
    --ink: #151618;
    --muted: #62666d;
    --line: #dde1e7;
    --panel: #ffffff;
    --page: #f4f6f8;
    --coal: #202329;
    --green: #00b67a;
    --green-dark: #079363;
    --coral: #ff6b55;
    --amber: #f8b84e;
    --focus: #3a76f0;
    --shadow: 0 18px 45px rgba(22, 25, 30, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    gap: 22px;
    align-items: center;
    min-height: 72px;
    padding: 12px clamp(16px, 4vw, 46px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(221, 225, 231, 0.92);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.18rem;
    font-weight: 800;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: var(--coal);
    border: 3px solid var(--green);
    border-radius: 8px;
}

.search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: min(780px, 100%);
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.search:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(58, 118, 240, 0.12);
}

.search input {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
}

.search button,
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    color: #fff;
    background: var(--green);
    border: 0;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 800;
}

.search button {
    height: 46px;
    border-radius: 0;
}

.search button:hover,
.primary-link:hover {
    background: var(--green-dark);
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    white-space: nowrap;
}

.top-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

.top-nav a:hover {
    color: var(--ink);
}

.live-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    color: #0b4e37;
    background: #dff8ee;
    border: 1px solid #ade7d1;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    gap: clamp(22px, 4vw, 46px);
    min-height: min(680px, calc(100vh - 72px));
    padding: clamp(34px, 6vw, 76px) clamp(16px, 4vw, 46px);
    color: #fff;
    background-color: #191b20;
    background-image:
        linear-gradient(90deg, rgba(12, 13, 16, 0.9), rgba(12, 13, 16, 0.58), rgba(12, 13, 16, 0.84)),
        var(--hero-image, none);
    background-size: cover;
    background-position: center;
}

.hero__shade {
    position: absolute;
    inset: auto 0 0;
    height: 26%;
    background: linear-gradient(0deg, var(--page), rgba(244, 246, 248, 0));
    pointer-events: none;
}

.hero__content,
.hero__strip {
    position: relative;
    z-index: 1;
}

.hero__content {
    align-self: center;
    max-width: 790px;
}

.hero__kicker,
.eyebrow {
    color: var(--amber);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 11ch;
    margin: 12px 0 16px;
    font-size: 5rem;
    line-height: 0.96;
    letter-spacing: 0;
}

.hero p {
    max-width: 630px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.04rem;
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 26px;
}

.hero__actions span {
    min-height: 42px;
    padding: 10px 14px;
    color: #191b20;
    background: #fff;
    border-radius: 7px;
    font-weight: 900;
}

.hero__strip {
    align-self: end;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-tile {
    position: relative;
    min-height: 176px;
    padding: 0;
    overflow: hidden;
    color: #fff;
    background: #2c3038;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.mini-tile img {
    width: 100%;
    height: 100%;
    min-height: 176px;
    object-fit: cover;
    opacity: 0.82;
    transition: transform 180ms ease, opacity 180ms ease;
}

.mini-tile:hover img {
    transform: scale(1.04);
    opacity: 1;
}

.mini-tile span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: block;
    padding: 9px 10px;
    overflow-wrap: anywhere;
    background: rgba(18, 20, 24, 0.78);
    border-radius: 7px;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: left;
}

.toolbar-band {
    padding: 0 clamp(16px, 4vw, 46px);
}

.toolbar {
    display: flex;
    gap: 18px;
    align-items: end;
    justify-content: space-between;
    max-width: 1540px;
    margin: -26px auto 0;
    padding: 24px 0;
}

.toolbar h2 {
    margin: 4px 0 0;
    font-size: 1.8rem;
}

.toolbar .eyebrow {
    color: var(--coral);
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #fff;
    background: var(--coal);
    border-color: var(--coal);
}

.catalog-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    max-width: 1540px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 46px) 56px;
}

.filter-panel {
    align-self: start;
    position: sticky;
    top: 92px;
    display: grid;
    gap: 14px;
}

.filter-group {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.filter-group h3 {
    margin: 0 0 13px;
    font-size: 0.96rem;
}

.filter-group p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.choice {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 34px;
    color: var(--muted);
    font-weight: 700;
}

.choice input {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

select {
    width: 100%;
    height: 42px;
    padding: 0 10px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.catalog-results {
    min-width: 0;
}

.result-state {
    min-height: 28px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.result-state.is-error {
    color: #b53727;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.product-card {
    display: grid;
    grid-template-rows: 270px minmax(210px, auto);
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: #c4cbd6;
    box-shadow: 0 12px 32px rgba(23, 26, 31, 0.12);
}

.product-card__media {
    position: relative;
    width: 100%;
    height: 270px;
    padding: 0;
    overflow: hidden;
    background: #252932;
    border: 0;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-weight: 900;
}

.product-card__media img + .product-card__fallback {
    display: none;
}

.product-card__body {
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 10px;
    padding: 14px;
}

.product-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 25px;
}

.product-card__meta span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 25px;
    padding: 0 8px;
    overflow: hidden;
    color: #305246;
    background: #e4f6ee;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card h3 {
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.35;
}

.product-card p {
    min-height: 42px;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.product-card__footer {
    align-self: end;
    display: flex;
    gap: 10px;
    align-items: end;
    justify-content: space-between;
}

.price {
    display: block;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.stock {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.icon-button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    color: #fff;
    background: var(--coal);
    border: 0;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 800;
}

.icon-button:hover {
    background: var(--green);
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 14, 18, 0.72);
}

.modal__panel {
    position: relative;
    width: min(1050px, 100%);
    max-height: min(860px, calc(100vh - 36px));
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.modal__close {
    position: sticky;
    top: 14px;
    left: calc(100% - 56px);
    z-index: 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 14px 14px -56px auto;
    color: #fff;
    background: rgba(20, 22, 26, 0.86);
    border: 0;
    border-radius: 8px;
    font-weight: 900;
}

.modal__body {
    min-height: 380px;
}

.modal-loading {
    display: grid;
    place-items: center;
    min-height: 380px;
    color: var(--muted);
    font-weight: 800;
}

.detail {
    display: grid;
    grid-template-columns: minmax(240px, 370px) minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
}

.detail__art {
    display: grid;
    gap: 12px;
    align-content: start;
}

.detail__cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #252932;
    border-radius: 8px;
}

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

.detail__shots img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
}

.detail__content {
    min-width: 0;
}

.detail__content h2 {
    margin: 0 48px 12px 0;
    font-size: 2rem;
    line-height: 1.1;
}

.detail__copy {
    color: var(--muted);
    line-height: 1.65;
}

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

.stat {
    min-height: 78px;
    padding: 12px;
    background: #f6f8fa;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.stat strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.offer-table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.offer-table th,
.offer-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.offer-table th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.template-button {
    min-height: 38px;
    padding: 0 12px;
    color: #fff;
    background: var(--coral);
    border: 0;
    border-radius: 7px;
    font-weight: 900;
}

.empty {
    display: grid;
    grid-column: 1 / -1;
    place-items: center;
    min-height: 260px;
    padding: 22px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed #c6ccd5;
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: 1fr;
    }

    .search {
        order: 3;
        width: 100%;
    }

    .top-nav {
        justify-content: space-between;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero h1 {
        max-width: 14ch;
        font-size: 3rem;
    }

    .catalog-shell {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail,
    .detail__stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .site-header {
        gap: 12px;
    }

    .top-nav {
        gap: 10px;
        font-size: 0.92rem;
    }

    .hero {
        padding-top: 30px;
    }

    .hero h1 {
        max-width: 100%;
        font-size: 2.35rem;
    }

    .hero__strip,
    .toolbar,
    .filter-panel,
    .detail,
    .detail__stats {
        grid-template-columns: 1fr;
    }

    .toolbar {
        align-items: start;
    }

    .quick-filters {
        justify-content: flex-start;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 12px;
    }

    .product-card {
        grid-template-rows: 220px minmax(210px, auto);
    }

    .product-card__media {
        height: 220px;
    }

    .detail__content h2 {
        margin-right: 48px;
        font-size: 1.55rem;
    }

    .offer-table,
    .offer-table tbody,
    .offer-table tr,
    .offer-table td {
        display: block;
        width: 100%;
    }

    .offer-table thead {
        display: none;
    }

    .offer-table tr {
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }

    .offer-table td {
        padding: 6px 0;
        border: 0;
    }
}
