
/* =========================================================
   DELECTABLES — CART PAGE
   Premium editorial layout
   Palette: Dark Green | Warm Cream | Gold
========================================================= */

.cart-page {
    --cart-green: #183d2c;
    --cart-green-deep: #102c20;
    --cart-gold: #c6a45b;
    --cart-cream: #f8f5ed;
    --cart-paper: #fffefa;
    --cart-ink: #252c25;
    --cart-muted: #777b70;
    --cart-border: #e9e5d9;

    width: 100%;
    min-height: 75vh;
    padding: 105px 24px 100px;
    overflow-x: clip;
    background: var(--cart-cream);
    color: var(--cart-ink);
}

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

.cart-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    min-width: 0;
}

/* =========================================================
   HEADER
========================================================= */

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 38px;
    margin-bottom: 42px;
    border-bottom: 1px solid var(--cart-border);
}

.cart-heading-copy {
    flex: 1 1 320px;
    min-width: 0;
}

.cart-heading-copy p {
    max-width: 480px;
    margin: 0;
    color: var(--cart-muted);
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: break-word;
}

/* Checkout progress */

.cart-progress {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #99998f;
    font-size: 11px;
    white-space: nowrap;
}

.progress-number {
    display: grid;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 1px solid #d9d5c9;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
}

.progress-step.active {
    color: var(--cart-green);
    font-weight: 700;
}

.progress-step.active .progress-number {
    background: var(--cart-green);
    border-color: var(--cart-green);
    color: white;
}

.progress-line {
    flex: 0 1 27px;
    min-width: 10px;
    height: 1px;
    background: #d9d5c9;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: start;
    gap: 42px;
    width: 100%;
    min-width: 0;
}

.cart-items-section {
    min-width: 0;
    width: 100%;
}

.cart-items-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 21px;
}

.section-kicker,
.summary-kicker,
.cart-product-label {
    display: block;
    color: #8b7444;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.5;
}

.cart-items-heading h2 {
    margin: 7px 0 0;
    color: var(--cart-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-weight: 400;
    overflow-wrap: break-word;
}

.cart-items-count {
    flex-shrink: 0;
    padding: 7px 12px;
    border: 1px solid #ded9ca;
    border-radius: 30px;
    color: #6d7168;
    font-size: 11px;
    white-space: nowrap;
}

/* =========================================================
   PRODUCT CARDS
========================================================= */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    min-width: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: minmax(110px, 172px) minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    min-width: 0;
    padding: 17px;
    background: var(--cart-paper);
    border: 1px solid var(--cart-border);
    border-radius: 5px;
    transition: border-color 180ms ease, transform 180ms ease;
}

.cart-item:hover {
    border-color: #d5c8a9;
    transform: translateY(-2px);
}

.cart-item-image {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eeeadd;
    border-radius: 3px;
}

.cart-item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 10px;
    color: #8c8b7d;
    font-size: 12px;
    text-align: center;
}

.cart-item-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
    padding: 7px 3px 5px 0;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.cart-item-details {
    flex: 1 1 150px;
    min-width: 0;
}

.cart-product-label {
    color: #9a8353;
    font-size: 9px;
    letter-spacing: 1.5px;
    overflow-wrap: anywhere;
}

.cart-item-details h3 {
    max-width: 100%;
    margin: 8px 0 7px;
    color: var(--cart-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: normal;
}

.cart-item-mass {
    display: inline-block;
    max-width: 100%;
    padding: 5px 10px;
    background: #f2f0e7;
    border-radius: 2px;
    color: #666b5e;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.cart-item-total {
    flex: 0 1 auto;
    min-width: 0;
    text-align: right;
}

.total-label {
    display: block;
    margin-bottom: 6px;
    color: #96958b;
    font-size: 10px;
}

.cart-item-total strong {
    display: inline-block;
    max-width: 100%;
    color: var(--cart-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    font-weight: 400;
    overflow-wrap: anywhere;
}

/* =========================================================
   QUANTITY AND REMOVE CONTROLS
========================================================= */

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid #efede5;
}

.cart-item-unit-price {
    min-width: 0;
    color: #62675e;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.cart-item-unit-price span {
    color: #99998f;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    min-width: 0;
}

.quantity-form {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    height: 36px;
    border: 1px solid #dedbce;
    border-radius: 3px;
    overflow: hidden;
}

.quantity-button {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--cart-green);
    font-size: 19px;
    cursor: pointer;
    transition: background 160ms ease;
}

