/**
 * Cart Page Styles
 * Extracted from cart/cart.blade.php
 * Version: 1.0
 * Last Updated: 2026-02-10
 */

/* ========================================
   Cart Flash Sale Badge
   ======================================== */
.cart_flash_sale {
    color: #fff;
    font-size: 13px;
    padding: 2px 8px;
    text-transform: uppercase;
    bottom: 150px;
    z-index: 1;
    top: 2px;
}

.cart_flash_sale img {
    min-height: unset !important;
    max-height: unset !important;
    height: 50px;
    width: 65px !important;
    object-fit: contain;
}

span.online_exclusive img {
    object-fit: cover;
    width: unset !important;
}

/* ========================================
   Cart Flash Sale Positioning
   ======================================== */
[dir="ltr"] .cart_flash_sale {
    position: absolute;
    left: 14px;
}

[dir="rtl"] .cart_flash_sale {
    position: absolute;
    right: 14px;
}



/* ========================================
   Free Shipping Progress
   ======================================== */
.emoji {
    font-size: 1.5rem;
}

.progress-bar-custom {
    background-color: #bb1f2a;
}

.lead {
    font-size: 12px;
    font-weight: 500;
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media only screen and (max-width: 767px) {


    span.online_exclusive img {
        object-fit: cover;
        width: 100px !important;
        height: 39px;
    }
}

/* ========================================
   Cart Redesign (Card Layout - 2 Columns on Desktop)
   ======================================== */
.cart-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cart-item-card {
    display: flex;
    background: #fff;
    border: 0px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 0px;
    /* Removed margin-bottom because of grid gap */
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff;
    box-shadow: 0 0 7px rgb(0 0 0 / 10%);
}

.cart-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Left Image Section */
.cart-item-image {
    flex: 0 0 35%;
    max-width: 140px;
    aspect-ratio: 8 / 5;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 8px 0 0 8px;
}

.cart-item-image img {
    max-width: 100%;
    /* Removed specific width and height */
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Right Content Section */
.cart-item-info {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    /* Desktop now matches mobile column stack for compactness */
    justify-content: space-between;
    gap: 8px;
}

.cart-item-details-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-details-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Vertically center delete button with quantity */
    justify-content: flex-start;
    width: 100%;
    /* Take full width at bottom of column */
    gap: 15px;
    margin-top: 4px;
}

.cart-item-title {
    font-size: var(--fs-h6);
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.3;
}

.cart-item-title a {
    color: #1e293b;
    /* Darker title color */
    text-decoration: none;
    transition: color 0.2s;
}

.cart-item-title a:hover {
    color: #bb1f2a;
}

.cart-item-remove {
    color: #ef4444;
    transition: color 0.2s;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-left: 10px;
    /* Add margin */
}

.cart-item-remove:hover {
    color: #bb1f2a;
}

.product-remove {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    display: flex;
    align-items: center;
}



.spec-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #64748b;
}

.spec-row .label {
    font-weight: 500;
    margin-right: 15px;
    /* Increased margin */
    min-width: 50px;
}

.spec-row .value {
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
}

