.commerce-page {
    background:#f8f5ee;
    padding-block:28px 80px;
    min-height:65vh;
}

.commerce-breadcrumb {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    font-size:13px;
    color:#666;
}

.commerce-heading {
    margin-block:32px;
}

.commerce-heading>span {
    color:#795d1b;
    font-size:11px;
    letter-spacing:.16em;
    font-weight:600;
}

.commerce-heading h1 {
    font-size:clamp(34px,5vw,54px);
    margin-top:10px;
}

.commerce-layout {
    display:grid;
    grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);
    gap:28px;
    align-items:start;
}

.commerce-items,
.commerce-summary,
.commerce-checkout-form,
.commerce-empty {
    background:#fff;
    border:1px solid #e4dfd5;
    padding:clamp(16px,3vw,32px);
}

.commerce-summary {
    position:sticky;
    top:120px;
}

.commerce-summary h2,
.commerce-empty h2 {
    font-size:25px;
    margin-bottom:20px;
}

.commerce-item {
    display:grid;
    grid-template-columns:100px minmax(0,1fr) auto;
    gap:20px;
    padding-block:20px;
    border-bottom:1px solid #e4dfd5;
}

.commerce-item:first-child {
    padding-top:0;
}

.commerce-item:last-child {
    border-bottom:0;
    padding-bottom:0;
}

.commerce-item-image {
    display:grid;
    place-items:center;
    aspect-ratio:4/5;
    background:#f8f5ee;
    color:#967526;
    font-size:36px;
    overflow:hidden;
}

.commerce-item-image img {
    width:100%;
    height:100%;
    object-fit:contain;
}

.commerce-item-info {
    min-width:0;
}

.commerce-item-info h2 {
    font-size:20px;
    overflow-wrap:anywhere;
    margin-bottom:8px;
}

.commerce-item-info p {
    font-size:14px;
    color:#555;
    margin-bottom:8px;
}

.commerce-quantity {
    display:flex;
    align-items:end;
    flex-wrap:wrap;
    gap:8px;
    margin-block:12px;
}

.commerce-quantity label {
    display:grid;
    gap:4px;
    font-size:12px;
}

.commerce-quantity input {
    width:72px;
    min-height:48px;
    border:1px solid #d9d4c9;
    padding:8px;
    font:inherit;
}

.commerce-quantity button {
    min-height:48px;
    border:1px solid #171717;
    background:#fff;
    color:#171717;
    padding:10px 14px;
    cursor:pointer;
}

.commerce-remove {
    background:none;
    border:0;
    padding:8px 0;
    color:#555;
    text-decoration:underline;
    cursor:pointer;
}

.commerce-line-total {
    font-size:15px;
    white-space:nowrap;
}

.commerce-summary-row {
    display:flex;
    justify-content:space-between;
    align-items:start;
    gap:16px;
    padding-block:15px;
    border-bottom:1px solid #eee9df;
    font-size:14px;
}

.commerce-summary-row strong {
    text-align:right;
}

.commerce-primary,
.commerce-secondary {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:52px;
    padding:12px 16px;
    margin-top:18px;
    font:inherit;
    font-size:14px;
    font-weight:600;
    text-align:center;
    cursor:pointer;
}

.commerce-primary {
    background:#171717;
    color:#fff;
    border:1px solid #171717;
}

.commerce-secondary {
    background:#fff;
    color:#171717;
    border:1px solid #171717;
}

.commerce-primary:disabled {
    opacity:.55;
    cursor:not-allowed;
}

.commerce-empty {
    text-align:center;
    padding-block:60px;
}

.commerce-empty .commerce-primary {
    max-width:280px;
    margin:24px auto 0;
}

.commerce-notice,
.commerce-error {
    padding:16px;
    margin-bottom:20px;
    border:1px solid #d8cfba;
    background:#fff;
    font-size:14px;
}

.commerce-error {
    border-color:#a44949;
    color:#8b2424;
}

.commerce-checkout-form fieldset {
    padding:0;
    border:0;
    min-width:0;
    margin:0 0 32px;
}

.commerce-checkout-form legend {
    font-size:22px;
    font-weight:600;
    margin-bottom:20px;
}

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

.commerce-fields label {
    display:grid;
    gap:8px;
    font-size:14px;
    font-weight:500;
}

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

.commerce-fields input,
.commerce-fields select,
.commerce-fields textarea {
    width:100%;
    min-width:0;
    min-height:48px;
    padding:12px;
    border:1px solid #d9d4c9;
    border-radius:0;
    background:#fff;
    color:#171717;
    font:inherit;
    font-size:16px;
}

.commerce-fields textarea {
    resize:vertical;
}

.commerce-payment {
    display:flex;
    align-items:center;
    gap:12px;
    border:1px solid #d9d4c9;
    padding:18px;
}

.commerce-payment small {
    display:block;
    color:#555;
    margin-top:6px;
}

.commerce-page :focus-visible {
    outline:2px solid #967526;
    outline-offset:3px;
}

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

.product-cart-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.product-cart-actions .commerce-primary,
.product-cart-actions .commerce-secondary {
    margin-top:0;
}

.product-quantity-field {
    display:flex;
    align-items:center;
    gap:12px;
    margin-block:16px;
}

.product-quantity-field input {
    min-height:48px;
    width:80px;
    border:1px solid #d9d4c9;
    padding:10px;
    font:inherit;
}

@media(max-width:1023px) {
    .commerce-layout {
        grid-template-columns:minmax(0,1.4fr) minmax(250px,1fr);
        gap:16px;
    }

    .commerce-item {
        grid-template-columns:80px minmax(0,1fr);
    }

    .commerce-line-total {
        grid-column:2;
    }
}

@media(max-width:767px) {
    .commerce-layout {
        grid-template-columns:minmax(0,1fr);
    }

    .commerce-summary {
        position:static;
    }

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

    .commerce-item {
        gap:12px;
    }

    .commerce-heading {
        margin-block:24px;
    }

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

@media(max-width:359px) {
    .commerce-item {
        grid-template-columns:60px minmax(0,1fr);
    }

    .commerce-summary-row {
        font-size:13px;
    }
}

@media(prefers-reduced-motion:reduce) {
    .commerce-page * {
        scroll-behavior:auto!important;
        transition:none!important;
    }
}

/* P09-R3 Customer Identity */

.checkout-customer-panel{
    padding:clamp(18px,3vw,26px);
    border:1px solid #e4dfd5;
    background:#fff;
    margin-bottom:24px;
    overflow-wrap:anywhere
}

.checkout-customer-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:12px
}

.checkout-customer-panel a{
    color:#795d1b;
    text-decoration:underline;
    font-size:14px
}

.checkout-customer-panel p{
    margin-block:6px;
    font-size:14px
}

.checkout-address-selector{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px;
    margin-block:18px
}

.checkout-address-selector label{
    grid-column:1/-1;
    font-size:14px;
    font-weight:500
}

.checkout-address-selector select{
    min-width:0;
    width:100%;
    min-height:48px;
    padding:12px;
    border:1px solid #d9d4c9;
    background:#fff;
    font:inherit;
    font-size:16px
}

.checkout-selected-address{
    background:#f8f5ee;
    padding:18px;
    margin-block:18px;
    border:1px solid #e4dfd5
}

@media(max-width:767px){
    .checkout-address-selector{
        grid-template-columns:minmax(0,1fr)
    }

    .checkout-address-selector button{
        width:100%
    }
}
