:root {
    --black: #050505;
    --black-soft: #111111;
    --white: #fff;
    --paper: #f4f3f0;
    --grey: #9b9b9b;
    --grey-dark: #666;
    --line: rgba(255, 255, 255, .16);
    --line-dark: rgba(0, 0, 0, .15);
    --serif: "DM Serif Display", Georgia, serif;
    --sans: "Manrope", Arial, sans-serif;
    --page: 1360px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    background: var(--black);
    color: var(--white);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    color: inherit;
}

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

.shell {
    width: min(calc(100% - 64px), var(--page));
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: grid;
    min-height: 88px;
    align-items: center;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
}

.logo,
.header-step,
.header-link {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .17em;
    text-decoration: none;
    text-transform: uppercase;
}

.logo {
    font-size: 1rem;
    letter-spacing: .28em;
}

.header-step {
    color: var(--grey);
}

.header-link {
    justify-self: end;
    padding-bottom: .2rem;
    border-bottom: 1px solid currentColor;
}

.shop-main {
    padding: clamp(5rem, 9vw, 9rem) 0;
}

.page-heading {
    display: grid;
    align-items: end;
    grid-template-columns: 1fr minmax(240px, 420px);
    gap: 4rem;
    margin-bottom: clamp(4rem, 8vw, 7rem);
}

.eyebrow,
.group-label,
.product-kicker,
.condition-label {
    display: block;
    color: var(--grey);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.page-heading h1,
.empty-state h1 {
    margin: .7rem 0 0;
    font-family: var(--serif);
    font-size: clamp(4rem, 9vw, 8rem);
    font-weight: 400;
    letter-spacing: -.045em;
    line-height: .9;
}

.page-intro {
    margin: 0;
    color: var(--grey);
    font-size: .92rem;
}

.cart-layout,
.checkout-layout {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
    gap: clamp(3rem, 7vw, 8rem);
}

.cart-items,
.checkout-items {
    border-top: 1px solid var(--line);
}

.cart-item,
.checkout-item {
    display: grid;
    align-items: center;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 1.6rem;
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--line);
}

.cart-image,
.checkout-image {
    width: 120px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--black-soft);
    filter: saturate(.78);
}

.cart-item h2,
.checkout-item h3 {
    margin: .35rem 0 .55rem;
    font-family: var(--serif);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 400;
    line-height: 1.08;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    margin: 0;
    color: var(--grey);
    font-size: .72rem;
}

.condition {
    color: var(--white);
}

.condition-note {
    max-width: 44rem;
    margin: .55rem 0 0;
    color: var(--grey);
    font-size: .75rem;
}

.item-actions {
    display: grid;
    justify-items: end;
    gap: .8rem;
}

.quantity {
    min-width: 74px;
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--white);
}

.remove-button,
.text-button {
    padding: 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
    color: var(--grey);
    cursor: pointer;
    font-size: .62rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.summary {
    position: sticky;
    top: 2rem;
    padding: 2rem;
    background: var(--paper);
    color: var(--black);
}

.summary h2,
.form-panel h2 {
    margin: 0 0 2rem;
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 400;
}

.summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--line-dark);
    font-size: .78rem;
}

.summary-row--total {
    padding: 1.5rem 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1.4rem;
    padding: .9rem 1.4rem;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    cursor: pointer;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-decoration: none;
    text-transform: uppercase;
}

.button--outline {
    border-color: var(--line);
    background: transparent;
}

.cart-update {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.3rem;
}

.empty-state {
    display: grid;
    min-height: calc(100vh - 89px);
    place-items: center;
    padding: 5rem 2rem;
    text-align: center;
}

.empty-state p {
    max-width: 430px;
    margin: 1.5rem auto 0;
    color: var(--grey);
}

.validation-list {
    max-width: 580px;
    margin: 1.8rem auto 0;
}

.validation-list p {
    margin: .55rem 0;
    color: var(--white);
}

.empty-state .button {
    width: auto;
}

.form-panel {
    padding: clamp(2rem, 4vw, 3.6rem);
    background: var(--paper);
    color: var(--black);
}

.form-section + .form-section {
    margin-top: 2.8rem;
    padding-top: 2.8rem;
    border-top: 1px solid var(--line-dark);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.field {
    display: grid;
    gap: .45rem;
}

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

.field label,
.field-label {
    color: var(--grey-dark);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.control {
    width: 100%;
    min-height: 50px;
    padding: .75rem 0;
    border: 0;
    border-bottom: 1px solid var(--line-dark);
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--black);
}

textarea.control {
    min-height: 95px;
    resize: vertical;
}

.control:focus {
    border-color: var(--black);
}

.choice-grid {
    display: grid;
    gap: .8rem;
    margin-top: 1rem;
}

.choice {
    position: relative;
    display: grid;
    align-items: center;
    grid-template-columns: 18px 1fr auto;
    gap: .9rem;
    padding: 1rem;
    border: 1px solid var(--line-dark);
    cursor: pointer;
}

.choice:has(input:checked) {
    border-color: var(--black);
    background: var(--white);
}

.choice input {
    accent-color: var(--black);
}

.choice-name {
    font-size: .78rem;
    font-weight: 600;
}

.choice-note {
    display: block;
    margin-top: .15rem;
    color: var(--grey-dark);
    font-size: .68rem;
    font-weight: 400;
}

.choice-price {
    font-size: .75rem;
    font-weight: 600;
}

.delivery-panel {
    display: none;
    margin-top: 1.3rem;
    padding: 1.4rem;
    border: 1px solid var(--line-dark);
}

.delivery-panel.is-active {
    display: block;
}

.delivery-help {
    margin: 0 0 1.2rem;
    color: var(--grey-dark);
    font-size: .74rem;
}

.terms {
    display: grid;
    align-items: start;
    grid-template-columns: 18px 1fr;
    gap: .7rem;
    margin-top: 1.6rem;
    color: var(--grey-dark);
    font-size: .7rem;
}

.terms input {
    margin-top: .25rem;
    accent-color: var(--black);
}

.terms a {
    color: var(--black);
}

.checkout-summary {
    padding-top: .4rem;
}

.checkout-item {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 1rem;
}

.checkout-image {
    width: 72px;
}

.checkout-item h3 {
    margin: .2rem 0;
    font-size: 1.25rem;
}

.checkout-price {
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 600;
}

.checkout-total {
    margin-top: 1.5rem;
}

.secure-note {
    margin: .8rem 0 0;
    color: var(--grey-dark);
    font-size: .68rem;
    text-align: center;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .page-heading,
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .summary {
        position: static;
    }
}

@media (max-width: 620px) {
    .shell {
        width: min(calc(100% - 32px), var(--page));
    }

    .header-inner {
        min-height: 72px;
        grid-template-columns: 1fr auto;
    }

    .header-step {
        display: none;
    }

    .page-heading {
        gap: 2rem;
    }

    .cart-item {
        align-items: start;
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .cart-image {
        width: 84px;
    }

    .item-actions {
        grid-column: 2;
        justify-items: start;
    }

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

    .field--wide {
        grid-column: auto;
    }

    .choice {
        grid-template-columns: 18px 1fr;
    }

    .choice-price {
        grid-column: 2;
    }
}
