:root {
    --ink: #16161d;
    --muted: #6f717b;
    --line: #dedfe5;
    --paper: #f7f7f9;
    --panel: #ffffff;
    --signal: #bf1d3a;
    --signal-dark: #92152c;
    --teal: #127c84;
    --gold: #c8a44d;
    --shadow: 0 20px 50px rgba(22, 22, 29, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body {
    min-height: 100%;
    margin: 0;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(120deg, rgba(191, 29, 58, 0.08), transparent 36%),
        linear-gradient(240deg, rgba(18, 124, 132, 0.10), transparent 34%),
        var(--paper);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
textarea {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(22, 22, 29, 0.08);
    background: rgba(247, 247, 249, 0.92);
    backdrop-filter: blur(18px);
}

.topbar__inner,
.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 20px;
}

.brand {
    display: grid;
    gap: 2px;
}

.brand__mark {
    font-size: 1.05rem;
    font-weight: 800;
}

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

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

.nav__link,
.cart-pill,
.button,
.icon-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav__link {
    padding: 0 14px;
    color: var(--muted);
    font-weight: 700;
}

.nav__link:hover {
    color: var(--ink);
    background: rgba(22, 22, 29, 0.05);
}

.cart-pill {
    gap: 8px;
    padding: 0 15px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}

.cart-pill__count {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--signal);
    font-size: 0.78rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: stretch;
    gap: 28px;
    padding: 32px 0 22px;
}

.hero__copy {
    display: grid;
    align-content: center;
    gap: 20px;
    min-height: 330px;
}

.eyebrow {
    width: fit-content;
    border: 1px solid rgba(22, 22, 29, 0.12);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--teal);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero h1,
.section-title,
.page-title {
    margin: 0;
    color: var(--ink);
    line-height: 1.02;
}

.hero h1 {
    max-width: 720px;
    font-size: 4.6rem;
}

.hero p {
    max-width: 660px;
    margin: 0;
    color: #4f515c;
    font-size: 1.04rem;
    line-height: 1.8;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__visual {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    border: 1px solid rgba(22, 22, 29, 0.10);
    border-radius: 8px;
    background: #111217;
    box-shadow: var(--shadow);
}

.hero__visual img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
    opacity: 0.82;
}

.hero__visual::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(12, 12, 16, 0.72), rgba(12, 12, 16, 0.04) 60%);
}

.hero__stat {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    display: grid;
    gap: 3px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    backdrop-filter: blur(14px);
}

.hero__stat strong {
    font-size: 1.65rem;
}

.hero__stat span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
}

.button {
    gap: 9px;
    padding: 0 18px;
    border-color: rgba(22, 22, 29, 0.12);
    background: #fff;
    color: var(--ink);
    font-weight: 800;
}

.button:hover,
.icon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(22, 22, 29, 0.22);
}

.button--primary {
    border-color: var(--signal);
    background: var(--signal);
    color: #fff;
}

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

.button--ghost {
    background: transparent;
}

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

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 28px 0 18px;
}

.section-title,
.page-title {
    font-size: 2.55rem;
}

.section-kicker {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.product-card {
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(22, 22, 29, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 32px rgba(22, 22, 29, 0.08);
}

.product-card__media {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #202026;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 280ms ease;
}

.product-card:hover .product-card__media img {
    transform: scale(1.04);
}

.badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--signal);
    font-size: 0.76rem;
    font-weight: 900;
}

