/* ============================================================
   FarmersBD — Cart Page UI Redesign (Pixel-Perfect Match)
   ============================================================ */

/* Hero Banner */
.cart-hero-banner {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    min-height: 185px;
    display: flex;
    align-items: center;
    position: relative;
    padding: 2.2rem 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(14, 165, 233, 0.12);
}

.cart-hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%23f0f9ff" fill-opacity="0.5" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    pointer-events: none;
    z-index: 1;
}

.cart-hero-banner .container {
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.cart-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.85rem;
    font-size: 0.86rem;
    font-weight: 500;
}
.cart-breadcrumb .breadcrumb-item a {
    color: #0284c7;
    text-decoration: none;
    transition: color 0.2s;
}
.cart-breadcrumb .breadcrumb-item a:hover {
    color: #0369a1;
    text-decoration: underline;
}
.cart-breadcrumb .breadcrumb-item.active {
    color: #64748b;
}
.cart-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 0 0.45rem;
}

/* Hero Content */
.cart-hero-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.cart-hero-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}
.cart-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0b3c66;
    margin-bottom: 0.3rem;
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.cart-hero-sub {
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 0;
    line-height: 1.55;
    font-weight: 500;
}

/* Cart Page Wrapper */
.cart-page-wrapper {
    background: #f4f8fb;
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 65vh;
    padding: 2.8rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

/* Left Table Card */
.cart-table-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    padding: 1.6rem 2rem;
}

.cart-ui-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.cart-ui-table th {
    padding: 0.6rem 0.8rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}
.cart-ui-table td {
    padding: 1.4rem 0.8rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.cart-ui-table tr:last-child td {
    border-bottom: none;
}

/* Product Cell */
.cart-prod-cell {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}
.cart-prod-img {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    flex-shrink: 0;
}
.cart-prod-info h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.2rem;
}
.cart-prod-info h4 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}
.cart-prod-info h4 a:hover {
    color: #0284c7;
}
.cart-prod-info p {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}
.badge-fresh-ui {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Price Cell */
.cart-price-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.15rem;
}
.cart-price-unit {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 500;
}

/* Quantity Stepper */
.cart-stepper {
    background: #f0f7fd;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.4rem;
    height: 36px;
    border: 1px solid #e0f0fc;
}
.cart-stepper-btn {
    background: transparent;
    border: none;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0284c7;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.cart-stepper-btn.decrease {
    color: #64748b;
}
.cart-stepper-btn:hover {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}
.cart-stepper-input {
    width: 38px;
    background: transparent;
    border: none;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0f172a;
    -moz-appearance: textfield;
}
.cart-stepper-input::-webkit-outer-spin-button,
.cart-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Total Cell */
.cart-item-total {
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
}

/* Delete Action Button */
.cart-btn-delete {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}
.cart-btn-delete:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: scale(1.05);
}

/* Continue Shopping Link */
.cart-continue-link {
    color: #0f766e;
    background: #f0fdf4;
    border: 1px solid #14b8a6;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}
.cart-continue-link:hover {
    background: #14b8a6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

/* Right Column: Order Summary Card */
.cart-summary-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    padding: 1.8rem;
}
.cart-summary-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.4rem;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}
.cart-summary-row .val {
    font-weight: 800;
    color: #0f172a;
    font-size: 1.05rem;
}
.cart-summary-divider {
    border-top: 1px solid #f1f5f9;
    margin: 1.15rem 0;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}
.cart-total-label {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
}
.cart-total-val {
    font-size: 1.65rem;
    font-weight: 800;
    color: #059669;
}

/* Free Delivery Banner Box */
.cart-free-delivery-box {
    background: #eaf8f0;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.35rem;
}
.cart-free-delivery-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cart-free-delivery-left i {
    font-size: 1.4rem;
    color: #059669;
}
.cart-free-delivery-left span {
    font-size: 0.83rem;
    font-weight: 700;
    color: #065f46;
    line-height: 1.35;
}
.cart-free-delivery-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Action Buttons */
.btn-checkout-ui {
    background: #00875a;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    width: 100%;
    padding: 0.85rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 135, 90, 0.25);
    transition: all 0.2s;
}
.btn-checkout-ui:hover {
    background: #006644;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 135, 90, 0.35);
}

.btn-clear-cart-ui {
    background: #ffffff;
    color: #0284c7;
    border: 1.5px solid #38bdf8;
    border-radius: 10px;
    width: 100%;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-clear-cart-ui:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0369a1;
}

/* Bottom Features Strip */
.cart-features-strip {
    margin-top: 3.5rem;
    padding: 0.5rem 0;
    position: relative;
}
.cart-feature-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-right: 1px solid #e2e8f0;
}
.cart-feat-col:last-child .cart-feature-item {
    border-right: none;
}
.cart-feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.cart-feat-icon.fresh {
    background: #dcfce7;
    color: #16a34a;
}
.cart-feat-icon.safe {
    background: #e0f2fe;
    color: #0284c7;
}
.cart-feat-icon.delivery {
    background: #f0fdf4;
    color: #0284c7;
}
.cart-feat-icon.support {
    background: #f0f7ff;
    color: #0284c7;
}
.cart-feat-text h6 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.2rem;
}
.cart-feat-text p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

