/* ==========================================================================
   Scoped Cart Page Styles
   ========================================================================== */
.cart-page-scope {
    width: 100%;
    padding: 30px;
}

.cart-page-scope .cart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    padding: 10px;
}

.cart-page-scope .breadcrumbs {
    font-size: 10px;
    font-weight: 400;
    color: #a0a0a0;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.cart-page-scope .breadcrumbs .active {
    color: #111;
}

.cart-page-scope .cart-header h1 {
    font-size: 12px;
    font-weight: 600;
    color: #162421;
}

.cart-page-scope .cart-header .item-count {
    font-weight: 400;
    color: #2c2b2b;
    font-size: 12px;
}

.cart-page-scope .continue-shopping-btn {
    background-color: transparent;
    border: 1px solid #c0cdc6;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 12px;
    color: #607068;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cart-page-scope .continue-shopping-btn:hover {
    background-color: #162421;
    color: #fff;
    border-color: #162421;
}

/* ==========================================================================
   Layout Grid & Main Content (50/50 Split)
   ========================================================================== */
.cart-page-scope .cart-content {
    padding: 30px;
}

.cart-page-scope .cart-layout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    align-items: start;
}

.cart-page-scope .cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.cart-page-scope .cart-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 14px rgba(59, 60, 59, 0.4);
}

.cart-page-scope .item-image-wrapper {
    width: 90px;
    height: 90px;
    background-color: #111;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.cart-page-scope .item-details {
    flex: 1;
    padding-left: 20px;
}

.cart-page-scope .item-title {
    font-size: 15px;
    font-weight: 700;
    color: #1c2b27;
    margin-bottom: 4px;
}

.cart-page-scope .item-specs {
    font-size: 0.65rem;
    color: #81918c;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.cart-page-scope .item-pricing-row {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cart-page-scope .item-price {
    font-size: 14px;
    font-weight: 800;
    color: #162421;
}

.cart-page-scope .quantity-selector {
    background-color: #050b09;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 4px 12px;
    gap: 14px;
}

.cart-page-scope .qty-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.cart-page-scope .qty-val {
    color: #ffffff;
    font-size: 10px;
    min-width: 10px;
    text-align: center;
}

.cart-page-scope .item-actions-subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    height: 90px;
}

.cart-page-scope .delete-btn {
    background: none;
    border: none;
    color: #a4b3ab;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s ease;
}

.cart-page-scope .delete-btn:hover {
    color: #e53e3e;
}

.cart-page-scope .subtotal-box {
    text-align: right;
}

.cart-page-scope .subtotal-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #a4b3ab;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.cart-page-scope .subtotal-price {
    font-size: 15px;
    font-weight: 800;
    color: #162421;
}

/* ==========================================================================
   Order Summary Section Card
   ========================================================================== */
.cart-page-scope .summary-wrapper {
    display: flex;
    justify-content: stretch;
    margin-top: 0;
    width: 100%;
}

.cart-page-scope .summary-card {
    background-color: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: none;
    padding: 30px;
    box-shadow: 0 4px 14px rgba(59, 60, 59, 0.4);
}

.cart-page-scope .summary-card h3 {
    font-size: 14px;
    font-weight: 800;
    color: #162421;
    margin-bottom: 24px;
}

.cart-page-scope .summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #83948c;
    margin-bottom: 14px;
    font-weight: 500;
}

.cart-page-scope .summary-row span:last-child {
    color: #162421;
    font-weight: 700;
}

.cart-page-scope .summary-row .free-text {
    color: #83948c !important;
    font-weight: 500 !important;
}

.cart-page-scope .summary-divider {
    border: none;
    border-top: 1px solid #e2ebd9;
    margin: 20px 0;
}

.cart-page-scope .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.cart-page-scope .total-label-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cart-page-scope .total-title {
    font-size: 16px;
    font-weight: 600;
    color: #99a6a0;
}

.cart-page-scope .total-subtitle {
    font-size: 12px;
    font-weight: 800;
    color: #162421;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.cart-page-scope .total-price {
    font-size: 16px;
    font-weight: 800;
    color: #1a1b1a;
}

.cart-page-scope .checkout-btn {
    background-color: #5d72f7;
    color: #ffffff;
    border: none;
    width: 90%;
    padding: 8px;
    margin-left: 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(93, 114, 247, 0.3);
    transition: background-color 0.2s ease;
}

.cart-page-scope .checkout-btn:hover {
    background-color: #485be3;
}

.cart-page-scope .security-text {
    text-align: center;
    font-size: 0.65rem;
    color: #a4b3ab;
    margin-top: 18px;
    font-weight: 500;
}



.cart-page-scope .cart-link {
    text-decoration: none;
    color: rgb(140, 140, 140);
}

.cart-page-scope .cart-link:hover {
    color: black;
}

.cart-page-scope .cart-error-badge {
    font-weight: 1000;
    font-size: 12px;
    color: red;
}