.product-card__body {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.product-card__title-row,
.cart-line__top,
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

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

.price {
    color: var(--signal);
    font-weight: 900;
    white-space: nowrap;
}

.muted {
    color: var(--muted);
}

.product-card p,
.product-detail p {
    margin: 0;
    color: #5c5e68;
    line-height: 1.65;
}

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

.specs li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(22, 22, 29, 0.08);
    padding-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

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

.card-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.inline-form {
    display: inline;
}

.quantity {
    display: grid;
    grid-template-columns: 42px 54px 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.quantity button {
    border: 0;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 900;
}

.quantity input {
    width: 100%;
    border: 0;
    border-inline: 1px solid var(--line);
    text-align: center;
    font-weight: 800;
}

.page {
    padding: 42px 0 56px;
}

.page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
    gap: 26px;
    align-items: start;
}

.product-detail__media {
    overflow: hidden;
    border-radius: 8px;
    background: #1c1d22;
    box-shadow: var(--shadow);
}

.product-detail__media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-detail__panel,
.cart-panel,
.checkout-panel,
.success-panel,
.empty-state {
    border: 1px solid rgba(22, 22, 29, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 32px rgba(22, 22, 29, 0.08);
}

.product-detail__panel {
    display: grid;
    gap: 18px;
    padding: 26px;
}

.detail-price {
    color: var(--signal);
    font-size: 2rem;
    font-weight: 900;
}

.purchase-row {
    display: grid;
    grid-template-columns: auto minmax(160px, 1fr);
    gap: 12px;
}

.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.cart-panel,
.checkout-panel,
.success-panel,
.empty-state {
    padding: 22px;
}

.cart-lines {
    display: grid;
    gap: 14px;
}

.cart-line {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    border-bottom: 1px solid rgba(22, 22, 29, 0.08);
    padding-bottom: 14px;
}

.cart-line:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.cart-line img {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-line__body {
    display: grid;
    gap: 12px;
}

.cart-line__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--muted);
    font-size: 0.88rem;
}

.cart-line__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cart-line__quantity-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.summary {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 14px;
    border: 1px solid rgba(22, 22, 29, 0.10);
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    padding: 22px;
    box-shadow: var(--shadow);
}

.summary h2 {
    margin: 0;
}

.summary-row {
    color: rgba(255, 255, 255, 0.72);
}

.summary-total {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 14px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
}

.summary .button {
    border-color: #fff;
}

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

.field {
    display: grid;
    gap: 7px;
}

.field--full {
    grid-column: 1 / -1;
}

.field label {
    color: #343640;
    font-size: 0.88rem;
    font-weight: 800;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 12px 13px;
    outline: none;
}

.field textarea {
    min-height: 118px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(18, 124, 132, 0.14);
}

.errors {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
    border: 1px solid rgba(191, 29, 58, 0.22);
    border-radius: 8px;
    background: rgba(191, 29, 58, 0.08);
    color: var(--signal-dark);
    padding: 14px 16px;
}

.success-panel {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.success-panel h1 {
    margin: 0 0 10px;
}

.order-number {
    display: inline-flex;
    margin: 18px 0;
    border: 1px solid rgba(22, 22, 29, 0.12);
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
    font-weight: 900;
}

.install-panel {
    max-width: 860px;
}

.install-note {
    margin: 16px 0 0;
}

.install-success {
    margin: 0 0 22px;
    text-align: left;
}

.token-box {
    overflow-wrap: anywhere;
    border: 1px solid rgba(22, 22, 29, 0.12);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 14px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-weight: 800;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 260px;
    text-align: center;
}

.footer {
    border-top: 1px solid rgba(22, 22, 29, 0.08);
    padding: 26px 0;
    color: var(--muted);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 960px) {
    .hero,
    .product-detail,
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .hero__copy,
    .hero__visual,
    .hero__visual img {
        min-height: 300px;
    }

    .hero h1 {
        font-size: 3.65rem;
    }

    .section-title,
    .page-title {
        font-size: 2.2rem;
    }

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

    .summary {
        position: static;
    }
}

@media (max-width: 680px) {
    .topbar__inner {
        align-items: start;
        flex-direction: column;
        padding: 14px 0;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        padding-top: 26px;
    }

    .hero__copy,
    .hero__visual,
    .hero__visual img {
        min-height: auto;
    }

    .hero h1 {
        font-size: 2.65rem;
    }

    .section-title,
    .page-title {
        font-size: 2rem;
    }

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

    .section-head,
    .page-head,
    .footer__inner {
        align-items: start;
        flex-direction: column;
    }

    .cart-line {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .cart-line img {
        width: 86px;
        height: 86px;
    }

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