.purchase-page {
    max-width: 1600px;
    padding: 34px 3.8% 80px;
    margin: auto;
    font-size: 15px;
}
.purchase-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin: 0 0 42px;
}
.purchase-heading h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1.3px;
    line-height: 1.15;
    margin: 13px 0 16px;
}
.purchase-heading h1 > span {
    font-size: 20px;
    color: #999;
    margin-left: 10px;
    vertical-align: top;
    font-weight: 500;
}
.purchase-heading p {
    font-size: 15px;
    color: #888;
    line-height: 1.7;
    margin: 0;
}
.purchase-steps {
    list-style: none;
    display: flex;
    gap: 25px;
    padding: 0;
    margin: 0 0 5px;
    font-size: 13px;
    color: #aaa;
}
.purchase-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.purchase-steps b {
    font-size: 12px;
    font-weight: 500;
}
.purchase-steps .current {
    color: #171717;
    font-weight: 600;
}
.purchase-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    align-items: start;
    gap: 45px;
}
.purchase-layout[hidden],
.purchase-empty[hidden],
[hidden].field-full,
#saved-address-wrap[hidden] {
    display: none;
}
.bag-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-top: 2px solid #171717;
    border-bottom: 1px solid #ddd;
}
.bag-toolbar label,
.purchase-check {
    display: flex;
    gap: 10px;
    align-items: center;
    line-height: 1.7;
    font-size: 14px;
}
.purchase-page input[type="checkbox"],
.purchase-page input[type="radio"] {
    accent-color: #171717;
    width: 17px;
    height: 17px;
    margin: 0;
    flex-shrink: 0;
}
.bag-toolbar button {
    color: #888;
    font-size: 13px;
    padding: 0;
}
.bag-item {
    display: grid;
    grid-template-columns: 18px 94px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #e5e5e5;
    padding: 25px 0;
    position: relative;
}
.bag-photo {
    display: block;
    background: #f7f7f7;
}
.bag-photo img {
    width: 94px;
    height: 125px;
    object-fit: cover;
}
.bag-name {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    display: block;
    padding-right: 8px;
}
.bag-options {
    color: #999;
    font-size: 13px;
    margin: 8px 0;
}
.bag-unit-price {
    color: #888;
    font-size: 13px;
    margin: 8px 0 12px;
}
.bag-quantity {
    display: inline-flex;
    align-items: center;
    height: 34px;
    border: 1px solid #ddd;
}
.bag-quantity button {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 17px;
}
.bag-quantity input {
    width: 35px;
    font: inherit;
    font-size: 14px;
    text-align: center;
    padding: 0;
    border: 0;
    appearance: textfield;
    background: white;
}
.bag-quantity input::-webkit-inner-spin-button {
    appearance: none;
}
.bag-line-end {
    text-align: right;
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    justify-content: space-between;
    min-width: 85px;
}
.bag-line-end > strong {
    font-size: 15px;
    font-weight: 600;
    margin-top: 5px;
}
.bag-remove {
    color: #aaa;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
    padding: 0 0 3px;
    margin-bottom: 7px;
}
.bag-bundle-tag {
    display: block;
    font-size: 12px;
    color: #ac513c;
    margin: 8px 0;
}
.bag-guidance {
    padding: 28px 0;
}
.bag-guidance h2 {
    font-size: 12px;
    letter-spacing: 1.2px;
    font-weight: 500;
    margin: 0 0 14px;
}
.bag-guidance p {
    font-size: 13px;
    line-height: 1.8;
    color: #999;
    margin: 4px 0;
}
.bag-guidance a {
    display: inline-block;
    font-size: 14px;
    margin-top: 18px;
    border-bottom: 1px solid #aaa;
    padding-bottom: 6px;
}
.purchase-summary {
    background: #f7f7f5;
    padding: 30px;
    position: sticky;
    top: 110px;
}
.purchase-summary .eyebrow {
    font-size: 11px;
    color: #999;
}
.purchase-summary h2 {
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.6px;
    margin: 10px 0 25px;
}
.shipping-benefit {
    padding: 17px 0 20px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
    line-height: 1.7;
    color: #777;
}
.shipping-benefit strong {
    color: #171717;
    font-weight: 500;
}
.shipping-meter {
    height: 3px;
    background: #dfdfda;
    margin-top: 13px;
    overflow: hidden;
}
.shipping-meter > span {
    display: block;
    height: 100%;
    background: #171717;
}
.purchase-totals {
    margin: 24px 0;
}
.purchase-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 17px 0;
    line-height: 1.6;
}
.purchase-totals dt {
    color: #888;
    font-size: 14px;
}
.purchase-totals dd {
    margin: 0;
    font-size: 15px;
}
#bundle-discount,
#coupon-discount {
    color: #ac513c;
}
.purchase-coupon {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}
.purchase-coupon > label {
    display: block;
    font-size: 14px;
    margin-bottom: 12px;
}
.purchase-coupon select {
    width: 100%;
    padding: 13px 11px;
    border: 1px solid #d6d6d6;
    font: inherit;
    font-size: 14px;
    background: white;
    border-radius: 0;
}
.purchase-coupon p {
    color: #999;
    font-size: 12px;
    line-height: 1.6;
}
.purchase-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ccc;
    padding-top: 24px;
    margin-top: 24px;
    gap: 15px;
}
.purchase-grand-total span {
    font-size: 15px;
    font-weight: 500;
}
.purchase-grand-total strong {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.8px;
}
.purchase-tax-note {
    color: #999;
    font-size: 11px;
    line-height: 1.7;
    text-align: right;
    margin: 8px 0 24px;
}
.purchase-primary,
.purchase-secondary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 52px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}
.purchase-primary {
    background: #171717;
    color: white;
    border: 1px solid #171717;
}
.purchase-primary:hover {
    background: #333;
}
.purchase-secondary {
    background: transparent;
    border: 1px solid #ccc;
    margin-top: 10px;
}
.purchase-primary[aria-disabled="true"] {
    background: #ccc;
    pointer-events: none;
    border-color: #ccc;
}
.purchase-summary-foot {
    color: #999;
    font-size: 12px;
    line-height: 1.8;
    margin: 17px 0 0;
}
.purchase-empty {
    border-top: 2px solid #171717;
    text-align: center;
    padding: 90px 20px;
}
.purchase-empty h2 {
    font-size: 24px;
    font-weight: 500;
}
.purchase-empty p {
    color: #999;
    line-height: 1.8;
}
.purchase-empty a {
    width: 220px;
    margin: 30px auto 0;
}
.checkout-section {
    margin-bottom: 34px;
}
.checkout-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-top: 2px solid #171717;
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
    margin-bottom: 24px;
}
.checkout-section-title h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
}
.checkout-section-title h2 span {
    color: #999;
    font-weight: 400;
    margin-left: 6px;
    font-size: 16px;
}
.checkout-section-title > span,
.checkout-section-title > a {
    color: #999;
    font-size: 12px;
}
.checkout-section-title .purchase-check {
    font-size: 13px;
    color: #777;
}
.checkout-item {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}
.checkout-item:first-child {
    padding-top: 0;
}
.checkout-item img {
    width: 66px;
    height: 88px;
    object-fit: cover;
}
.checkout-item > div {
    flex: 1;
}
.checkout-item a {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}
.checkout-item p {
    color: #999;
    font-size: 13px;
    margin: 8px 0 0;
}
.checkout-item strong {
    font-size: 15px;
    font-weight: 500;
}
.checkout-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 20px;
}
.checkout-fields label,
.saved-address-label {
    display: grid;
    gap: 10px;
    font-size: 14px;
    color: #777;
}
.checkout-fields input,
.checkout-fields select,
.saved-address-label select {
    width: 100%;
    min-width: 0;
    border: 1px solid #ddd;
    background: white;
    font: inherit;
    font-size: 15px;
    padding: 14px 12px;
    height: 48px;
    border-radius: 0;
}
.checkout-fields input::placeholder {
    color: #bbb;
}
.field-full {
    grid-column: 1 / -1;
}
#saved-address-wrap {
    margin-bottom: 22px;
}
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.payment-methods > label {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #ddd;
    padding: 20px 15px;
    cursor: pointer;
    font-size: 15px;
}
.payment-methods > label:has(input:checked) {
    border-color: #171717;
    background: #f7f7f7;
}
.checkout-helper {
    font-size: 13px;
    line-height: 1.8;
    color: #999;
    margin: 16px 0;
}
.checkout-agreements {
    padding: 20px 0;
    border-top: 1px solid #ddd;
}
.checkout-agreements .purchase-check {
    align-items: flex-start;
    font-size: 13px;
    color: #666;
}
.checkout-agreements input {
    margin-top: 3px !important;
}
.checkout-agreements > button {
    font-size: 12px;
    color: #999;
    border-bottom: 1px solid #bbb;
    padding: 0 0 2px;
    margin: 9px 0 0 27px;
}
.purchase-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #0006;
    display: grid;
    place-items: center;
    padding: 20px;
}
.purchase-dialog {
    background: white;
    width: 480px;
    max-width: 100%;
    max-height: 85dvh;
    overflow: auto;
    padding: 32px;
}
.purchase-dialog h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px;
}
.purchase-dialog p {
    font-size: 15px;
    line-height: 1.9;
    color: #777;
    white-space: pre-line;
}
.purchase-dialog button {
    margin-top: 25px;
}
.bag-drawer-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}
.bag-drawer-actions .dark-button,
.bag-drawer-actions .purchase-secondary {
    justify-content: center;
}
@media (max-width: 1000px) {
    .purchase-layout {
        gap: 28px;
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    }
    .purchase-summary {
        padding: 23px;
    }
    .bag-item {
        grid-template-columns: 18px 75px minmax(0, 1fr);
        gap: 14px;
    }
    .bag-photo img {
        width: 75px;
        height: 100px;
    }
    .bag-line-end {
        grid-column: 3;
        flex-direction: row;
        align-items: center;
    }
}
@media (max-width: 767px) {
    .purchase-page {
        padding: 26px 18px 45px;
    }
    .purchase-heading {
        display: block;
        margin-bottom: 28px;
    }
    .purchase-heading h1 {
        font-size: 30px;
        letter-spacing: -1px;
    }
    .purchase-heading h1 > span {
        font-size: 17px;
    }
    .purchase-heading p {
        font-size: 14px;
    }
    .purchase-steps {
        margin-top: 25px;
        gap: 20px;
        font-size: 12px;
    }
    .purchase-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .purchase-summary {
        position: static;
        padding: 25px 20px;
    }
    .bag-item {
        grid-template-columns: 17px 78px minmax(0, 1fr);
        padding: 20px 0;
        gap: 12px;
    }
    .bag-photo {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: start;
    }
    .bag-photo img {
        width: 78px;
        height: 104px;
    }
    .bag-item > input {
        align-self: start;
        margin-top: 4px !important;
        grid-row: 1 / 3;
    }
    .bag-info {
        grid-column: 3;
    }
    .bag-line-end {
        gap: 15px;
    }
    .bag-name {
        font-size: 15px;
    }
    .bag-line-end > strong {
        margin: 0;
    }
    .bag-remove {
        margin: 0;
    }
    .bag-guidance {
        padding-bottom: 0;
    }
    .checkout-fields {
        gap: 18px 12px;
    }
    .checkout-fields input {
        font-size: 16px;
    }
    .checkout-item {
        gap: 13px;
        flex-wrap: wrap;
    }
    .checkout-item > strong {
        margin-left: 79px;
        margin-top: -8px;
    }
    .checkout-section-title h2 {
        font-size: 19px;
    }
    .payment-methods {
        gap: 9px;
    }
    .payment-methods > label {
        padding: 16px 12px;
        font-size: 14px;
        gap: 9px;
    }
    .purchase-grand-total strong {
        font-size: 27px;
    }
    .purchase-dialog {
        padding: 25px 22px;
    }
}
