/* Cart Page Styles */
body {
    background-color: #f8f9fa;
}

.page-title {
    color: var(--main-color, #fbada5);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid #eee;
    gap: 1rem;
}

.cart-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.cart-item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cart-item-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--third-color, #ab7c44);
    line-height: 1.4;
}

.cart-item-price {
    font-size: 1.1rem;
    color: var(--main-color, #fbada5);
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

.cart-item-total-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--third-color, #ab7c44);
    white-space: nowrap;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 2px solid var(--main-color, #fbada5);
    border-radius: 8px;
    background: white;
    color: var(--main-color, #fbada5);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: var(--main-color, #fbada5);
    color: white;
}

.quantity-input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0.5rem;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.cart-item-remove:hover {
    color: #dc2626;
}

.cart-summary {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--third-color, #ab7c44);
    margin-bottom: 1.5rem;
      text-align: center;

}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.summary-total {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--main-color, #fbada5);
    border-top: 2px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
      text-align: center;

}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--main-color, #fbada5) 0%, var(--third-color, #ab7c44) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(251, 173, 165, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(251, 173, 165, 0.5);
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 15px;
}

.empty-cart-icon {
    font-size: 5rem;
    color: var(--main-color, #fbada5);
    margin-bottom: 1.5rem;
}

.empty-cart h4 {
    color: var(--third-color, #ab7c44);
    font-weight: 600;
    margin-bottom: 1rem;
}

.btn-shop-now {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--main-color, #fbada5);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-shop-now:hover {
    background: var(--third-color, #ab7c44);
    color: white;
}

/* ========== Responsive Design ========== */

/* Tablets وأجهزة متوسطة (768px - 992px) */
@media (max-width: 992px) {
    .cart-item {
        padding: 1.2rem;
    }
    
    .cart-item-image {
        width: 110px;
        height: 110px;
    }
    
    .cart-item-name {
        font-size: 1.1rem;
    }
    
    .cart-item-price {
        font-size: 1rem;
    }
    
    .cart-item-total-price {
        font-size: 1.2rem;
    }
    
    .quantity-btn {
        width: 36px;
        height: 36px;
    }
    
    .quantity-input {
        width: 52px;
        height: 36px;
    }
    
    .cart-summary {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .summary-title {
        font-size: 1.3rem;
    }
}

/* أجهزة الموبايل الكبيرة (576px - 768px) */
@media (max-width: 768px) {
    .page-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 1.5rem;
    }
    
    .cart-item {
        flex-wrap: wrap;
        padding: 1.2rem;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
    
    .cart-item-details {
        flex: 1 1 calc(100% - 120px);
        min-width: 0;
    }
    
    .cart-item-right {
        flex: 0 0 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
        padding-top: 0.8rem;
        border-top: 1px solid #eee;
    }
    
    .cart-item-name {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .cart-item-price {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .cart-item-total-price {
        font-size: 1.2rem;
    }
    
    .quantity-btn {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    
    .quantity-input {
        width: 55px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .cart-item-remove {
        font-size: 1.3rem;
    }
    
    .cart-summary {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .summary-row {
        font-size: 1rem;
    }
    
    .summary-total {
        font-size: 1.3rem;
          text-align: center;

    }
    
    .btn-checkout {
        font-size: 1.2rem;
        padding: 1rem;
    }
}

/* أجهزة الموبايل الصغيرة (أقل من 576px) */
@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }
    
    .cart-item {
        padding: 1rem;
        border-radius: 12px;
        gap: 0.8rem;
    }
    
    .cart-item-image {
        width: 90px;
        height: 90px;
        border-radius: 8px;
    }
    
    .cart-item-details {
        flex: 1 1 calc(100% - 105px);
    }
    
    .cart-item-name {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
    }
    
    .cart-item-price {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    
    .cart-item-quantity {
        gap: 0.4rem;
    }
    
    .cart-item-right {
        margin-top: 0.3rem;
        padding-top: 0.6rem;
    }
    
    .cart-item-total-price {
        font-size: 1.1rem;
    }
    
    .quantity-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .quantity-input {
        width: 50px;
        height: 35px;
        font-size: 1rem;
    }
    
    .cart-item-remove {
        font-size: 1.2rem;
    }
    
    .cart-summary {
        padding: 1.2rem;
        border-radius: 12px;
    }
    
    .summary-title {
        font-size: 1.2rem;
          text-align: center;

        margin-bottom: 1.2rem;
    }
    
    .summary-row {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }
    
    .summary-total {
        font-size: 1.2rem;
        padding-top: 0.8rem;
        margin-top: 0.8rem;
    }
    
    .btn-checkout {
        font-size: 1.1rem;
        padding: 0.9rem;
        border-radius: 10px;
    }
    
    .empty-cart {
        padding: 3rem 1.5rem;
        border-radius: 12px;
    }
    
    .empty-cart-icon {
        font-size: 4rem;
        margin-bottom: 1.2rem;
    }
    
    .empty-cart h4 {
        font-size: 1.1rem;
    }
    
    .btn-shop-now {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* أجهزة الموبايل الصغيرة جداً (أقل من 400px) */
@media (max-width: 400px) {
    .cart-item {
        padding: 0.8rem;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-details {
        flex: 1 1 calc(100% - 95px);
    }
    
    .cart-item-name {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .cart-item-price {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .cart-item-total-price {
        font-size: 1rem;
    }
    
    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .quantity-input {
        width: 45px;
        height: 32px;
        font-size: 0.95rem;
    }
    
    .cart-item-remove {
        font-size: 1.1rem;
    }
    
    .cart-summary {
        padding: 1rem;
    }
    
    .summary-title {
        font-size: 1.1rem;
    }
    
    .summary-row {
        font-size: 0.9rem;
    }
    
    .summary-total {
        font-size: 1.1rem;

    }
    
    .btn-checkout {
        font-size: 1rem;
        padding: 0.8rem;
    }
}