/* ============================================
   Cart Page - Production Ready (Fully Responsive)
============================================ */

.cart-page {
    background: #f8fafc;
    min-height: 60vh;
    padding: 50px 0;
}

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== টাইটেল ========== */
.cart-title {
    font-size: 28px;
    font-weight: 700;
    color: #017e3d;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #017e3d;
}

/* ========== গ্রিড লেআউট ========== */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
}

/* ========== বাম পাশ: প্রোডাক্ট লিস্ট ========== */
.cart-products {
    background: #ffffff;
    border-radius: 5px;
    border: 1px solid #eef2f6;
    overflow: hidden;
}

/* লেবেল সেকশন */
.cart-item-labels {
    display: grid;
    grid-template-columns: 100px 1fr 130px 120px 60px;
    align-items: center;
    background: #017e3d;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* কার্ট আইটেম */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 130px 120px 60px;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eef2f6;
    transition: background 0.2s;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background: #fafcff;
}

/* ইমেজ */
.cart-item-img {
    width: 60px;
    height: 60px;
    background: #f8fafc;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

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

/* তথ্য */
.product-title-link {
    text-decoration: none;
    color: inherit;
}

.product-title-link:hover h4 {
    color: #00A65A;
    transition: color 0.2s ease;
}

.cart-item-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #1e293b;
}

.cart-item-info .item-price {
    font-size: 14px;
    font-weight: 600;
    color: #00A65A;
    margin: 0;
}

/* কোয়ান্টিটি */
.quantity-box {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: fit-content;
}

.qty-minus, .qty-plus {
    width: 32px;
    height: 34px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.qty-minus:hover, .qty-plus:hover {
    background: #00A65A;
    color: white;
}

.qty-input {
    width: 45px;
    height: 34px;
    text-align: center;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 500;
}

/* টোটাল */
.cart-item-total {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #1e293b;
}

/* রিমুভ */
.cart-item-remove {
    text-align: center;
}

.remove-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    border-radius: 6px;
    cursor: pointer;
    color: #ef4444;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
}

/* ========== ডান পাশ: কার্ট টোটাল ========== */
.cart-summary {
    background: #ffffff;
    border-radius: 5px;
    padding: 24px;
    border: 1px solid #eef2f6;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f6;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 15px;
    color: #64748b;
}

.summary-row.total {
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid #eef2f6;
    font-weight: 700;
    font-size: 18px;
    color: #1e293b;
}

.summary-row.total span:last-child {
    color: #00A65A;
    font-size: 22px;
}

/* ========== কুপন সেকশন ========== */
.coupon-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef2f6;
}

.coupon-section p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.coupon-box {
    display: flex;
    gap: 8px;
}

.coupon-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    transition: all 0.2s;
}

.coupon-box input:focus {
    outline: none;
    border-color: #00A65A;
}

.coupon-box button {
    padding: 10px 18px;
    background: #f1f5f9;
    color: #1e293b;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.coupon-box button:hover {
    background: #00A65A;
    color: #fff;
}

#couponMessage {
    font-size: 12px;
    margin-top: 8px;
}

/* ========== অর্ডার নোট ========== */
.order-note {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eef2f6;
}

.order-note h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-note textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s;
}

.order-note textarea:focus {
    outline: none;
    border-color: #00A65A;
}

/* ========== কার্ট অ্যাকশন বাটন ========== */
.cart-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-continue-shopping, .btn-clear-cart {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-continue-shopping {
    background: #f1f5f9;
    color: #1e293b;
    border: none;
}

.btn-continue-shopping:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-clear-cart {
    background: #fee2e2;
    color: #ef4444;
    border: none;
}

.btn-clear-cart:hover {
    background: #ef4444;
    color: white;
}

/* ========== চেকআউট বাটন ========== */
.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #00A65A;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.2s;
}

.btn-checkout:hover {
    background: #008D4C;
    transform: translateY(-1px);
}

/* ========== খালি কার্ট ========== */
.empty-cart {
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eef2f6;
}

.empty-cart i {
    font-size: 60px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
}

.empty-cart p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 25px;
}

.btn-shop {
    display: inline-block;
    padding: 12px 30px;
    background: #00A65A;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn-shop:hover {
    background: #008D4C;
    transform: translateY(-1px);
}

/* ========== রেস্পন্সিভ ========== */

/* ট্যাবলেট (992px পর্যন্ত) */
@media (max-width: 992px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .cart-summary {
        position: static;
        max-width: 100%;
        margin: 0;
    }
    .cart-title {
        font-size: 24px;
    }
}

