:root {
    --ink: #111312;
    --muted: #686d69;
    --paper: #f3f1ec;
    --surface: #ffffff;
    --line: #dcdcd5;
    --acid: #c7f43d;
    --acid-dark: #263105;
    --shadow: 0 18px 55px rgba(17, 19, 18, 0.1);
    --radius-lg: 24px;
    --radius-md: 15px;
    --page: min(1400px, calc(100% - 48px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

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

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

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px max(24px, calc((100vw - 1400px) / 2));
    border-bottom: 1px solid rgba(220, 220, 213, 0.85);
    background: rgba(243, 241, 236, 0.9);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 850;
    letter-spacing: 0.15em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: var(--acid-dark);
    background: var(--acid);
    font-size: 1rem;
    letter-spacing: 0;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 9px;
}

.age-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.75rem;
    font-weight: 750;
}

.age-badge {
    border-color: var(--ink);
    color: var(--surface);
    background: var(--ink);
}

main {
    width: var(--page);
    margin: 0 auto;
}

.hero-banner {
    position: relative;
    min-height: clamp(500px, 55vw, 680px);
    margin: 32px 0 42px;
    overflow: hidden;
    border-radius: 30px;
    color: var(--surface);
    background: #0c0e0d;
    box-shadow: var(--shadow);
}

.hero-image,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
    object-position: center;
}

.hero-shade {
    background: linear-gradient(90deg, rgba(5, 7, 6, 0.94) 0%, rgba(5, 7, 6, 0.76) 36%, rgba(5, 7, 6, 0.12) 68%, rgba(5, 7, 6, 0.05) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(620px, 62%);
    padding: clamp(54px, 8vw, 104px);
}

.hero-content .eyebrow {
    color: var(--acid);
}

.hero-content h1 {
    max-width: 700px;
    margin: 0;
    font-size: clamp(3.6rem, 7.3vw, 7.2rem);
    font-weight: 820;
    letter-spacing: -0.075em;
    line-height: 0.88;
}

.hero-content > p:last-child {
    max-width: 470px;
    margin: 26px 0 0;
    color: #d3d6d3;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.eyebrow,
.product-group,
.section-index {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.source-notice {
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid #e6c5a0;
    border-radius: 12px;
    background: #fff4e5;
    color: #70430d;
    font-size: 0.85rem;
}

.catalog-controls {
    position: sticky;
    z-index: 10;
    top: 72px;
    display: grid;
    grid-template-columns: minmax(240px, 440px) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(243, 241, 236, 0.94);
    backdrop-filter: blur(18px);
}

.search-box {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(199, 244, 61, 0.5);
}

.search-box svg,
.open-product svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.search-box input {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
}

.search-box kbd {
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: var(--paper);
    font-size: 0.68rem;
}

.filter-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    font-size: 0.77rem;
    font-weight: 720;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    border-color: var(--ink);
    color: var(--surface);
    background: var(--ink);
}

.catalog-sections {
    padding: 44px 0 100px;
}

.product-section {
    scroll-margin-top: 160px;
}

.product-section + .product-section {
    margin-top: 90px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.7rem);
    letter-spacing: -0.045em;
}

.section-heading > span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
}

.section-index {
    margin-bottom: 5px;
}

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

.product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(220, 220, 213, 0.9);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 1px 0 rgba(17, 19, 18, 0.04);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #c7c8c0;
    box-shadow: var(--shadow);
}

.product-card[hidden],
.product-section[hidden] {
    display: none;
}

.product-media {
    position: relative;
    display: grid;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 220ms ease;
}

.product-card:hover .product-media img {
    transform: scale(1.035);
}

.image-placeholder {
    display: grid;
    width: 55%;
    aspect-ratio: 1;
    place-items: center;
    border-radius: 50%;
    background: var(--acid);
    font-size: 4rem;
    font-weight: 900;
}

