/* THE OPEN CRATE - SHOPPING CART / CHECKOUT SHELL */

.store-header-inner {
    gap: 18px;
}

.store-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.store-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #d8d4cc;
    border-radius: 8px;
    background: #fff;
    color: #1f1f1f;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 850;
}

.store-cart-link:hover {
    border-color: #b48600;
    background: #fffaf0;
}

.store-cart-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.store-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ffc107;
    color: #171717;
    font-size: 0.7rem;
    font-weight: 950;
}

.store-cart-badge[hidden] {
    display: none;
}

.store-commerce-main {
    min-height: 60vh;
    background: #f5f4f1;
}

.store-commerce-section {
    padding: 34px 0 54px;
}

.store-commerce-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.store-commerce-heading h1 {
    margin: 4px 0 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1;
}

.store-commerce-heading p {
    max-width: 580px;
    color: #6d685f;
    font-size: 0.9rem;
    line-height: 1.5;
}

.store-hold-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #dcc36e;
    border-radius: 8px;
    background: #fff9e7;
    color: #40371e;
}

.store-hold-note strong,
.store-hold-note span {
    display: block;
}

.store-hold-note span {
    margin-top: 2px;
    color: #6c6242;
    font-size: 0.78rem;
}

.store-hold-timer {
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.store-cart-layout,
.store-checkout-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 18px;
    align-items: start;
}

.store-cart-list,
.store-cart-summary-card,
.store-checkout-page-card {
    border: 1px solid #dcd8d0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(24, 24, 24, 0.04);
}

.store-cart-list {
    overflow: hidden;
}

.store-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid #e7e3dc;
}

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

.store-cart-line-main {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.store-mini-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 58px;
    border: 1px solid #8f6217;
    background: linear-gradient(#c68b34, #ad7327);
    color: #171717;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 0.95;
}

.store-cart-line-copy h2 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.store-cart-line-copy p {
    margin: 0;
    color: #716c64;
    font-size: 0.78rem;
}

.store-cart-line-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-cart-qty {
    display: grid;
    grid-template-columns: 38px 46px 38px;
    gap: 5px;
}

.store-cart-qty button,
.store-cart-qty input {
    min-height: 38px;
    border: 1px solid #d4d0c8;
    border-radius: 6px;
    background: #fff;
    color: #222;
    text-align: center;
    font: inherit;
    font-weight: 850;
}

.store-cart-remove {
    border: 0;
    background: transparent;
    color: #9d3129;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.store-cart-line-total {
    min-width: 88px;
    text-align: right;
    font-weight: 900;
}

.store-cart-summary-card,
.store-checkout-page-card {
    padding: 18px;
}

.store-cart-summary-card h2,
.store-checkout-page-card h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

.store-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 0;
    border-bottom: 1px solid #e9e5de;
    font-size: 0.88rem;
}

.store-summary-row:last-child {
    border-bottom: 0;
}

.store-summary-row.is-total {
    padding-top: 13px;
    font-size: 1rem;
    font-weight: 950;
}

.store-cart-summary-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.store-cart-summary-actions .btn {
    width: 100%;
    min-height: 48px;
}

.store-empty-cart {
    padding: 32px 22px;
    text-align: center;
}

.store-empty-cart h2 {
    margin-bottom: 8px;
}

.store-empty-cart p {
    margin-bottom: 18px;
    color: #716c64;
}

.store-checkout-page-card + .store-checkout-page-card {
    margin-top: 14px;
}

.store-checkout-page-card .store-form-grid {
    margin-top: 10px;
}

.store-checkout-page-card .review-field input,
.store-checkout-page-card .review-field select {
    width: 100%;
    min-height: 46px;
    margin-top: 5px;
    padding: 10px 11px;
    border: 1px solid #d4d0c8;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font: inherit;
}

.store-checkout-order-lines {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
}

.store-checkout-order-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.84rem;
}