/* Bottom Corner Decorative Leaves */
.cart-leaf-bl {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 65px;
    pointer-events: none;
    z-index: 5;
}
.cart-leaf-br {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 65px;
    pointer-events: none;
    z-index: 5;
}

/* Responsive */
@media (max-width: 991.98px) {
    .cart-hero-banner {
        background-size: cover;
    }
    .cart-summary-card {
        margin-top: 1.5rem;
    }
    .cart-feature-item {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .btn-checkout-ui {
        padding: 0.95rem;
    }
}

/* ============================================================
   NEW CART EMPTY STATE UI
   ============================================================ */
.cart-hero-decor {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: url('../images/hero/cart_banner_fish.png') no-repeat right center;
    background-size: cover;
    z-index: 1;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
}

.cart-empty-state {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.cart-empty-content {
    position: relative;
    z-index: 2;
}

.sad-cart-graphic svg {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.seaweed {
    position: absolute;
    bottom: 0;
    width: 250px;
    height: 250px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: 1;
}
.seaweed-left {
    left: -30px;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10,100 Q0,70 20,40 T30,0" fill="none" stroke="%2338bdf8" stroke-width="4" stroke-linecap="round"/><path d="M10,100 Q30,60 0,30" fill="none" stroke="%237dd3fc" stroke-width="6" stroke-linecap="round"/><path d="M10,100 Q40,80 50,50" fill="none" stroke="%23bae6fd" stroke-width="10" stroke-linecap="round"/><path d="M20,100 Q50,70 70,40" fill="none" stroke="%2338bdf8" stroke-width="5" stroke-linecap="round"/></svg>');
}
.seaweed-right {
    right: -30px;
    transform: scaleX(-1);
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10,100 Q0,70 20,40 T30,0" fill="none" stroke="%2338bdf8" stroke-width="4" stroke-linecap="round"/><path d="M10,100 Q30,60 0,30" fill="none" stroke="%237dd3fc" stroke-width="6" stroke-linecap="round"/><path d="M10,100 Q40,80 50,50" fill="none" stroke="%23bae6fd" stroke-width="10" stroke-linecap="round"/><path d="M20,100 Q50,70 70,40" fill="none" stroke="%2338bdf8" stroke-width="5" stroke-linecap="round"/></svg>');
}

.cart-empty-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0b3c66;
    margin-bottom: 0.5rem;
}

.cart-empty-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.btn-empty-action {
    background: linear-gradient(90deg, #0284c7 0%, #0d9488 100%);
    color: #ffffff;
    border: none;
    padding: 0.8rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}
.btn-empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    color: #ffffff;
}

/* Features Section */
.cart-features-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.feature-item {
    padding: 0.5rem;
}

.feature-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.feature-icon-teal,
.feature-icon-green { background: #ccfbf1; color: #0d9488; }
.feature-icon-blue { background: #e0f2fe; color: #0284c7; }
.feature-icon-aqua,
.feature-icon-mint { background: #cffafe; color: #0891b2; }
.feature-icon-purple { background: #ede9fe; color: #7c3aed; }

.feature-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.2rem;
}
.feature-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .cart-table-card {
        padding: 0.5rem;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .cart-table-card .table-responsive {
        overflow-x: visible;
    }
    .cart-ui-table thead {
        display: none;
    }
    .cart-ui-table, 
    .cart-ui-table tbody, 
    .cart-ui-table tr.cart-row {
        display: block;
        width: 100%;
    }
    .cart-ui-table tr.cart-row {
        position: relative;
        padding: 0.9rem;
        margin-bottom: 0.85rem;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    .cart-ui-table tr.cart-row td {
        display: block;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }
    /* Product Info (Takes full width minus delete button space) */
    .cart-ui-table tr.cart-row td.cart-col-info {
        width: 100%;
        margin-bottom: 0.75rem;
        padding-right: 2.5rem !important; /* reserve space for top-right delete button */
    }
    .cart-prod-cell {
        gap: 0.75rem;
    }
    .cart-prod-img {
        width: 55px;
        height: 55px;
        border-radius: 10px;
    }
    .cart-prod-info h4 {
        font-size: 0.95rem;
        margin-bottom: 0.15rem;
    }
    .cart-prod-info p {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    /* Hide unit price on mobile to save space */
    .cart-ui-table tr.cart-row td.cart-col-price {
        display: none;
    }
    /* Quantity Stepper (Bottom Left) */
    .cart-ui-table tr.cart-row td.cart-col-qty {
        width: auto;
    }
    .cart-stepper {
        padding: 0.25rem;
    }
    .cart-stepper-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    .cart-stepper-input {
        width: 36px;
        font-size: 0.85rem;
    }
    /* Item Subtotal (Bottom Right) */
    .cart-ui-table tr.cart-row td.cart-col-total {
        width: auto;
        text-align: right !important;
    }
    .cart-item-total {
        font-size: 1.1rem;
        color: #059669;
    }
    /* Delete Action Button (Top Right) */
    .cart-ui-table tr.cart-row td.cart-col-delete {
        position: absolute;
        top: 0.85rem;
        right: 0.85rem;
        width: auto;
    }
    .cart-btn-delete {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        border-radius: 50%;
        background: #fee2e2;
        color: #ef4444;
    }
    .cart-leaf-bl, .cart-leaf-br {
        display: none;
    }
}
