/* ============================================================
   Curatery — Cart Page Styles v1.0
   blocksy-child/assets/css/cart.css
   ============================================================ */

:root {
    --mustard:   #D4A843;
    --brown:     #1E1A0E;
    --sand:      #EDE0D0;
    --ivory:     #FAF7F2;
    --muted:     #7A6248;
    --radius:    12px;
    --radius-sm: 8px;
}

body.woocommerce-cart {
    background: var(--ivory);
}

/* ── Page title ─────────────────────────────────────────────── */
body.woocommerce-cart .page-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--brown);
}

/* ── Cart wrapper layout ─────────────────────────────────────── */
body.woocommerce-cart .ct-woocommerce-cart-form {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 60px;
    box-sizing: border-box;
}

body.woocommerce-cart .woocommerce-cart-form {
    grid-column: 1;
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    overflow: hidden;
}

body.woocommerce-cart .cart_totals {
    grid-column: 2;
    position: sticky;
    top: 24px;
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    overflow: hidden;
}

/* ── Cart table ─────────────────────────────────────────────── */
body.woocommerce-cart table.shop_table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}

body.woocommerce-cart table.shop_table thead tr {
    background: var(--ivory);
    border-bottom: 1px solid var(--sand);
}

body.woocommerce-cart table.shop_table thead th {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 20px;
    text-align: left;
}

body.woocommerce-cart table.shop_table tbody td {
    padding: 20px;
    border-bottom: 1px solid var(--sand);
    vertical-align: middle;
    color: var(--brown);
}

body.woocommerce-cart table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Product thumbnail ──────────────────────────────────────── */
body.woocommerce-cart .product-thumbnail .ct-media-container {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
}

body.woocommerce-cart .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* ── Product name ───────────────────────────────────────────── */
body.woocommerce-cart .product-name {
    font-weight: 500;
    color: var(--brown);
}

body.woocommerce-cart .product-name .price {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
}

/* ── Quantity ───────────────────────────────────────────────── */
body.woocommerce-cart .product-quantity {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--brown);
}

/* ── Subtotal ───────────────────────────────────────────────── */
body.woocommerce-cart .product-subtotal {
    font-weight: 600;
    color: var(--brown);
}

/* ── Remove button ──────────────────────────────────────────── */
body.woocommerce-cart .product-remove a.remove {
    color: var(--muted) !important;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
}

body.woocommerce-cart .product-remove a.remove:hover {
    color: #c0392b !important;
    opacity: 1;
}

/* ── Actions row (coupon + update) ──────────────────────────── */
body.woocommerce-cart .actions {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--ivory);
    border-top: 1px solid var(--sand);
}

body.woocommerce-cart .actions .coupon {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

body.woocommerce-cart .actions .coupon input#coupon_code {
    border: 1.5px solid var(--sand);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--brown);
    background: #fff;
    outline: none;
    width: 180px;
    transition: border-color 0.2s;
}

body.woocommerce-cart .actions .coupon input#coupon_code:focus {
    border-color: var(--mustard);
}

body.woocommerce-cart .actions .coupon .button,
body.woocommerce-cart .actions .button[name="update_cart"] {
    background: transparent !important;
    border: 1.5px solid var(--sand) !important;
    color: var(--muted) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 9px 16px !important;
    border-radius: 100px !important;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

body.woocommerce-cart .actions .coupon .button:hover,
body.woocommerce-cart .actions .button[name="update_cart"]:hover {
    border-color: var(--mustard) !important;
    color: var(--brown) !important;
}

/* ── Cart totals ────────────────────────────────────────────── */
body.woocommerce-cart .cart_totals h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--brown);
    margin: 0;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--sand);
    background: var(--ivory);
}

body.woocommerce-cart .cart_totals .shop_table {
    margin: 0;
}

body.woocommerce-cart .cart_totals .shop_table tbody tr th,
body.woocommerce-cart .cart_totals .shop_table tbody tr td {
    padding: 14px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--brown);
    border-bottom: 1px solid var(--sand);
}

