:root {
    --ink: #121722;
    --muted: #6d7280;
    --line: #e3e6eb;
    --surface: #f5f6f8;
    --navy: #242424;
    --orange: #ff6200;
    --orange-dark: #e45700;
    --radius: 18px;
    --shadow: 0 22px 60px rgba(11, 19, 36, .16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: Inter, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.is-modal-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

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

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

.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: grid;
    grid-template-columns: 250px minmax(280px, 480px) 1fr;
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
    min-height: 64px;
    padding: 10px max(28px, calc((100vw - 1360px) / 2));
    border-top: 2px solid #1f1f1f;
    border-bottom: 1px solid #e6e6e6;
    color: #202020;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 2px 7px rgba(0, 0, 0, .08);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand picture {
    display: block;
}

.brand img {
    width: 190px;
    height: 48px;
    object-fit: contain;
    object-position: left center;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-search svg {
    position: absolute;
    left: 17px;
    width: 18px;
    fill: none;
    stroke: #80848b;
    stroke-linecap: round;
    stroke-width: 1.8;
    pointer-events: none;
}

.header-search input {
    width: 100%;
    height: 40px;
    padding: 0 18px 0 46px;
    border: 1px solid #cfd1d4;
    border-radius: 999px;
    outline: none;
    color: var(--ink);
    background: #fff;
}

.header-search input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 98, 0, .1);
}

.header-search input::placeholder {
    color: #7d8188;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(28px, 5vw, 86px);
}

.account-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #171717;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.account-link svg,
.cart-button svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.account-link span {
    display: grid;
}

.account-link strong {
    font-size: 13px;
}

.cart-button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    color: #1e1e1e;
    background: transparent;
    cursor: pointer;
}

.cart-button:hover,
.account-link:hover {
    color: var(--orange);
}

.catalog,
.product-page,
.not-found {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.catalog {
    padding: 72px 0 110px;
}

.catalog__intro {
    max-width: 720px;
    margin-bottom: 42px;
}

.catalog__intro h1,
.not-found h1 {
    margin: 8px 0 14px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: .96;
    letter-spacing: -.06em;
}

.catalog__intro > p:last-child,
.not-found > p {
    color: var(--muted);
    font-size: 18px;
}

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

.product-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: inherit;
    background: #fff;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

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

.product-card > img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--surface);
}

.product-card__body {
    padding: 17px;
}

