/* ===== DIV-BASED RESPONSIVE CART STYLES ===== */

/* Cart Items Wrapper */
.cart-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual Cart Item Card */
.cart-item-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 25px;
    transition: box-shadow 0.3s ease;
}
.summery-box{
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.cart-item-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Cart Item Image */
.cart-item-image {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
}

.cart-item-image a {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
}

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

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

/* Cart Item Details Container */
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

/* Cart Item Info Section */
.cart-item-info {
    flex: 1;
}

.cart-item-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.cart-item-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 16px;
}

.cart-item-title a:hover {
    color: var(--theme-color);
}

/* Cart Item Meta */
.cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
}

.cart-meta-item {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.cart-meta-item .meta-label {
    font-weight: 600;
    color: #333;
    text-transform: capitalize;
    font-size: 13px;
}

/* Price Display (Mobile Only) */
.cart-item-price-mobile {
    display: none;
    margin: 10px 0;
    font-size: 18px;
    font-weight: 700;
}

.cart-item-price-mobile .price-label {
    display: none;
}

.cart-item-price-mobile .price-value {
    font-weight: 700;
    color: #222;
    font-size: 18px;
    display: block;
}

/* Cart Item Actions */
.cart-item-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.action-link {
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.3s;
    cursor: pointer;
}

.action-link.remove-link {
    color: #666;
}

.action-link.remove-link:hover {
    color: #dc3545;
}

.action-link.edit-link {
    color: #666;
}

.action-link.edit-link:hover {
    color: var(--theme-color);
}

/* Cart Item Controls Section */
.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Quantity Wrapper */
.cart-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.quantity-box .input-group {
    width: 120px;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-box .input-group button {
    background: #f8f8f8;
    border: none;
    width: 36px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    padding: 5px;
}

.quantity-box .input-group button:hover {
    background: var(--theme-color);
    color: #fff;
}

.quantity-box .input-group button i {
    font-size: 12px;
}

.quantity-box .input-group input {
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    height: 42px;
    flex: 1;
    padding: 0;
    color: #222;
}

.quantity-box .input-group input:focus {
    outline: none;
    box-shadow: none;
}

/* Cart Item Total */
.cart-item-total {
    text-align: right;
}

.total-price {
    margin-bottom: 5px;
}

.total-label {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    margin-right: 8px;
}

.total-value {
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.saving-amount {
    margin-top: 5px;
}

.saving-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color);
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablet Portrait and Below (iPad, etc.) */
@media (max-width: 991px) {
    .cart-item-card {
        padding: 20px;
        gap: 20px;
    }
    
    .cart-item-image {
        width: 140px;
        height: 140px;
    }
    
    .cart-item-title {
        font-size: 17px;
    }
}

/* Mobile Landscape */
@media (max-width: 767px) {
    .cart-items-wrapper {
        gap: 15px;
    }
    
    .cart-item-card {
        flex-direction: row;
        padding: 15px;
        gap: 15px;
    }
    
    .cart-item-image {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }
    
    .cart-item-details {
        gap: 12px;
    }
    
    .cart-item-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .cart-item-meta {
        gap: 8px;
        flex-direction: column;
    }
    
    .cart-item-price-mobile {
        display: block;
    }
    
    .cart-item-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-top: 12px;
        border-top: none;
    }
    
    .cart-quantity-wrapper {
        justify-content: space-between;
        align-items: center;
    }
    
    .quantity-label {
        display: none;
    }
    
    .cart-item-total {
        display: none;
    }
    
    .total-price {
        margin-bottom: 0;
    }
    
    .quantity-box .input-group {
        width: 110px;
    }
    
    .quantity-box .input-group button {
        width: 32px;
        height: 38px;
    }
    
    .quantity-box .input-group input {
        height: 38px;
        font-size: 15px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .cart-item-card {
        padding: 12px;
        gap: 12px;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
    
    .cart-item-title {
        font-size: 14px;
    }
    
    .cart-meta-item {
        font-size: 14px;
    }
    
    .cart-item-actions {
        gap: 10px;
    }
    
    .action-link {
        font-size: 13px;
    }
    
    .cart-item-price-mobile .price-value {
        font-size: 16px;
    }
    
    .quantity-box .input-group {
        width: 100px;
    }
    
    .quantity-box .input-group button {
        width: 30px;
        height: 36px;
    }
    
    .quantity-box .input-group input {
        height: 36px;
        font-size: 14px;
    }
}

/* Medium to Large Tablets (Landscape Mode) */
@media (min-width: 576px) and (max-width: 767px) {
    .cart-item-card {
        flex-direction: row;
    }
    
    .cart-item-image {
        width: 150px;
        height: 150px;
    }
    
    .cart-item-controls {
        flex-direction: row;
        align-items: center;
    }
    
    .cart-item-total {
        text-align: right;
    }
}

/* Enhanced Summary Box for Mobile */
@media (max-width: 991px) {
    .summery-box {
        margin-top: 20px;
    }
}

@media (max-width: 767px) {
    .summery-box .summery-header h3 {
        font-size: 18px;
    }
    
    .summery-box .summery-contain,
    .summery-box .summery-total,
    .summery-box .button-group {
        padding: 15px;
    }
}

/* ===== QUANTITY LOADER STYLES ===== */

/* Quantity Box with Position Relative for Loader */
.quantity-box,
.cart-quantity-wrapper .input-group {
    position: relative;
}

/* Quantity Loader Overlay */
.qty-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 6px;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

/* Spinner Styles */
.qty-loader .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 2px;
    color: var(--theme-color);
}

/* Disabled State for Quantity Controls */
.quantity-box .input-group button:disabled,
.quantity-box .input-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading State Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.qty-loader .spinner-border {
    animation: spin 0.75s linear infinite;
}