/* المتغيرات الموحدة - ألوان أبيض وأزرق فقط */
:root {
    --primary-color: #0ea5e9;    /* أزرق سماوي */
    --primary-dark: #0284c7;     /* أزرق داكن */
    --secondary-color: #1e3a8a;  /* أزرق كحلي */
    --accent-color: #38bdf8;     /* أزرق فاتح */
    --bg-color: #f8fafc;         /* خلفية فاتحة جداً */
    --white: #ffffff;            /* أبيض */
    --light-blue: #e0f2fe;       /* أزرق فاتح جداً */
    --gray-light: #f1f5f9;       /* رمادي فاتح */
    --gray: #64748b;             /* رمادي متوسط */
    --gray-dark: #334155;        /* رمادي داكن */
    --success: #0ea5e9;         /* أخضر - تم توحيده مع الأزرق */
    --shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    --shadow-hover: 0 8px 20px rgba(14, 165, 233, 0.25);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cart-item-price, .total-amount, .price {
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* تحويل الجدول لنظام مرن في الجوال */
@media (max-width: 768px) {
    .cart-items-table thead { display: none; }

    .cart-items-table tr {
        display: block;
        background: white;
        border-radius: 15px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: var(--shadow);
    }

    .cart-items-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0 !important;
        border: none !important;
        border-bottom: 1px solid var(--gray-light) !important;
    }

    .cart-items-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--gray);
    }
}
.breadcrumb {
    max-width: 1280px;
    margin: 20px auto 30px;
    padding: 0 20px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gray);
}

.breadcrumb-nav a:hover {
    color: var(--primary-color);
}

.page-header, .cart-alerts {
    max-width: 1280px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    padding-right: 20px;
}

.page-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 5px;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-close {
    margin-right: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cart Content */
.cart-content {
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cart Items Section */
.cart-items-section {
    background: linear-gradient(135deg, var(--white), rgba(224, 242, 254, 0.3));
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 2px solid var(--light-blue);
    overflow: hidden;
    animation: slideIn 0.6s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-items-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-items-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.cart-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 28px;
    padding: 24px;
}

.cart-item-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
    border: 2px solid var(--light-blue);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cart-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-item-card:hover {
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.25);
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
}

.cart-item-card:hover::before {
    transform: scaleX(1);
}

.cart-item-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--bg-color), var(--light-blue));
    overflow: hidden;
    position: relative;
}

.cart-item-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-item-card:hover .cart-item-image img {
    transform: scale(1.1) rotate(1deg);
}

.cart-item-card:hover .cart-item-image::after {
    opacity: 1;
}

.cart-item-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    z-index: 2;
}

.badge-number {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item-content {
    padding: 20px;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cart-item-header > div:first-child {
    flex: 1;
}

.product-name {
    font-weight: 700;
    color: var(--secondary-color);
    cursor: pointer;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-name:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
}

.product-name:hover::after {
    width: 100%;
}

.product-store {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-store i {
    color: var(--primary-color);
}

.product-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
}

.product-variant {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.product-variant i {
    color: var(--primary-color);
}

.cart-item-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--light-blue);
}

.price-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.price-currency {
    font-size: 0.85rem;
    color: var(--gray);
    margin-left: 4px;
}

.subtotal-price {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.quantity-section {
    display: flex;
    align-items: center;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-color));
    border: 2px solid var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
    position: relative;
    overflow: visible;
    z-index: 10;
}

.quantity-btn i {
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.quantity-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.quantity-btn:hover:not(:disabled) i {
    transform: scale(1.2);
}

.quantity-btn:active:not(:disabled) {
    transform: scale(1.05) translateY(0);
}

.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quantity-input {
    width: 60px;
    height: 36px;
    border: 2px solid var(--light-blue);
    border-radius: 8px;
    text-align: center;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
    transform: scale(1.05);
}

.subtotal-price {
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}

.btn-remove {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid #fecaca;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    z-index: 10;
}

.btn-remove i {
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.btn-remove:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-remove:hover i {
    transform: rotate(90deg) scale(1.1);
}

/* Order Summary */
.order-summary-section {
    position: sticky;
    top: 120px;
    height: fit-content;
    animation: slideInRight 0.6s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.order-summary {
    background: linear-gradient(135deg, var(--white), rgba(224, 242, 254, 0.3));
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 2px solid var(--light-blue);
    overflow: hidden;
}

.order-summary-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-bottom: none;
}

.order-summary-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-summary-content {
    padding: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-blue);
}

.summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-label {
    color: var(--gray);
    font-size: 0.95rem;
}

.summary-value {
    font-weight: 600;
    color: var(--primary-color);
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Main Actions */
.cart-main-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.btn-continue-shopping {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.btn-continue-shopping:hover {
    background-color: var(--light-blue);
    transform: translateY(-2px);
}

.btn-checkout {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.btn-checkout:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.btn-checkout:disabled {
    background: var(--gray-light);
    color: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Empty Cart */
.empty-cart {
    max-width: 1280px;
    margin: 0 auto 60px;
    padding: 60px 20px;
    text-align: center;
}

.empty-cart-icon {
    font-size: 5rem;
    color: var(--light-blue);
    margin-bottom: 20px;
}

.empty-cart-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.empty-cart-message {
    color: var(--gray);
    margin-bottom: 30px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

.btn-back-to-shopping {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

/* Responsive */
@media (max-width: 992px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .order-summary-section {
        position: static;
    }

    .cart-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .cart-items-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cart-item-footer {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cart-item-footer .price-section {
        text-align: center;
    }

    .quantity-section {
        justify-content: center;
    }

    .cart-item-card {
        border-radius: 12px;
    }

    .cart-item-image {
        height: 200px;
    }

    .cart-item-content {
        padding: 16px;
    }
}
