/* ==========================================================================
   Modern Shopping Cart Stylesheet - Made in Andhra Portal
   ========================================================================== */

/* 1. Global Page Wrapper & Footer Alignment */
.app-wrapper {
    height: auto !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cart-page-wrapper {
    flex: 1 0 auto;
    width: 100%;
    background-color: #f8fafc;
    padding-bottom: 50px;
}



/* 2. Breadcrumbs */
.cart-breadcrumb-wrap {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
}

.cart-breadcrumb-container {
    max-width: 1140px;
    margin: 0 auto;
}

.cart-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.cart-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-breadcrumb a:hover {
    color: #064e3b;
}

.cart-breadcrumb .sep {
    color: #cbd5e1;
    font-size: 11px;
}

.cart-breadcrumb .current {
    color: #0f172a;
    font-weight: 600;
}

/* 3. Main Cart Container */
.cart-main-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 28px 16px;
}

/* Header Row */
.cart-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.cart-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.cart-count-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.cart-clear-all-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.cart-clear-all-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* 4. Cart Layout Grid */
.cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

@media (max-width: 991px) {
    .cart-layout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* 5. Left Column: Cart Items List */
.cart-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Individual Cart Item Card */
.cart-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.cart-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cart-item-card.removing {
    opacity: 0;
    transform: translateX(30px);
}

/* Product Thumbnail */
.cart-item-img-link {
    width: 96px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
    display: block;
}

.cart-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item-img-link:hover .cart-item-img {
    transform: scale(1.05);
}

/* Middle Content: Info & Controls */
.cart-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cart-item-title-wrap {
    min-width: 0;
}

.cart-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-item-title a:hover {
    color: #064e3b;
}

.cart-item-price {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

/* Bottom Controls Row: Stepper on left, Subtotal on right */
.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Clean Quantity Stepper */
.cart-qty-stepper {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px;
    user-select: none;
}

.cart-stepper-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #ffffff;
    border-radius: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cart-stepper-btn:hover:not(:disabled) {
    background: #064e3b;
    color: #ffffff;
}

.cart-stepper-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cart-stepper-val {
    width: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    border: none;
    background: transparent;
    pointer-events: none;
}

/* Subtotal Display */
.cart-item-subtotal-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.cart-item-subtotal-text {
    font-size: 13px;
    color: #64748b;
}

.cart-item-subtotal-price {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

/* Remove Button */
.cart-item-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 17px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-item-remove-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Bottom Actions Under List */
.cart-bottom-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #064e3b;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-continue-shopping:hover {
    background: #ecfdf5;
    border-color: #064e3b;
    color: #064e3b;
}

/* 6. Right Column: Order Summary */
.order-summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    padding: 24px;
    position: sticky;
    top: 90px;
}

.summary-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.summary-rows-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.summary-line-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    color: #475569;
}

.summary-line-label {
    font-weight: 500;
}

.summary-line-value {
    font-weight: 600;
    color: #0f172a;
}

.summary-hr {
    height: 1px;
    background: #e2e8f0;
    margin: 6px 0;
}

.summary-line-item.total-line {
    font-size: 17px;
    color: #0f172a;
}

.summary-line-item.total-line .summary-line-label {
    font-weight: 700;
}

.summary-total-val {
    font-size: 22px;
    font-weight: 800;
    color: #064e3b;
}

/* Checkout Button */
.btn-proceed-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #064e3b;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-proceed-checkout:hover {
    background: #047857;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.25);
}

/* 7. Empty Cart State */
.cart-empty-panel {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    padding: 60px 24px;
    text-align: center;
    max-width: 520px;
    margin: 40px auto;
}

.cart-empty-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #ecfdf5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #064e3b;
    font-size: 38px;
}

.cart-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.cart-empty-desc {
    font-size: 14px;
    color: #64748b;
    max-width: 380px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

.cart-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #064e3b;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cart-empty-cta:hover {
    background: #047857;
    color: #ffffff;
}

/* 8. Toast Feedback */
.cart-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.cart-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-toast i {
    color: #10b981;
    font-size: 17px;
}

/* 9. Mobile Responsive Layout */
@media (max-width: 767px) {
    .cart-main-container {
        padding: 20px 14px;
    }

    .cart-page-title {
        font-size: 19px;
    }

    .cart-item-card {
        padding: 14px;
        gap: 14px;
        align-items: flex-start;
    }

    .cart-item-img-link {
        width: 76px;
        height: 76px;
    }

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

    .cart-item-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .cart-item-subtotal-price {
        font-size: 15px;
    }

    .order-summary-card {
        padding: 18px;
        top: 20px;
    }

    .cart-toast {
        bottom: 85px;
        left: 16px;
        right: 16px;
        justify-content: center;
    }
}