.product-card__body > span {
    color: var(--orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.product-card h2 {
    min-height: 48px;
    margin: 7px 0 14px;
    font-size: 17px;
    line-height: 1.35;
}

.product-card del {
    margin-right: 8px;
    color: #9297a1;
    font-size: 12px;
}

.product-card strong {
    font-size: 20px;
}

.product-page {
    padding: 24px 0 150px;
}

.product-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-nav::-webkit-scrollbar {
    display: none;
}

.product-nav a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #4e5562;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.product-nav a:hover,
.product-nav a.is-active {
    border-color: var(--orange);
    color: #fff;
    background: var(--orange);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.07fr) minmax(380px, .93fr);
    gap: clamp(40px, 7vw, 90px);
    align-items: start;
}

.gallery {
    position: sticky;
    top: 96px;
}

.gallery__stage {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #f0f1f3;
    box-shadow: inset 0 0 0 1px rgba(18, 23, 34, .05);
}

.gallery__image {
    display: none;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.gallery__image.is-active {
    display: block;
    animation: image-in .25s ease;
}

@keyframes image-in {
    from { opacity: .3; transform: scale(.985); }
}

.gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.gallery__thumbs button {
    width: 72px;
    height: 72px;
    padding: 3px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
}

.gallery__thumbs button.is-active {
    border-color: var(--orange);
}

.gallery__thumbs img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.product-info {
    padding-top: clamp(10px, 4vw, 60px);
}

.eyebrow {
    margin: 0;
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

.product-info h1 {
    margin: 12px 0 16px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1;
    letter-spacing: -.055em;
}

.product-info__subtitle {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555d69;
    font-size: 13px;
    font-weight: 700;
}

.rating span {
    color: #ffad0d;
    letter-spacing: 2px;
}

.rating small {
    color: #9398a2;
    font-weight: 500;
}

.price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
}

.price del {
    width: 100%;
    color: #9297a1;
    font-size: 15px;
}

.price strong {
    font-size: clamp(38px, 5vw, 54px);
    line-height: 1;
    letter-spacing: -.05em;
}

.price span {
    padding: 7px 10px;
    border-radius: 7px;
    color: #fff;
    background: var(--orange);
    font-size: 11px;
    font-weight: 900;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.feature-list li {
    position: relative;
    padding: 13px 12px 13px 39px;
    border-radius: 12px;
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
}

.feature-list li::before {
    position: absolute;
    top: 12px;
    left: 13px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #16a34a;
    content: "✓";
    font-size: 11px;
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    color: #fff;
    background: var(--orange);
    box-shadow: 0 10px 24px rgba(255, 90, 0, .24);
}

.button--primary:hover {
    background: var(--orange-dark);
}

.button--wide {
    width: 100%;
}

.purchase-note {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 70px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--line);
}

.trust-strip article {
    display: grid;
    gap: 5px;
    padding: 26px;
    background: var(--surface);
    text-align: center;
}

.trust-strip span {
    color: var(--muted);
    font-size: 12px;
}

.sticky-order {
    position: fixed;
    z-index: 30;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: flex;
    width: min(760px, calc(100% - 36px));
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-inline: auto;
    padding: 12px 14px 12px 22px;
    border: 1px solid #e4e4e4;
    border-radius: 20px;
    color: var(--ink);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
    backdrop-filter: blur(16px);
}

.sticky-order > div {
    display: grid;
    gap: 2px;
}

.sticky-order strong {
    font-size: 20px;
}

.sticky-order span {
    color: var(--muted);
    font-size: 11px;
}

.modal[hidden] {
    display: none;
}

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

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 9, 16, .72);
}

.modal__panel {
    position: relative;
    z-index: 1;
    width: min(580px, 100%);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    animation: modal-in .22s ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
}

.modal__header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 17px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
}

.modal__header h2 {
    margin: 0 0 5px;
    font-size: 24px;
    letter-spacing: -.04em;
}

.modal__header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.modal__close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--surface);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.order-form {
    padding: 20px 22px 24px;
}

.order-product {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 2px solid var(--orange);
    border-radius: 12px;
    background: #fff8f3;
}

.order-product > img {
    width: 88px;
    height: 72px;
    border-radius: 8px;
    background: #fff;
    object-fit: cover;
}

.order-product__name {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.order-product__name span {
    color: var(--muted);
    font-size: 11px;
}

.order-product__name strong {
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.order-product__name b {
    color: var(--orange);
    font-size: 16px;
}

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

.quantity button {
    width: 38px;
    height: 38px;
    border: 1px solid #dfe2e7;
    border-radius: 50%;
    color: var(--orange);
    background: #fff;
    font-size: 22px;
    cursor: pointer;
}

.quantity output {
    min-width: 16px;
    color: #555d69;
    text-align: center;
}

.summary {
    display: grid;
    gap: 12px;
    margin: 14px 0 18px;
    padding: 16px;
    border-radius: 12px;
    background: var(--surface);
    color: #555d69;
    font-size: 13px;
}

.summary > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.summary__total {
    padding-top: 12px;
    border-top: 1px solid #d6d9df;
    color: var(--ink);
    font-size: 17px;
}

.confirmation-method {
    margin: 0;
    padding: 0;
    border: 0;
}

.confirmation-method legend {
    margin-bottom: 9px;
    font-size: 17px;
    font-weight: 800;
}

.confirmation-method label {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d2d5da;
    cursor: pointer;
}

.confirmation-method label:first-of-type {
    border-radius: 9px 9px 0 0;
}

.confirmation-method label:last-of-type {
    margin-top: -1px;
    border-radius: 0 0 9px 9px;
}

.confirmation-method label:has(input:checked) {
    position: relative;
    z-index: 1;
    border-color: #f3b48f;
    background: #fff5ed;
}

.confirmation-method input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--orange);
}

