
/* =========================================================
   MARTISH THEME - CART PAGE STYLES
   ========================================================= */

/* ---------------------------------------------------------
   PAGE HERO / BREADCRUMB
--------------------------------------------------------- */
.martish-page-hero {
    background-color: #f5f0e8;
    /* swap for: background-image: url('../images/cart-hero-bg.jpg'); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    padding: 20px 20px;
    position: relative;
}

.martish-page-hero-title {
    font-weight: 800;
    font-size: 48px;
    color: #1c1c1c;
    margin: 0 0 12px;
    line-height: 1.2;
}

.martish-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14.5px;
    color: #8a8a8a;
}

.martish-breadcrumb a {
    color: #8a8a8a;
}

.martish-breadcrumb a:hover {
    color: var(--martish-orange, #f8a51b);
}

.martish-breadcrumb-sep {
    font-size: 16px;
    line-height: 1;
}

.martish-breadcrumb span:last-child {
    color: #1c1c1c;
}


/* ---------------------------------------------------------
   CART SECTION WRAPPER
--------------------------------------------------------- */
.martish-cart-section {
    padding: 50px 0 70px;
}

.martish-cart-section .container {
    max-width: 1320px;
}

.martish-cart-row {
    row-gap: 36px;
    align-items: flex-start;
}


/* ---------------------------------------------------------
   CART TABLE
--------------------------------------------------------- */
.martish-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

/* Column headers */
.martish-cart-table thead tr {
    border-bottom: 1.5px solid #e8e8e8;
}

.martish-cart-table thead th {
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a8a8a;
    padding: 0 16px 16px;
    text-align: left;
}

.martish-cart-table thead .col-remove,
.martish-cart-table thead .col-thumb {
    width: 24px;
    padding-left: 0;
    padding-right: 0;
}

.martish-cart-table thead .col-price,
.martish-cart-table thead .col-qty,
.martish-cart-table thead .col-subtotal {
    text-align: center;
}

/* Cart rows */
.martish-cart-item {
    border-bottom: 1px solid #f0f0f0;
}

.martish-cart-item td {
    padding: 22px 16px;
    vertical-align: middle;
}

.martish-cart-item .col-remove {
    width: 28px;
    padding-left: 0;
    padding-right: 8px;
}

.martish-cart-item .col-thumb {
    width: 80px;
    padding-right: 0;
}

.martish-cart-item .col-price,
.martish-cart-item .col-qty,
.martish-cart-item .col-subtotal {
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #1c1c1c;
}

.martish-cart-item .col-subtotal {
    font-weight: 800;
}

/* Remove button */
.martish-cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c0c0c0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #e0e0e0;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.martish-cart-remove:hover {
    color: #e53935;
    border-color: #e53935;
}

/* Product thumbnail */
.col-thumb img {
    display: block;
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    background-color: #f5f0e8;
}

/* Product name */
.col-product {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1c;
    min-width: 160px;
}

.col-product a {
    color: #1c1c1c;
}

.col-product a:hover {
    color: var(--martish-orange, #f8a51b);
}

.col-product .variation {
    font-size: 13px;
    color: #8a8a8a;
    font-weight: 500;
    margin-top: 4px;
}

/* Quantity input */
.col-qty .quantity {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 90px;
}

.col-qty .quantity input.qty {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 4px;
    background: transparent;
    -moz-appearance: textfield;
}

.col-qty .quantity input.qty::-webkit-outer-spin-button,
.col-qty .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
}


/* ---------------------------------------------------------
   COUPON + UPDATE CART ROW
--------------------------------------------------------- */
.martish-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 10px;
}