.stock-pill {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #7a261e;
    background: #ffe2df;
    font-size: 0.65rem;
    font-weight: 820;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stock-pill.in-stock {
    color: var(--acid-dark);
    background: var(--acid);
}

.product-content {
    padding: 20px;
}

.product-group {
    margin-bottom: 7px;
    font-size: 0.64rem;
}

.product-card h3 {
    min-height: 2.8em;
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.product-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.product-price {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 820;
}

.variant-count {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.68rem;
}

.open-product {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--acid-dark);
    background: var(--acid);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.open-product:hover,
.open-product:focus-visible {
    transform: rotate(-7deg) scale(1.05);
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.empty-state {
    padding: 100px 20px 140px;
    text-align: center;
}

.empty-state span {
    display: block;
    font-size: 4rem;
}

.empty-state h2 {
    margin: 10px 0 5px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 30px max(24px, calc((100vw - 1400px) / 2));
    color: #afb4b0;
    background: var(--ink);
    font-size: 0.75rem;
}

footer p {
    margin: 0;
}

.detail-main {
    padding-top: 28px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 0 24px;
    color: var(--muted);
    font-size: 0.76rem;
}

.breadcrumbs a {
    color: var(--ink);
    font-weight: 750;
    text-decoration: none;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
    gap: clamp(32px, 6vw, 88px);
    align-items: start;
}

.detail-gallery {
    position: sticky;
    top: 98px;
}

.detail-gallery img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.detail-info {
    padding: clamp(28px, 5vw, 64px) 0 80px;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(2.8rem, 5.5vw, 5.4rem);
    letter-spacing: -0.065em;
    line-height: 0.95;
}

.detail-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 32px 0 38px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.detail-price {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 850;
}

.detail-stock {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--acid-dark);
    background: var(--acid);
    font-size: 0.7rem;
    font-weight: 820;
}

.variant-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 13px;
}

.variant-heading h2,
.variant-heading h3 {
    margin: 0;
    font-size: 0.9rem;
}

.variant-heading span {
    color: var(--muted);
    font-size: 0.7rem;
}

.variant-list {
    display: grid;
    gap: 8px;
}

.variant-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafaf7;
    text-align: left;
    cursor: pointer;
}

.variant-option:hover,
.variant-option.is-selected {
    border-color: var(--ink);
    box-shadow: inset 4px 0 0 var(--acid);
}

.variant-name {
    overflow-wrap: anywhere;
    font-size: 0.78rem;
    font-weight: 670;
}

.variant-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 800;
}

.variant-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #66a600;
}

.back-link {
    display: inline-flex;
    margin-top: 28px;
    padding: 12px 18px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 780;
    text-decoration: none;
}

.back-link:hover {
    color: var(--surface);
    background: var(--ink);
}

.related-section {
    padding: 30px 0 100px;
    border-top: 1px solid var(--line);
}

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

.related-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--ink);
    background: var(--surface);
    text-decoration: none;
}

.related-media {
    display: grid;
    aspect-ratio: 1.25;
    place-items: center;
}

.related-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.related-card > div:last-child {
    padding: 16px;
}

.related-card h3,
.related-card p {
    margin: 0;
}

.related-card h3 {
    min-height: 2.7em;
    font-size: 0.86rem;
}

.related-card p {
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 820;
}

.error-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.not-found {
    text-align: center;
}

.not-found h1 {
    margin: 0;
    font-size: clamp(2.5rem, 8vw, 6rem);
    letter-spacing: -0.06em;
}

@media (max-width: 1100px) {
    .product-detail {
        grid-template-columns: minmax(0, 0.85fr) minmax(380px, 1.15fr);
        gap: 36px;
    }

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

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

    .filter-row {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 780px) {
    :root {
        --page: min(100% - 28px, 1400px);
    }

    .site-header {
        min-height: 64px;
        padding-inline: 14px;
    }

    .hero-banner {
        min-height: 570px;
        margin-top: 14px;
        border-radius: 22px;
    }

    .hero-image {
        object-position: 60% center;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(5, 7, 6, 0.38) 0%, rgba(5, 7, 6, 0.85) 68%, rgba(5, 7, 6, 0.95) 100%);
    }

    .hero-content {
        width: 100%;
        padding: 44px 28px;
    }

    .hero-content h1 {
        max-width: 360px;
        font-size: clamp(3.4rem, 16vw, 5.7rem);
    }

    .hero-content > p:last-child {
        max-width: 340px;
    }

    .catalog-controls {
        top: 64px;
        grid-template-columns: 1fr;
        gap: 12px;
        padding-block: 12px;
    }

    .filter-row {
        grid-column: 1;
        grid-row: auto;
        margin-right: -14px;
        padding-right: 14px;
    }

    .search-box kbd {
        display: none;
    }

    .catalog-sections {
        padding-top: 34px;
    }

    .product-section + .product-section {
        margin-top: 64px;
    }

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

    .product-content {
        padding: 14px;
    }

    .product-card h3 {
        min-height: 3.1em;
        font-size: 0.86rem;
    }

    .product-bottom {
        align-items: center;
        margin-top: 16px;
    }

    .product-price {
        font-size: 0.92rem;
    }

    .variant-count {
        font-size: 0.6rem;
    }

    .open-product {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .product-detail {
        display: block;
    }

    .detail-gallery {
        position: relative;
        top: auto;
    }

    .detail-info {
        padding: 42px 0 70px;
    }

    .detail-info h1 {
        font-size: clamp(2.9rem, 13vw, 4.8rem);
    }

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

    footer {
        display: grid;
        padding-inline: 18px;
    }
}

@media (max-width: 430px) {
    .stock-pill {
        top: 9px;
        left: 9px;
        font-size: 0.56rem;
    }

    .hero-banner {
        min-height: 600px;
    }

    .hero-content {
        padding: 34px 20px;
    }

    .variant-option {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .variant-meta {
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto;
        transition-duration: 0.01ms;
    }
}