.confirmation-method label span {
    display: grid;
    gap: 3px;
}

.confirmation-method strong {
    font-size: 13px;
}

.confirmation-method small {
    color: #8a8f98;
    font-size: 11px;
    line-height: 1.4;
}

.advance-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #f3b48f;
    border-radius: 9px;
    background: #fff5ed;
}

.advance-notice > span {
    display: grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--orange);
    font-size: 13px;
    font-weight: 900;
}

.advance-notice div {
    display: grid;
    gap: 5px;
}

.advance-notice strong {
    font-size: 13px;
}

.advance-notice small {
    color: #7c818a;
    font-size: 11px;
    line-height: 1.5;
}

.order-form h3 {
    margin: 22px 0 15px;
    font-size: 18px;
    text-align: center;
}

.field,
.field-row {
    margin-bottom: 13px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-row .field {
    margin-bottom: 0;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
}

.field input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #cfd3d9;
    border-radius: 8px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
}

.field input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, .12);
}

.field__control {
    position: relative;
}

.form-message {
    min-height: 18px;
    margin: 4px 0 8px;
    color: #b91c1c;
    font-size: 12px;
    text-align: center;
}

.not-found {
    display: grid;
    min-height: calc(100vh - 70px);
    place-content: center;
    justify-items: start;
    padding: 50px 0;
}

@media (max-width: 940px) {
    .topbar {
        grid-template-columns: 190px minmax(240px, 1fr) auto;
        gap: 20px;
    }

    .brand {
        width: 155px;
    }

    .header-actions {
        gap: 12px;
    }

    .account-link span {
        display: none;
    }

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

    .hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .gallery {
        position: static;
    }

    .product-info {
        padding-top: 0;
    }
}

@media (max-width: 620px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        min-height: 62px;
        padding: 9px 12px;
    }

    .brand {
        width: 42px;
    }

    .brand img {
        width: 42px;
        height: 42px;
    }

    .header-search input {
        height: 38px;
        padding-right: 10px;
        padding-left: 36px;
        font-size: 12px;
    }

    .header-search svg {
        left: 12px;
        width: 16px;
    }

    .header-actions {
        gap: 0;
    }

    .account-link {
        display: none;
    }

    .cart-button {
        width: 34px;
        height: 38px;
    }

    .cart-button svg {
        width: 21px;
    }

    .catalog,
    .product-page,
    .not-found {
        width: min(100% - 28px, 1180px);
    }

    .catalog {
        padding-top: 42px;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
    }

    .product-card__body {
        padding: 12px;
    }

    .product-card h2 {
        min-height: 55px;
        font-size: 14px;
    }

    .product-card del {
        display: none;
    }

    .product-card strong {
        font-size: 17px;
    }

    .product-page {
        padding-top: 15px;
    }

    .product-nav {
        margin-right: -14px;
        margin-left: -14px;
        padding-inline: 14px;
    }

    .gallery__stage {
        margin-inline: -14px;
        border-radius: 0;
    }

    .gallery__thumbs button {
        width: 62px;
        height: 62px;
    }

    .product-info h1 {
        font-size: 38px;
    }

    .feature-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .trust-strip {
        grid-template-columns: 1fr;
        margin-top: 45px;
    }

    .sticky-order {
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: calc(100% - 16px);
        padding: 9px 9px 9px 15px;
        border-radius: 16px;
    }

    .sticky-order .button {
        min-height: 46px;
        padding-inline: 18px;
        font-size: 13px;
    }

    .modal {
        padding: 0;
        place-items: end center;
    }

    .modal__panel {
        width: 100%;
        max-height: 96dvh;
        border-radius: 18px 18px 0 0;
    }

    .modal__header,
    .order-form {
        padding-right: 16px;
        padding-left: 16px;
    }

    .order-product {
        grid-template-columns: 64px 1fr;
    }

    .order-product > img {
        width: 64px;
        height: 64px;
    }

    .quantity {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-top: -3px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