.price-row .value {
    color: var(--clr-primary);
    font-size: var(--fs-h5);
    /* Balanced price size */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Footer / Quantity */
.cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-wrapper .quantity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* Adjusted gap */
    background: transparent;
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

.quantity-wrapper .minus,
.quantity-wrapper .plus {
    width: 28px;
    /* Reduced size */
    height: 28px;
    background: #f8fafc;
    /* Lighter background */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    /* CRITICAL: Prevent buttons from shrinking/deforming */
}

.quantity-wrapper .minus:hover,
.quantity-wrapper .plus:hover {
    background: #e2e8f0;
    color: #bb1f2a;
}

.quantity-wrapper .qty {
    width: 36px;
    height: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
    flex-shrink: 0;
    /* Prevent input from shrinking */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-items-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }

    .cart-item-card {
        flex-direction: row;
        /* Horizontal layout on mobile */
        min-height: 110px;
        /* Reduced height */
        align-items: stretch;
    }

    .cart-item-image {
        width: 35%;
        min-width: 35%;
        aspect-ratio: 8 / 5;
        display: flex;
        align-items: flex-start;
    }

    .cart-item-image img {
        max-width: 100%;
        /* Removed specific width and height */
        object-fit: cover;
    }

    .cart-item-info {
        padding: var(--spacing-card-padding);
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
        gap: 5px;
    }

    .cart-item-details-left {
        width: 100%;
        gap: 2px;
    }

    .cart-item-details-right {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        gap: 12px;
    }

    .cart-item-title {
        font-size: 0.85rem;
        /* Reduced to match design */
        margin-bottom: 2px;
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }



    .spec-row {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }

    .spec-row .label {
        margin-right: 8px;
        /* Restored smaller margin for mobile */
        min-width: 45px;
        /* Reduced min-width */
    }

    .spec-row[data-label="size"] .value {
        color: #bb1f2a;
    }

    .price-row .value {
        font-size: 0.9rem;
        /* Smaller price */
        white-space: nowrap;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .quantity-wrapper .quantity {
        gap: 6px;
        /* Tighter gap for mobile quantity */
    }

    .quantity-wrapper .minus,
    .quantity-wrapper .plus {
        width: 24px;
        /* Slightly smaller buttons */
        height: 24px;
        font-size: 0.85rem;
    }

    .quantity-wrapper .qty {
        width: 30px;
        /* Smaller input */
        height: 24px;
        font-size: 0.8rem;
    }

    .product-remove {
        margin-left: auto;
        /* Push trash to the far right on mobile */
    }

    .product-remove svg {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   Sticky Bottom Checkout Bar
   ======================================== */
.cart-sec {
    padding-bottom: 100px;
    /* Ensure content doesn't hide behind the sticky bar */
}

.cart-sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    /* Shadow pointing upwards */
    z-index: 1000;
    border-top: 1px solid #e2e8f0;
}

.cart-sticky-content {
    max-width: 1140px;
    /* Bootstrap container width */
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-subtotal-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart_total_label {
    font-weight: 500;
    color: #64748b;
    font-size: 1rem;
}

.cart_total_amount {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.25rem;
}

.btn-checkout {
    padding: 10px 24px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    /* Slightly more rounded */
    background-color: #bb1f2a !important;
    color: #ffffff !important;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cart-sticky-content {
        padding: 12px 15px;
    }

    .cart-subtotal-info {
        gap: 10px;
    }

    .cart_total_label {
        font-size: 0.9rem;
    }

    .cart_total_amount {
        font-size: 1.1rem;
    }

    .btn-checkout {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
    }
}

/* ========================================
   Styles Migrated from cart.blade.php
   ======================================== */
[dir="rtl"] .cart-table table tr:nth-child(3) td {
    direction: ltr !important;
}


/* Flash Sale Tag */
.cart_flash_sale {
    position: absolute;
    top: 2px;
    z-index: 1;
    padding: 2px 8px;
}

[dir="ltr"] .cart_flash_sale {
    left: 14px;
}

[dir="rtl"] .cart_flash_sale {
    right: 14px;
}

.cart_flash_sale img {
    min-height: unset !important;
    max-height: unset !important;
    height: 50px;
    width: 65px !important;
    object-fit: contain;
}

.del-price-labal {

    color: #64748b;
    /* Gray from curated palette */
    font-size: 0.85em;
    margin-left: 5px;
}

.discount-tag {
    color: green !important;
    font-weight: 400;
    font-size: 0.8em;

}

/* ========================================
   Empty Cart Section
   ======================================== */
.empty-cart-wrapper {
    text-align: center;
    padding: 25px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 0px auto;
    max-width: 600px;
}

.empty-cart-icon {
    width: 140px;
    height: 140px;
    background: #fff5f5;
    /* Very subtle red tint to match theme */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #bb1f2a;
    /* Primary theme color */
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.empty-cart-icon svg {
    width: 70px;
    height: 70px;
    stroke-width: 1.5;
}

.empty-cart-heading {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.empty-cart-description {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.empty-cart-btn {
    padding: 14px 35px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@media (max-width: 768px) {


    .empty-cart-heading {
        font-size: 1.5rem;
    }

    .empty-cart-description {
        font-size: 0.95rem;
    }

    .empty-cart-icon {
        width: 110px;
        height: 110px;
        margin-bottom: 25px;
    }

    .empty-cart-icon svg {
        width: 55px;
        height: 55px;
    }
}