.quantity-button:hover:not(:disabled) {
    background: #efede4;
}

.quantity-button:disabled {
    color: #c7c5bc;
    cursor: not-allowed;
}

.quantity-value {
    display: grid;
    flex: 0 0 30px;
    min-width: 30px;
    height: 34px;
    place-items: center;
    color: var(--cart-ink);
    font-size: 12px;
    font-weight: 600;
}

.remove-form {
    flex-shrink: 0;
    margin: 0;
}

.remove-button,
.clear-cart-button {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #8b6c62;
    font-size: 11px;
    cursor: pointer;
    transition: color 160ms ease;
}

.remove-button:hover,
.clear-cart-button:hover {
    color: #a13d32;
    text-decoration: underline;
}

/* =========================================================
   CART FOOTER
========================================================= */

.cart-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 23px 3px 0;
}

.cart-list-footer form {
    margin: 0;
}

.back-to-shop {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--cart-green);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.back-to-shop span {
    color: var(--cart-gold);
    font-size: 18px;
    transition: transform 160ms ease;
}

.back-to-shop:hover span {
    transform: translateX(-4px);
}

/* =========================================================
   ORDER SUMMARY
========================================================= */

.cart-summary {
    position: sticky;
    top: 25px;
    width: 100%;
    min-width: 0;
    padding: 30px 27px 25px;
    overflow: hidden;
    background: var(--cart-green);
    border-radius: 5px;
    color: white;
}