.cart-page-scope .disabled-item-opacity {
    opacity: 0.7;
    background-color: #f8fafc;
}

.cart-page-scope .stock-error-border {
    border: 2px solid #ef4444 !important;
}
.cart-page-scope .empty-cart-state {
    width: 100%;
    min-height: 70vh;              /* Adjust height if needed */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    grid-column: 1 / -1;
    margin: 0 auto;
}

.cart-page-scope .empty-cart-state p {
    margin: 0;
    padding: 16px 24px;
    background-color: #050b09;
    color: #e2ebd9;
    border-radius: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-width: 220px;
}

.small-swal-popup {
    width: 320px !important;
    padding: 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 12px !important;
}

.small-swal-title {
    font-size: 1.2rem !important;
    padding: 0 !important;
    margin-bottom: 5px !important;
}

.small-swal-text {
    font-size: 0.9rem !important;
    margin: 0.5rem 0 !important;
}

.small-swal-popup .swal2-icon {
    width: 3.5em !important;
    height: 3.5em !important;
    margin: 0.5em auto !important;
}

.small-swal-popup .swal2-actions {
    margin-top: 10px !important;
}
/* ==========================================================================
   📱 RESPONSIVE MEDIA QUERIES FOR CART PAGE
   ========================================================================== */

/* Tablet & Smaller Laptops (Max Width: 968px) */
@media screen and (max-width: 968px) {
    .cart-page-scope .cart-layout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cart-page-scope .cart-content {
        padding: 15px;
    }

     .cart-page-scope .summary-card {
        padding: 14px;
        width: 60%;
    }
}

/* Mobile Devices (Max Width: 768px) */
@media screen and (max-width: 768px) {
    .cart-page-scope {
        padding: 10px;
    }

    .cart-page-scope .cart-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding: 5px;
    }

    .cart-page-scope .cart-header h1 {
        font-size: 11px;
    }

    .cart-page-scope .continue-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* Reset card to block layout so elements stack naturally without grid bugs */
    .cart-page-scope .cart-card {
        padding: 16px;
        border-radius: 12px;
        display: block;
        position: relative;
    }

    /* Top row inside card: Image and Details side-by-side */
    .cart-page-scope .cart-card > .item-image-wrapper {
        float: left;
        width: 75px;
        height: 75px;
        margin-right: 12px;
        margin-bottom: 10px;
    }

    .cart-page-scope .cart-card > .item-details {
        padding-left: 0;
        width: auto;
        overflow: hidden;
    }

    .cart-page-scope .item-title {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .cart-page-scope .item-specs {
        font-size: 0.6rem;
        margin-bottom: 8px;
    }

    /* Pricing and Quantity layout */
    .cart-page-scope .item-pricing-row {
        display: flex;
        align-items: center;
        gap: 15px;
        clear: none;
    }

    .cart-page-scope .item-price {
        font-size: 12px;
    }

    .cart-page-scope .quantity-selector {
        padding: 3px 8px;
        gap: 10px;
        border-radius: 16px;
    }

    /* Clear fix and bottom row for Subtotal and Delete button */
    .cart-page-scope .item-actions-subtotal {
        clear: both;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: auto;
        width: 100%;
        margin-top: 15px;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
    }

    .cart-page-scope .delete-btn {
        font-size: 15px;
        padding: 0;
    }

    .cart-page-scope .subtotal-box {
        text-align: right;
    }

    .cart-page-scope .subtotal-label {
        font-size: 10px;
    }

    .cart-page-scope .subtotal-price {
        font-size: 13px;
    }

    /* Summary Card & Checkout Button Fixes */
    .cart-page-scope .summary-card {
        padding: 20px;
        border-radius: 12px;
    }

    .cart-page-scope .checkout-btn {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 12px 16px;
        box-sizing: border-box;
    }

    .cart-page-scope .total-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cart-page-scope .total-label-box {
        padding: 0;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .cart-page-scope .total-price {
        font-size: 15px;
    }

    .summary-row span{
        font-size: 10px;
    }
}

/* Very Small Mobile Devices (Max Width: 480px) */
@media screen and (max-width: 480px) {
    .cart-page-scope {
        padding: 6px;
    }

    .cart-page-scope .cart-card {
        padding: 12px;
    }

    .cart-page-scope .cart-card > .item-image-wrapper {
        width: 65px;
        height: 65px;
        margin-right: 10px;
    }

    .cart-page-scope .item-title {
        font-size: 12px;
    }

    .cart-page-scope .item-specs {
        font-size: 0.55rem;
    }

    .cart-page-scope .summary-card {
        padding: 14px;
        width: 90%;
    }

    .cart-page-scope .checkout-btn {
        font-size: 8px;
        width: 50%;
        padding: 5px 10px;
    }

    .cart-page-scope .total-title {
    font-size: 10px;
    }

    .cart-page-scope .total-subtitle {
    font-size: 10px;
    }

    .total-price {
        font-size: 10px;
    }
}