/* মোবাইল (768px পর্যন্ত) */
@media (max-width: 768px) {
    .cart-page {
        padding: 30px 0;
    }
    .cart-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    /* লেবেল লুকান */
    .cart-item-labels {
        display: none;
    }

    /* আধুনিক কার্ড ভিউতে রূপান্তর (গ্রিড লেআউট) */
    .cart-item {
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto auto;
        gap: 8px 16px;
        padding: 16px;
        margin-bottom: 12px;
        border: 1px solid #eef2f6;
        border-radius: 12px;
        background: #fff;
        align-items: start;
        position: relative;
        box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    }

    /* ইমেজ লেফট এলাইন */
    .cart-item-img {
        grid-column: 1;
        grid-row: 1 / span 3;
        width: 80px;
        height: 80px;
        margin: 0;
    }

    /* তথ্য লেফট এলাইন */
    .cart-item-info {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
        margin-bottom: 0;
        padding-right: 32px; /* ট্র্যাশ আইকনের জন্য খালি জায়গা */
    }

    .cart-item-info h4 {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .cart-item-info .item-price {
        font-size: 15px;
        color: #00A65A;
        font-weight: 700;
    }

    /* কোয়ান্টিটি লেফট এলাইন */
    .cart-item-quantity {
        grid-column: 2;
        grid-row: 2;
        display: block;
        width: auto;
        text-align: left;
        margin-top: 0;
    }

    /* কোয়ান্টিটি বক্স */
    .quantity-box {
        margin: 0;
        width: fit-content;
    }

    /* মোট টাকা নিচে */
    .cart-item-total {
        grid-column: 2;
        grid-row: 3;
        display: block;
        width: auto;
        text-align: left;
        margin-top: 4px;
        font-size: 15px;
        font-weight: 700;
    }

    /* মোট লেবেল */
    .cart-item-total::before {
        content: "মোট: ";
        display: inline;
        font-size: 12px;
        color: #64748b;
        font-weight: normal;
    }

    /* রিমুভ বোতাম টপ রাইট */
    .cart-item-remove {
        position: absolute;
        top: 16px;
        right: 16px;
        margin: 0;
        display: block;
        width: auto;
    }

    /* সাইডবার */
    .cart-summary {
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }

    .summary-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .summary-row.total span:last-child {
        font-size: 20px;
    }

    /* কুপন সেকশন */
    .coupon-box {
        flex-direction: row;
        gap: 8px;
    }

    .coupon-box button {
        width: auto;
    }

    /* কার্ট অ্যাকশন বাটন পাশাপাশি */
    .cart-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .btn-continue-shopping, .btn-clear-cart {
        width: 100%;
        margin: 0;
    }
}

/* ছোট মোবাইল (480px পর্যন্ত) */
@media (max-width: 480px) {
    .cart-page {
        padding: 20px 0;
    }

    .container-custom {
        padding: 0 15px;
    }

    .cart-title {
        font-size: 18px;
    }

    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 6px 12px;
        padding: 12px;
    }

    .cart-item-img {
        width: 70px;
        height: 70px;
        grid-row: 1 / span 3;
    }

    .cart-item-info h4 {
        font-size: 13px;
    }

    .qty-minus, .qty-plus {
        width: 28px;
        height: 30px;
        font-size: 14px;
    }

    .qty-input {
        width: 38px;
        height: 30px;
        font-size: 13px;
    }

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

    .cart-summary {
        padding: 15px;
    }

    .summary-row {
        padding: 8px 0;
        font-size: 13px;
    }

    .summary-row.total span:last-child {
        font-size: 18px;
    }

    .coupon-section p {
        font-size: 12px;
    }

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

    .coupon-box button {
        width: 100%;
    }

    .coupon-box input {
        padding: 8px 12px;
        font-size: 12px;
    }

    .coupon-box button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .btn-checkout {
        padding: 12px;
        font-size: 14px;
    }

    /* ছোট মোবাইলে বাটন ওপরে নিচে স্ট্যাক হবে */
    .cart-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .btn-continue-shopping, .btn-clear-cart {
        padding: 8px;
        font-size: 12px;
    }

    .empty-cart {
        padding: 40px 20px;
    }

    .empty-cart i {
        font-size: 48px;
    }

    .empty-cart h3 {
        font-size: 18px;
    }

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

    .btn-shop {
        padding: 10px 20px;
        font-size: 13px;
    }
}



