@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&display=swap");

.customer-page {
    --customer-wine: #771e27;
    --customer-ink: #241b1d;
    --customer-muted: #685b5c;
    --customer-border: #e8dfdc;
    --customer-surface: #fff;
    --customer-tint: #f8efed;
    color: var(--customer-ink);
    background: #fbf8f6;
    min-height: 55vh;
    padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5.5rem);
}

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

.customer-page [hidden] {
    display: none !important;
}

.customer-shell {
    width: min(100% - 2rem, 74rem);
    margin-inline: auto;
}

.customer-breadcrumb {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--customer-muted);
    font-size: .875rem;
}

.customer-breadcrumb a, .customer-link {
    color: var(--customer-wine);
    font-weight: 700;
    text-underline-offset: .22em;
}

.customer-breadcrumb span[aria-hidden] {
    color: #927e7d;
}

.customer-heading {
    margin: clamp(1.55rem, 4vw, 2.8rem) 0 clamp(1.25rem, 3vw, 2.25rem);
}

.customer-heading h1, .customer-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    line-height: 1.15;
    margin: 0;
    overflow-wrap: anywhere;
}

.customer-heading h1 {
    font-size: clamp(2.2rem, 5vw, 3.7rem);
}

.customer-heading p {
    margin: .65rem 0 0;
    color: var(--customer-muted);
    overflow-wrap: anywhere;
}

.customer-title {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.customer-card {
    background: var(--customer-surface);
    border: 1px solid var(--customer-border);
    border-radius: .8rem;
    padding: clamp(1.1rem, 3vw, 2rem);
    min-width: 0;
}

.customer-card-header {
    margin-bottom: 1.35rem;
}

.customer-card-header p, .customer-note {
    line-height: 1.55;
    color: var(--customer-muted);
}

.customer-card-header p {
    margin: .55rem 0 0;
}

.customer-button {
    align-items: center;
    background: var(--customer-wine);
    border: 1px solid var(--customer-wine);
    border-radius: .3rem;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: 700 .92rem/1.3 var(--font-family);
    gap: .5rem;
    justify-content: center;
    min-height: 2.8rem;
    padding: .65rem 1.1rem;
    text-align: center;
    text-decoration: none;
}

.customer-button:hover {
    background: #591520;
    border-color: #591520;
    color: #fff;
}

.customer-button--outline {
    background: transparent;
    color: var(--customer-wine);
}

.customer-button--outline:hover {
    background: var(--customer-tint);
    color: var(--customer-wine);
}

.customer-page :is(a, button, input, textarea):focus-visible {
    outline: 2px solid var(--customer-wine);
    outline-offset: 3px;
}

.customer-button:disabled {
    cursor: wait;
    opacity: .6;
}

.customer-empty {
    padding: clamp(2.1rem, 7vw, 5rem) 1rem;
    text-align: center;
}

.customer-empty p {
    margin: .7rem auto 1.35rem;
    max-width: 34ch;
    line-height: 1.55;
    color: var(--customer-muted);
}

.customer-bubble {
    display: inline-grid;
    width: 3.3rem;
    height: 3.3rem;
    place-items: center;
    margin-bottom: 1rem;
    color: var(--customer-wine);
    background: var(--customer-tint);
    border-radius: 50%;
    font-size: 1.25rem;
}

.customer-notice {
    padding: .8rem 1rem;
    margin: 0 0 1rem;
    background: #edf5ec;
    color: #264b2a;
    border: 1px solid #cedecc;
    border-radius: .35rem;
    line-height: 1.5;
}

.customer-notice--danger {
    background: #fff2ef;
    color: #83242a;
    border-color: #f2cbc6;
}

.saved-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.75rem, 2vw, 1.5rem);
}

.saved-item {
    background: #fff;
    border: 1px solid var(--customer-border);
    border-radius: .75rem;
    overflow: hidden;
    min-width: 0;
}

.saved-item-photo {
    display: grid;
    aspect-ratio: 3 / 4;
    background: var(--customer-tint);
    color: var(--customer-wine);
    place-items: center;
    overflow: hidden;
    text-decoration: none;
}

.saved-item-photo img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.saved-item-photo:focus-visible {
    outline-offset: -3px !important;
}

.saved-item-body {
    padding: clamp(.7rem, 2vw, 1.2rem);
}

.saved-item-title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}

.saved-item-title a {
    color: inherit;
    text-decoration: none;
}

.saved-item-title a:hover {
    text-decoration: underline;
}

.saved-item-price {
    color: var(--customer-wine);
    font-weight: 700;
    margin: .45rem 0 .8rem;
}

.saved-item-remove {
    background: none;
    border: none;
    padding: .25rem 0;
    color: var(--customer-muted);
    cursor: pointer;
    font: 600 .875rem/1.4 var(--font-family);
    min-height: 2.3rem;
}

.saved-item-remove:hover {
    color: var(--customer-wine);
    text-decoration: underline;
}

.track-layout, .buyer-layout {
    display: grid;
    align-items: start;
    gap: clamp(1rem, 3vw, 2rem);
}

.track-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr);
}