body.woocommerce-cart .cart_totals .shop_table .order-total th,
body.woocommerce-cart .cart_totals .shop_table .order-total td {
    font-weight: 700;
    font-size: 16px;
    border-bottom: none;
}

body.woocommerce-cart .cart_totals .shop_table .order-total .woocommerce-Price-amount {
    color: var(--mustard);
}

/* ── PayPal / payment buttons area ──────────────────────────── */
body.woocommerce-cart .wc-proceed-to-checkout {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    background: var(--mustard) !important;
    color: var(--brown) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 16px 24px !important;
    border-radius: 100px !important;
    border: none !important;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-sizing: border-box;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
    background: #c49a38 !important;
    transform: translateY(-1px);
}

body.woocommerce-cart .wc-ppcp-cart-payments__container {
    order: -1; /* show PayPal buttons above checkout button */
}

body.woocommerce-cart .wc-ppcp-cart-or {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin: 0;
}

/* ── Top row: upsell (left) | you might also like (right) ───── */
.curatery-cart-top {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 40px;
    box-sizing: border-box;
    align-items: start;
}

/* ── À la carte upsell card ─────────────────────────────────── */
.curatery-cart-upsell {
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.curatery-cart-upsell__icon {
    font-size: 22px;
    color: var(--mustard);
}

.curatery-cart-upsell__headline {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--brown);
    margin: 0 0 6px;
    line-height: 1.4;
}

.curatery-cart-upsell__sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.curatery-cart-upsell__cta {
    display: inline-block;
    background: var(--mustard);
    color: var(--brown);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 100px;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, transform 0.15s;
    margin-top: 4px;
}

.curatery-cart-upsell__cta:hover {
    background: #c49a38;
    transform: translateY(-1px);
}

/* ── You might also like section ────────────────────────────── */
.curatery-cart-related {
    /* sits in top row col 2 — no extra margin needed */
}

.curatery-cart-related__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--brown);
    margin: 0 0 16px;
}

.curatery-cart-related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ── Related good card ──────────────────────────────────────── */
.curatery-cart-good {
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}

.curatery-cart-good:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 26, 14, 0.08);
}

.curatery-cart-good__img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--ivory);
}

.curatery-cart-good__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.curatery-cart-good:hover .curatery-cart-good__img {
    transform: scale(1.04);
}

.curatery-cart-good__img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--ivory);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--mustard);
}

.curatery-cart-good__info {
    padding: 16px;
}

.curatery-cart-good__corner {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px;
}

.curatery-cart-good__name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--brown);
    margin: 0 0 8px;
    line-height: 1.4;
}

.curatery-cart-good__price {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--mustard);
    margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .curatery-cart-top {
        grid-template-columns: 1fr;
        padding: 0 24px;
        gap: 24px;
    }

    body.woocommerce-cart .ct-woocommerce-cart-form {
        grid-template-columns: 1fr;
        padding: 0 24px 40px;
    }

    body.woocommerce-cart .cart_totals {
        grid-column: 1;
        position: static;
    }

    .curatery-cart-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .curatery-cart-top {
        padding: 0 16px;
    }

    .curatery-cart-related__grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    body.woocommerce-cart .ct-woocommerce-cart-form {
        padding: 0 16px 32px;
    }
}

/* ── Guarantees inside upsell card ──────────────────────────── */
.curatery-cart-guarantees {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
    padding-top: 20px;
    border-top: 1px solid var(--sand);
}

.curatery-cart-guarantee {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.curatery-cart-guarantee__icon {
    font-size: 14px;
    color: var(--mustard);
    flex-shrink: 0;
    margin-top: 2px;
    width: 20px;
    text-align: center;
}

.curatery-cart-guarantee__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--brown);
    margin: 0 0 3px;
}

.curatery-cart-guarantee__desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}
