/* ================================================
   CART PAGE STYLES
   ================================================ */

.cart-main {
    padding: 100px 0;
    background-color: #fcfcf9;
}

.page-heading {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    color: var(--color-text-dark);
    /* margin: clamp(30px, 17vw, 100px) 0 0; */
    letter-spacing: -0.02em;
}
.woocommerce-message{    position: absolute;padding-top: 60px;padding-left: 34px;font-size: 20px;
}
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 50px;
    align-items: start;
    transition: var(--transition);
}

/* LEFT COLUMN: PRODUCTS */
.cart-table-header {
    display: grid;
    grid-template-columns: 1fr 150px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.cart-table-header div {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #888;
}

.header-total {
    text-align: right;
}

/* Updated .cart-item for full page scalability */
.cart-page .cart-item {
    display: grid !important;
    grid-template-columns: 1fr 150px;
    align-items: flex-start;
    gap: 30px;
    padding: 40px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-page .cart-item-info-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.cart-page .cart-item-img {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.cart-page .cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.cart-page .cart-item-details h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
}

.cart-page .cart-item-details p {
    margin: 10px 0 20px;
    font-size: 0.95rem;
    opacity: 0.7;
    max-width: 450px;
    line-height: 1.6;
}

.cart-page .item-total-price {
    text-align: right;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    margin-top: 0;
}

/* RIGHT COLUMN: TOTALS */
.totals-card {
    background: white;
    padding: 40px;
    border-radius: 28px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f1f1;
    position: sticky;
    top: 120px;
}

.totals-card h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #111;
}

/* ACCORDION (COUPON) */
.coupon-section {
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 700;
    color: #444;
    transition: all 0.3s ease;
}

.accordion-trigger svg {
    transition: transform 0.3s ease;
}

.coupon-section.active .accordion-trigger svg {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
    background: #fafafa;
}

.coupon-section.active .accordion-content {
    max-height: 200px;
    transition: max-height 0.4s ease-in-out;
}

.coupon-input-group {
    padding: 24px;
    display: flex;
    gap: 12px;
}

.coupon-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.coupon-input-group input:focus {
    border-color: #486e04;
}

.btn-checkout-large {
    width: 100%;
    padding: 22px;
    background: #486e04;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    box-shadow: 0 10px 20px rgba(72, 110, 4, 0.2);
}

.btn-checkout-large:hover {
    background: #3a5903;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(72, 110, 4, 0.3);
}

.btn-checkout-large:active {
    transform: translateY(-1px);
}

.btn-apply {
    background: black;
    color: white;
    padding: 0 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-apply:hover {
    background: #333;
    transform: scale(1.05);
}

/* TOTALS ROWS */
.totals-rows {
    border-top: 1px solid #f0f0f0;
    padding-top: 30px;
    margin-top: 30px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.grand-total {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #111;
}

.grand-total span {
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    color: #000 !important;
}

/* RESPONSIVE QUERIES */

@media (max-width: 1280px) {
    .cart-grid {
        gap: 30px;
        grid-template-columns: 1fr 380px;
    }
}

@media (max-width: 1024px) {
    .cart-main {
        padding: 80px 0;
    }

    .cart-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .totals-card {
        position: static;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .cart-main {
        padding: 60px 0;
    }

    .cart-table-header {
        display: none;
    }

    .cart-page .cart-item {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 30px 0;
        position: relative;
    }

    .cart-page .cart-item-info-wrapper {
        flex-direction: row;
        /* Keep image side-by-side if possible, stack if very small */
        align-items: center;
        gap: 20px;
    }

    .cart-page .cart-item-img {
        width: 100px;
        height: 100px;
    }

    .cart-page .cart-item-details h4 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .cart-page .cart-item-details p {
        font-size: 0.85rem;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cart-page .item-total-price {
        text-align: right;
        font-size: 1.25rem;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    /* Mobile specific adjustment for totals */
    .totals-card {
        padding: 35px 25px;
        border-radius: 24px;
        width: 100%;
        max-width: none;
    }

    .btn-checkout-large {
        padding: 18px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .cart-page .cart-item-info-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cart-page .cart-item-img {
        width: 100%;
        height: 180px;
    }

    .cart-page .cart-item-img img {
        border-radius: 16px;
    }

    .cart-page .item-total-price {
        width: 100%;
        text-align: left;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
    }

    .coupon-input-group {
        flex-direction: column;
        padding: 15px;
    }

    .btn-apply {
        padding: 14px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cart-main {
        padding: 40px 0;
    }

    .totals-card {
        padding: 25px 15px;
    }

    .grand-total span {
        font-size: 1.4rem !important;
    }
}