.martish-coupon {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.martish-coupon-input {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 13px 18px;
    font-size: 14.5px;
    color: #1c1c1c;
    min-width: 220px;
    background-color: #ffffff;
}

.martish-coupon-input::placeholder {
    color: #b0b0b0;
}

.martish-coupon-input:focus {
    outline: none;
    border-color: var(--martish-orange, #f8a51b);
}

/* Shared button base */
.martish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    white-space: nowrap;
}

.martish-btn:hover {
    transform: translateY(-2px);
}

.martish-btn-primary {
    background-color: var(--martish-orange, #f8a51b);
    color: #1c1c1c;
}

.martish-btn-primary:hover {
    background-color: #e0940e;
    color: #1c1c1c;
}

.martish-btn-outline {
    background-color: transparent;
    color: #8a8a8a;
    border: 1.5px solid #e0e0e0;
}

.martish-btn-outline:hover {
    border-color: var(--martish-orange, #f8a51b);
    color: var(--martish-orange, #f8a51b);
}


/* ---------------------------------------------------------
   CART TOTALS BOX (right column)
--------------------------------------------------------- */
.martish-cart-totals-box {
    border: 1.5px solid #e0e0e0;
    border-radius: 14px;
    padding: 28px 26px;
    background-color: #ffffff;
    position: sticky;
    top: 100px;
}

.martish-cart-totals-title {
    font-weight: 800;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1c1c1c;
    margin: 0 0 18px;
}

.martish-totals-divider {
    border: none;
    border-top: 1.5px solid #e8e8e8;
    margin: 0 0 18px;
}

/* WooCommerce cart_totals table */
.cart_totals table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
}

.cart_totals table.shop_table th,
.cart_totals table.shop_table td {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.cart_totals table.shop_table th {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1c;
    text-align: left;
    width: 45%;
}

.cart_totals table.shop_table td {
    font-size: 14.5px;
    color: #6a6a6a;
    text-align: right;
}

/* Subtotal row */
.cart_totals tr.cart-subtotal td {
    font-weight: 700;
    color: #1c1c1c;
}

/* Shipping row */
.cart_totals tr.shipping td {
    font-size: 13.5px;
    color: #9a9a9a;
    line-height: 1.5;
}

/* Total row */
.cart_totals tr.order-total th,
.cart_totals tr.order-total td {
    font-size: 17px;
    font-weight: 800;
    border-bottom: none;
    padding-top: 18px;
}

.cart_totals tr.order-total td {
    color: var(--martish-orange, #f8a51b);
}

/* Proceed to checkout */
.cart_totals .wc-proceed-to-checkout {
    margin-top: 18px;
}

.cart_totals .wc-proceed-to-checkout a.checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--martish-orange, #f8a51b);
    color: #1c1c1c;
    font-weight: 800;
    font-size: 13.5px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 16px 24px;
    border-radius: 10px;
    transition: background-color 0.25s ease, transform 0.2s ease;
}

.cart_totals .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #e0940e;
    transform: translateY(-2px);
}

/* Coupon discount row */
.cart_totals tr.cart-discount td,
.cart_totals tr.cart-discount th {
    color: var(--martish-green-dark, #4caf50);
}

.cart_totals tr.cart-discount a.woocommerce-remove-coupon {
    color: #e53935;
    font-size: 12px;
    margin-left: 6px;
}


/* ---------------------------------------------------------
   EMPTY CART
--------------------------------------------------------- */
.woocommerce-cart .cart-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #8a8a8a;
}

.woocommerce-cart .return-to-shop {
    text-align: center;
    margin-top: 20px;
}

.woocommerce-cart .return-to-shop .button {
    display: inline-flex;
    align-items: center;
    background-color: var(--martish-orange, #f8a51b);
    color: #1c1c1c;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: 8px;
}

.woocommerce-cart .return-to-shop .button:hover {
    background-color: #e0940e;
}


/* ---------------------------------------------------------
   NOTICES
--------------------------------------------------------- */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14.5px;
    font-weight: 600;
    list-style: none;
}

.woocommerce-notices-wrapper .woocommerce-message {
    background-color: #edfbe8;
    border-left: 4px solid var(--martish-green-dark, #4caf50);
    color: #2e7d32;
}

.woocommerce-notices-wrapper .woocommerce-error {
    background-color: #fdecea;
    border-left: 4px solid #e53935;
    color: #b71c1c;
}

.woocommerce-notices-wrapper .woocommerce-info {
    background-color: #fff8e1;
    border-left: 4px solid var(--martish-orange, #f8a51b);
    color: #6a4c00;
}


/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 991.98px) {
    .martish-cart-totals-box {
        position: static;
    }

    .martish-page-hero-title {
        font-size: 36px;
    }
}

@media (max-width: 767.98px) {
    /* Stack table as card layout on mobile */
    .martish-cart-table,
    .martish-cart-table thead,
    .martish-cart-table tbody,
    .martish-cart-table th,
    .martish-cart-table td,
    .martish-cart-table tr {
        display: block;
    }

    .martish-cart-table thead {
        display: none;
    }

    .martish-cart-item {
        display: grid;
        grid-template-columns: 28px 72px 1fr;
        grid-template-areas:
            "remove thumb name"
            ". . price"
            ". . qty"
            ". . subtotal";
        gap: 6px 12px;
        padding: 18px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .martish-cart-item td {
        padding: 2px 0;
    }

    .martish-cart-item .col-remove   { grid-area: remove; align-self: start; padding-top: 6px; }
    .martish-cart-item .col-thumb    { grid-area: thumb; }
    .martish-cart-item .col-product  { grid-area: name; }
    .martish-cart-item .col-price    { grid-area: price; text-align: left; }
    .martish-cart-item .col-qty      { grid-area: qty; text-align: left; }
    .martish-cart-item .col-subtotal { grid-area: subtotal; text-align: left; font-weight: 800; }

    .martish-cart-item .col-price::before    { content: attr(data-title) ': '; color: #8a8a8a; font-size: 12px; }
    .martish-cart-item .col-qty::before      { content: attr(data-title) ': '; color: #8a8a8a; font-size: 12px; }
    .martish-cart-item .col-subtotal::before { content: attr(data-title) ': '; color: #8a8a8a; font-size: 12px; }

    .martish-cart-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .martish-coupon {
        flex-direction: column;
    }

    .martish-coupon-input {
        width: 100%;
        min-width: 0;
    }

    .martish-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .martish-page-hero {
        padding: 40px 16px;
    }

    .martish-page-hero-title {
        font-size: 30px;
    }

    .martish-cart-section {
        padding: 30px 0 50px;
    }
}