/* ===========================
   GLOBAL
=========================== */
.cart-section {
    padding: 50px 0;
    font-family: "Poppins", sans-serif;
}

.shoppingcart-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 35px;
}

/* ===========================
   MAIN LAYOUT
=========================== */
.cart-wrapper {
    display: flex;
    gap: 35px;
}

/* ===========================
   LEFT CART TABLE
=========================== */
/* ===========================
   LEFT CART TABLE — PERFECT MATCH
=========================== */
.cart-table {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

/* HEADER */
.cart-header-row {
    display: grid;
    grid-template-columns:
        1.6fr
        /* Product */
        0.7fr
        /* Price */
        1fr
        /* Quantity */
        0.7fr
        /* Subtotal */
        40px;
    /* Remove */
    padding: 18px 25px;
    font-size: 15px;
    font-weight: 600;
    color: #777;
    border-bottom: 1px solid #e5e5e5;
    text-transform: uppercase;
}

/* ROW */
.cart-row {
    display: grid;
    grid-template-columns: 1.6fr 0.6fr 1.2fr 0.7fr 40px;
    padding: 22px 25px;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
}

/* PRODUCT IMAGE + NAME */
.cart-product {
    display: flex;
    align-items: center;
    gap: 18px;
}

.cart-product img {
    width: 85px;
    height: auto;
}

.cart-product p {
    font-size: 16px;
    font-weight: 400;
}

/* PRICE & SUBTOTAL */
.cart-price,
.cart-subtotal {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

/* QUANTITY BOX */
.cart-qty-box {
    background: #f5f5f5;
    border-radius: 40px;
    padding: 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    max-width: 136px;
}

.cart-qty-box button {
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-box span {
    font-size: 17px;
    font-weight: 500;
}

/* REMOVE BUTTON */
.cart-remove {
    background: none;
    border: none;
    font-size: 22px;
    color: #777;
    cursor: pointer;
}

/* ===========================
   BOTTOM BUTTON ROW
=========================== */
.cart-bottom {
    padding: 22px 25px;
    display: flex;
    justify-content: space-between;
    background: #fff;
}

.return-btn,
.update-btn {
    padding: 14px 26px;
    background: #f2f2f2;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.return-btn {
    color: #333;
}

.update-btn {
    color: #222;
}


/* ===========================
   RIGHT SIDEBAR (CART TOTAL)
=========================== */
.cart-summary {
    width: 360px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px 28px;
    box-sizing: border-box;
}

.cart-summary h3 {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 22px;
}

.cart-summary .summary-line {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

span.summary-title-top {
    color: #1A1A1A;
    font-weight: 400;
    font-size: 15px;
}

span.summary-title-bottom-price {
    color: #1A1A1A;
    font-weight: 500;
    font-size: 15px;
}

.cart-summary .summary-line:last-child {
    border-bottom: none;
}

.summary-line.total strong {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.checkout-btn {
    margin-top: 22px;
    width: 100%;
    padding: 12px 0;
    background: #11c219;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
}

/* ===========================
   CART LAYOUT FIX
=========================== */

.cart-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 35px;
}

.cart-left {
    width: 100%;
    max-width: calc(100% - 360px - 35px);
}

.cart-summary {
    width: 360px;
    flex-shrink: 0;
}

/* ===========================
   MANUAL COUPON BOX (LEFT)
=========================== */

.coupon-box {
    margin-top: 25px;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    background: #fff;
}

.coupon-box label {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.coupon-row {
    display: flex;
    gap: 15px;
}

.coupon-row input {
    flex: 1;
    padding: 15px 20px;
    border-radius: 40px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.coupon-btn {
    background: #222;
    color: #fff;
    padding: 15px 32px;
    border-radius: 40px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

/* ===========================
   LIVE COUPON POPUP (LEFT)
=========================== */

.coupon-popup {
    width: 100%;
    max-width: 380px;
    background: linear-gradient(135deg, #e8fff3 0%, #c8fadd 100%);
    border: 1px solid #0db760;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(13, 183, 96, 0.12);
    margin-top: 25px;
    margin-bottom: 15px;
    animation: slideIn .5s ease-out;
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-header ion-icon {
    font-size: 28px;
    color: #0db760;
}

.coupon-header h4 {
    font-size: 20px;
    font-weight: 700;
    color: #00b207;
}

.coupon-desc {
    margin: 10px 0;
    font-size: 15px;
    color: #333;
}

.coupon-code-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px dashed #0db760;
    padding: 8px 10px;
    border-radius: 10px;
    justify-content: space-between;
}

.coupon-code-box span {
    font-size: 18px;
    font-weight: 700;
    color: #07b207;
    letter-spacing: 2px;
    animation: glowPulse 1.8s infinite;
}

#ecoCopyCouponBtn {
    background: #07b207;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    position: relative;
    overflow: hidden;
}

#ecoCopyCouponBtn::after {
    content: "";
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -120%;
    background: rgba(255, 255, 255, 0.4);
    transform: skewX(-20deg);
    transition: .5s;
}

#ecoCopyCouponBtn:hover::after {
    left: 120%;
}

.coupon-note {
    margin-top: 8px;
    font-size: 12px;
    color: #555;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glowPulse {
    0% {
        text-shadow: 0 0 0px #0db760;
    }

    50% {
        text-shadow: 0 0 12px #0db760;
    }

    100% {
        text-shadow: 0 0 0px #0db760;
    }
}

/* ===========================
   SUCCESS TOAST POPUP
=========================== */

.eco-toast {
    position: fixed;
    right: 20px;
    top: 20px;
    background: #00b207;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all .3s ease-out;
    z-index: 9999;
}

.eco-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 992px) {
    .cart-wrapper {
        flex-direction: column;
        gap: 25px;
    }

    .cart-left {
        max-width: 100%;
    }

    .cart-summary {
        width: 100%;
        max-width: 420px;
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .cart-table {
        overflow-x: auto;
        border-radius: 10px;
    }

    .cart-header-row,
    .cart-row {
        min-width: 720px;
        padding: 14px 16px;
    }

    .coupon-box {
        max-width: 100%;
        padding: 20px 18px;
    }

    .coupon-row {
        flex-direction: column;
    }

    .coupon-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .cart-header-row,
    .cart-row {
        min-width: 640px;
        padding: 12px 14px;
    }

    .coupon-row input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .coupon-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .return-btn,
    .update-btn {
        font-size: 14px;
    }

    .shoppingcart-title {
        font-size: 24px;
    }
}