.store-checkout-order-line span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.store-checkout-rate-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.store-checkout-rate {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d8d4cc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.store-checkout-rate:has(input:checked) {
    border-color: #bd8e00;
    background: #fff9e6;
}

.store-checkout-rate-copy strong,
.store-checkout-rate-copy span {
    display: block;
}

.store-checkout-rate-copy span {
    margin-top: 3px;
    color: #716c64;
    font-size: 0.76rem;
}

.store-shipping-select-field label {
    display: block;
    margin-bottom: 6px;
    color: #292929;
    font-size: 0.82rem;
    font-weight: 850;
}

.store-shipping-select {
    width: 100%;
    min-height: 48px;
    padding: 10px 38px 10px 11px;
    border: 1px solid #cfcac1;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 0.9rem;
}

.store-shipping-select:focus,
.store-checkout-page-card .review-field select:focus {
    border-color: #b48600;
    outline: 2px solid rgba(180, 134, 0, 0.16);
    outline-offset: 1px;
}

.store-checkout-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.store-checkout-actions .btn {
    width: 100%;
    min-height: 50px;
}

.store-checkout-message {
    display: none;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 750;
}

.store-checkout-message:not(:empty) {
    display: block;
}

.store-checkout-message.is-error {
    border: 1px solid #e2b2ad;
    background: #fff0ee;
    color: #8a2119;
}

.store-checkout-message.is-success {
    border: 1px solid #b5d7bd;
    background: #edf8f0;
    color: #17652b;
}

/* CONTINUOUS CONVERSATIONAL CHECKOUT */
.checkout-conversation-page .store-commerce-heading {
    align-items: flex-start;
}

.checkout-conversation-page .store-commerce-heading h1 {
    max-width: 720px;
}

.checkout-conversation-page #checkout-rates-card[hidden],
.checkout-conversation-page #checkout-pay-card[hidden] {
    display: block;
}

.checkout-conversation-page .store-checkout-conversation {
    overflow: hidden;
    border: 1px solid #dcd8d0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(24, 24, 24, 0.04);
}

.checkout-conversation-page .store-checkout-conversation .store-checkout-page-card {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.checkout-conversation-page .store-checkout-conversation .store-checkout-page-card + .store-checkout-page-card {
    margin-top: 0;
    border-top: 1px solid #e6e1d8;
    padding-top: 20px;
}

.checkout-conversation-page .store-conversation-kicker {
    display: block;
    margin-bottom: 5px;
    color: #9b6d00;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.checkout-conversation-page .store-checkout-page-card h2 {
    margin-bottom: 6px;
    font-size: 1.35rem;
}

.checkout-conversation-page .store-conversation-intro {
    margin: 0 0 12px;
    color: #6f6a61;
    font-size: 0.86rem;
    line-height: 1.45;
}

.checkout-conversation-page .store-conversation-question {
    margin: 18px 0 8px;
    padding-top: 16px;
    border-top: 1px solid #ece8e1;
}

.checkout-conversation-page .store-conversation-question h3 {
    margin: 0;
    font-size: 1.05rem;
}

.checkout-conversation-page #checkout-rate-list:empty::before {
    content: 'Enter your delivery information above and choose “Show Shipping Options.”';
    display: block;
    padding: 12px;
    border: 1px dashed #d7d1c7;
    border-radius: 8px;
    background: #faf9f6;
    color: #746f66;
    font-size: 0.84rem;
    line-height: 1.45;
}

.checkout-conversation-page #checkout-pay-card .store-secure-note {
    margin-top: 12px;
}

.checkout-conversation-page #checkout-pay:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

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

    .store-cart-summary-card {
        order: -1;
    }
}

@media (max-width: 620px) {
    .store-cart-text {
        display: none;
    }

    .store-cart-link {
        min-width: 44px;
        justify-content: center;
        padding: 7px 9px;
    }

    .store-cart-badge {
        position: absolute;
        top: -5px;
        right: -5px;
    }

    .store-commerce-section {
        padding: 24px 0 40px;
    }

    .store-commerce-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .store-hold-note {
        align-items: flex-start;
    }

    .store-cart-line {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 13px;
    }

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

    .store-mini-box {
        width: 58px;
        height: 50px;
        font-size: 0.6rem;
    }

    .store-cart-line-actions {
        justify-content: space-between;
    }

    .store-cart-line-total {
        margin-left: auto;
    }

    .store-cart-qty {
        grid-template-columns: 42px 48px 42px;
    }

    .store-cart-qty button,
    .store-cart-qty input {
        min-height: 44px;
    }

    .store-cart-summary-card,
    .store-checkout-page-card {
        padding: 15px;
    }

    .store-checkout-page-card .store-form-grid {
        grid-template-columns: 1fr;
    }

    .store-checkout-page-card .store-field-wide {
        grid-column: auto;
    }

    .store-checkout-page-card .review-field input,
    .store-checkout-page-card .review-field select,
    .store-shipping-select {
        min-height: 48px;
        font-size: 16px;
    }

    .checkout-conversation-page .store-checkout-conversation .store-checkout-page-card {
        padding: 16px 15px;
    }

    .checkout-conversation-page .store-checkout-page-card h2 {
        font-size: 1.2rem;
    }
}