.cart-summary::before {
    position: absolute;
    top: -75px;
    right: -75px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(214, 190, 133, 0.16);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.cart-summary::after {
    position: absolute;
    top: -48px;
    right: -48px;
    width: 135px;
    height: 135px;
    border: 1px solid rgba(214, 190, 133, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.summary-top,
.summary-divider,
.summary-row,
.summary-delivery,
.summary-total,
.checkout-button,
.summary-assurance {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.summary-kicker {
    color: #d3b777;
    font-size: 9px;
    letter-spacing: 2px;
}

.summary-top h2 {
    margin: 16px 0 11px;
    color: #fffdf6;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.summary-top p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.summary-divider {
    height: 1px;
    margin: 25px 0 20px;
    background: rgba(255, 255, 255, 0.16);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

.summary-row strong {
    color: white;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.summary-delivery {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 20px;
    padding: 13px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.delivery-icon {
    flex: 0 0 auto;
    color: #d3b777;
    font-size: 16px;
    line-height: 1.2;
}

.summary-delivery p {
    min-width: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.summary-total {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 23px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.summary-total > span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.summary-total strong {
    max-width: 100%;
    color: #e4c77f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.summary-total small {
    width: 100%;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
}

.checkout-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    min-height: 53px;
    margin-top: 25px;
    padding: 12px 17px;
    background: var(--cart-gold);
    border: 1px solid var(--cart-gold);
    border-radius: 3px;
    color: #172d20;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 180ms ease, border-color 180ms ease;
}

.checkout-button:hover {
    background: #dfc17d;
    border-color: #dfc17d;
}

.checkout-arrow {
    flex-shrink: 0;
    font-size: 19px;
    transition: transform 180ms ease;
}

.checkout-button:hover .checkout-arrow {
    transform: translateX(4px);
}

.summary-assurance {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 7px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.summary-assurance span {
    flex-shrink: 0;
    color: #d9bd78;
}

/* =========================================================
   EMPTY CART
========================================================= */

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 650px;
    margin: 20px auto 0;
    padding: 65px 35px 75px;
    background: var(--cart-paper);
    border: 1px solid var(--cart-border);
    border-radius: 5px;
    text-align: center;
}

.empty-cart-art {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    width: 115px;
    height: 115px;
    margin-bottom: 27px;
    place-items: center;
    background: #f0eee3;
    border: 1px solid #e4dfd0;
    border-radius: 50%;
}

.empty-cart-basket {
    color: var(--cart-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 51px;
}

.empty-cart-spark {
    position: absolute;
    color: var(--cart-gold);
}

.spark-one {
    top: 14px;
    left: 12px;
    font-size: 20px;
}

.spark-two {
    right: 11px;
    bottom: 16px;
    font-size: 18px;
}

.empty-cart h2 {
    max-width: 100%;
    margin: 12px 0;
    color: var(--cart-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(27px, 4vw, 38px);
    font-weight: 400;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.empty-cart p {
    max-width: 390px;
    margin: 0;
    color: var(--cart-muted);
    font-size: 13px;
    line-height: 1.8;
}

.shop-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 100%;
    min-height: 49px;
    margin-top: 27px;
    padding: 10px 21px;
    background: var(--cart-green);
    border: 1px solid var(--cart-green);
    border-radius: 3px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 180ms ease;
}

.shop-button:hover {
    background: var(--cart-green-deep);
}

.shop-button span:last-child {
    color: #e0c27b;
    font-size: 18px;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {
    .cart-layout {
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 25px;
    }

    .cart-item {
        grid-template-columns: minmax(110px, 135px) minmax(0, 1fr);
        gap: 16px;
    }

    .cart-item-details h3 {
        font-size: 20px;
    }

    .cart-item-actions {
        gap: 10px;
    }

    .cart-summary {
        padding: 26px 22px 23px;
    }
}

/* =========================================================
   SMALL DESKTOP / TABLET
========================================================= */

@media (max-width: 850px) {
    .cart-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .cart-summary {
        position: static;
        max-width: 100%;
    }

    .cart-header {
        align-items: flex-start;
    }

    .cart-progress {
        justify-content: flex-start;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
    .cart-page {
        padding: 88px 15px 60px;
    }

    .cart-header {
        gap: 22px;
        padding-bottom: 27px;
        margin-bottom: 28px;
    }

    .cart-heading-copy {
        flex-basis: 100%;
    }

    .cart-heading-copy p {
        font-size: 13px;
        line-height: 1.75;
    }

    .cart-progress {
        display: flex;
        justify-content: space-between;
        flex-wrap: nowrap;
        width: 100%;
        gap: 5px;
    }

    .progress-step {
        gap: 5px;
        font-size: 9px;
    }

    .progress-number {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
        font-size: 9px;
    }

    .progress-line {
        flex: 1 1 12px;
        min-width: 8px;
        max-width: 35px;
    }

    .cart-items-heading {
        margin-bottom: 16px;
    }

    .cart-items-heading h2 {
        font-size: 23px;
    }

    .cart-item {
        grid-template-columns: minmax(85px, 115px) minmax(0, 1fr);
        gap: 13px;
        padding: 12px;
    }

    .cart-item-content {
        padding: 3px 0;
    }

    .cart-item-top {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .cart-item-details {
        width: 100%;
    }

    .cart-item-details h3 {
        margin: 6px 0;
        font-size: 18px;
        line-height: 1.3;
    }

    .cart-product-label {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .cart-item-mass {
        font-size: 10px;
    }

    .cart-item-total {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 7px;
        text-align: left;
    }

    .cart-item-total .total-label {
        margin: 0;
        font-size: 9px;
    }

    .cart-item-total strong {
        font-size: 16px;
    }

    .cart-item-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
        padding-top: 11px;
    }

    .cart-item-actions {
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }

    .cart-list-footer {
        gap: 13px;
    }

    .cart-summary {
        padding: 26px 21px 23px;
    }

    .summary-top h2 {
        font-size: 27px;
    }

    .summary-total strong {
        font-size: 23px;
    }

    .empty-cart {
        padding: 48px 20px 52px;
    }

    .empty-cart-art {
        width: 95px;
        height: 95px;
    }

    .empty-cart-basket {
        font-size: 43px;
    }

    .empty-cart h2 {
        font-size: 29px;
    }

    .empty-cart p {
        font-size: 12px;
    }
}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 380px) {
    .cart-page {
        padding-right: 11px;
        padding-left: 11px;
    }

    .cart-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px;
        padding: 9px;
    }

    .cart-item-details h3 {
        font-size: 16px;
    }

    .cart-item-total strong {
        font-size: 14px;
    }

    .progress-step {
        gap: 4px;
        font-size: 8px;
    }

    .progress-number {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
    }

    .cart-list-footer {
        gap: 8px;
    }

    .back-to-shop {
        font-size: 10px;
    }

    .clear-cart-button {
        font-size: 10px;
    }

    .cart-summary {
        padding-right: 17px;
        padding-left: 17px;
    }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

.cart-page a:focus-visible,
.cart-page button:focus-visible {
    outline: 2px solid var(--cart-gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .cart-page *,
    .cart-page *::before,
    .cart-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