.track-main, .buyer-content {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.track-support {
    background: var(--customer-tint);
}

.track-support .customer-bubble {
    background: #fff;
}

.track-support .customer-note {
    margin: .75rem 0 1.1rem;
}

.customer-form, .customer-form-row {
    display: grid;
    gap: 1rem;
}

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

.customer-field {
    display: grid;
    align-content: start;
    gap: .45rem;
    min-width: 0;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1.45;
}

.customer-field :is(input, textarea) {
    display: block;
    margin: 0;
    width: 100%;
    min-width: 0;
    min-height: 2.85rem;
    font: 400 1rem/1.4 var(--font-family);
    padding: .65rem .75rem;
    background: #fff;
    border: 1px solid #cdbdbb;
    border-radius: .3rem;
    color: var(--customer-ink);
}

.customer-field textarea {
    resize: vertical;
}

.customer-field small {
    color: var(--customer-muted);
    font-weight: 500;
    font-size: .84rem;
}

.customer-form > .customer-button, .customer-form-actions {
    justify-self: start;
}

.track-result dl {
    display: grid;
    gap: .8rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.25rem 0;
}

.track-result dt {
    color: var(--customer-muted);
    font-size: .88rem;
    margin-bottom: .45rem;
}

.track-result dd {
    margin: 0;
}

.customer-pill {
    display: inline-block;
    max-width: 100%;
    border-radius: 1rem;
    background: #f6eee4;
    color: #704a21;
    padding: .35rem .65rem;
    font: 700 .82rem/1.25 var(--font-family);
}

.customer-pill--delivered, .customer-pill--paid {
    background: #e7f2e7;
    color: #2b5630;
}

.customer-pill--shipped, .customer-pill--processing {
    background: #e9edf7;
    color: #344b74;
}

.customer-pill--failed, .customer-pill--cancelled {
    background: #fbe8e5;
    color: #811f2a;
}

.track-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 1.4rem 0;
    padding: 0;
    list-style: none;
}

.track-steps li {
    position: relative;
    border-top: 2px solid var(--customer-border);
    color: var(--customer-muted);
    padding: .85rem .25rem 0 0;
    font-size: .82rem;
    overflow-wrap: anywhere;
}

.track-steps li::before {
    content: "";
    position: absolute;
    width: .65rem;
    height: .65rem;
    background: #fff;
    border: 2px solid #b4a3a1;
    border-radius: 50%;
    top: -.38rem;
    left: 0;
}

.track-steps .is-reached {
    border-color: var(--customer-wine);
    color: var(--customer-ink);
}

.track-steps .is-reached::before {
    background: var(--customer-wine);
    border-color: var(--customer-wine);
}

.track-steps [aria-current] {
    font-weight: 700;
}

.buyer-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: .9rem;
}

.buyer-layout {
    grid-template-columns: minmax(13.5rem, 16rem) minmax(0, 1fr);
}

.buyer-nav {
    display: grid;
    gap: .2rem;
    position: sticky;
    top: 5.75rem;
    padding: .55rem;
}

.buyer-nav a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    gap: .65rem;
    padding: .55rem .7rem;
    border-radius: .3rem;
    color: var(--customer-ink);
    font-weight: 700;
    font-size: .875rem;
    text-decoration: none;
}

.buyer-nav a:hover, .buyer-nav a:focus-visible {
    background: var(--customer-tint);
    color: var(--customer-wine);
}

.buyer-nav i {
    color: var(--customer-wine);
    text-align: center;
    width: 1.1rem;
}

.buyer-content section, .buyer-content .customer-notice, #address-form {
    scroll-margin-top: 6rem;
}

.buyer-section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .7rem;
    flex-wrap: wrap;
}

.buyer-order-list, .buyer-address-list {
    display: grid;
    gap: .8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.buyer-order-item, .buyer-address {
    border: 1px solid var(--customer-border);
    border-radius: .55rem;
    padding: 1rem;
    overflow-wrap: anywhere;
}

.buyer-order-item dl {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: .85rem 0;
}

.buyer-order-item dt {
    margin: 0 0 .25rem;
    color: var(--customer-muted);
    font-size: .82rem;
}

.buyer-order-item dd {
    margin: 0;
    font-weight: 700;
}

.buyer-order-header, .buyer-address-actions, .customer-form-actions, .buyer-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem;
}

.buyer-order-header {
    justify-content: space-between;
}

.buyer-order-header h3, .buyer-address h3, .buyer-subheading {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.buyer-address-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

.buyer-address p {
    line-height: 1.5;
    color: var(--customer-muted);
    margin: .55rem 0;
}

.buyer-address-actions {
    margin-top: .55rem;
}

.buyer-address-actions button {
    border: 0;
    background: none;
    cursor: pointer;
    padding: 0;
    font: inherit;
    color: var(--customer-wine);
    text-decoration: underline;
    text-underline-offset: .22em;
}

.buyer-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
}

.buyer-check input {
    accent-color: var(--customer-wine);
    height: 1rem;
    width: 1rem;
    margin: 0;
}

.buyer-profile-divider {
    margin: 1.65rem 0 1.15rem;
    border: 0;
    border-top: 1px solid var(--customer-border);
}

.buyer-pagination {
    margin-top: 1rem;
}

.customer-auth .customer-shell {
    max-width: 33rem;
}

.customer-auth .customer-heading {
    text-align: center;
}

.customer-auth .customer-card {
    padding: 0;
    overflow: hidden;
}

.customer-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--customer-tint);
}

.customer-auth-tabs a {
    display: block;
    text-align: center;
    font-weight: 700;
    padding: .95rem .5rem;
    color: var(--customer-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.customer-auth-tabs a[aria-current] {
    background: #fff;
    color: var(--customer-wine);
    border-color: var(--customer-wine);
}

.customer-auth-body {
    padding: clamp(1.05rem, 4vw, 2rem);
}

.customer-auth-body .customer-button {
    width: 100%;
}

@media (max-width: 56rem) {
    .saved-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .buyer-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .buyer-nav {
        position: static;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 40rem) {
    .saved-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .track-layout, .customer-form-row, .buyer-address-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .buyer-order-item dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-button {
        min-height: 2.85rem;
    }
}
