/* ============================================
   Cart Page Styles
   ============================================ */

.cart-page {
    min-height: 100vh;
    padding-top: 120px;
    background: linear-gradient(180deg, var(--light-gray-alt) 0%, var(--white) 50%);
}

/* Hero Section */
.cart-hero {
    background: linear-gradient(135deg, var(--primary-purple) 0%, #6b4470 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.cart-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(239, 111, 106, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cart-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(107, 112, 79, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cart-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cart-hero-icon {
    margin-bottom: 30px;
    color: var(--secondary-pink);
    animation: float 3s ease-in-out infinite;
}

.cart-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cart-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Cart Content */
.cart-content {
    padding: 60px 0 100px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-top: 40px;
}

/* Cart Items */
.cart-items-section {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--light-gray-alt);
    border-radius: 15px;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
}

.cart-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cart-item:nth-child(1) { animation-delay: 0.1s; }
.cart-item:nth-child(2) { animation-delay: 0.2s; }
.cart-item:nth-child(3) { animation-delay: 0.3s; }
.cart-item:nth-child(4) { animation-delay: 0.4s; }

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-purple);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-item-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.cart-item-name a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.cart-item-name a:hover {
    color: var(--primary-purple);
}

.cart-item-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.cart-item-price .new-price {
    color: var(--primary-purple);
    font-weight: 700;
}

.cart-item-price .old-price {
    font-size: 16px;
    color: var(--text-meta);
    text-decoration: line-through;
    margin-right: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border-radius: 8px;
    padding: 5px 10px;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--primary-purple);
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-quantity button:hover {
    background: var(--secondary-pink);
    transform: scale(1.1);
}

.cart-item-quantity input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    background: transparent;
}

.cart-item-remove {
    background: transparent;
    border: 2px solid var(--error-red);
    color: var(--error-red);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.cart-item-remove:hover {
    background: var(--error-red);
    color: var(--white);
    transform: scale(1.05);
}

/* Cart Summary */
.cart-summary-section {
    position: sticky;
    top: 140px;
    height: fit-content;
}

.cart-summary {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.cart-summary-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-gray);
}

.cart-summary-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: var(--text-dark);
}

.cart-summary-row span:last-child {
    font-weight: 600;
    color: var(--text-dark);
}

.cart-summary-row.cart-summary-total {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-purple);
    padding-top: 15px;
    border-top: 2px solid var(--border-gray);
    margin-top: 10px;
}

.cart-checkout-btn,
a.cart-checkout-btn {
    width: 100%;
    padding: 15px 30px;
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 15px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cart-checkout-btn:hover:not(:disabled),
a.cart-checkout-btn:hover {
    background: var(--secondary-pink);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(88, 45, 78, 0.3);
    color: var(--white);
}

.cart-checkout-btn:disabled,
a.cart-checkout-btn[style*="pointer-events: none"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.cart-continue-shopping {
    display: block;
    text-align: center;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.cart-continue-shopping:hover {
    color: var(--secondary-pink);
}

/* Empty State */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.cart-empty-icon {
    margin-bottom: 30px;
    color: var(--border-gray);
    opacity: 0.5;
}

.cart-empty-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.cart-empty-text {
    font-size: 16px;
    color: var(--text-meta);
    margin-bottom: 30px;
}

.cart-empty-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-purple);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-fast);
}

.cart-empty-btn:hover {
    background: var(--secondary-pink);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(88, 45, 78, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cart-summary-section {
        position: static;
    }
}

@media (max-width: 767px) {
    .cart-page {
        padding-top: 80px;
    }
    
    .cart-content {
        padding: 30px 0 60px;
    }
    
    .cart-hero {
        padding: 50px 0 30px;
    }
    
    .cart-hero-icon {
        margin-bottom: 20px;
    }
    
    .cart-hero-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .cart-hero-title {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .cart-hero-subtitle {
        font-size: 14px;
    }
    
    .cart-layout {
        gap: 20px;
        margin-top: 20px;
    }
    
    .cart-items-section {
        padding: 15px;
        border-radius: 15px;
    }
    
    .cart-items {
        gap: 15px;
    }
    
    .cart-item {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .cart-item-image {
        width: 100%;
        height: 180px;
        align-self: center;
        max-width: 200px;
    }
    
    .cart-item-details {
        gap: 8px;
    }
    
    .cart-item-category {
        font-size: 11px;
    }
    
    .cart-item-name {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .cart-item-price {
        font-size: 18px;
    }
    
    .cart-item-price .old-price {
        font-size: 14px;
    }
    
    .cart-item-actions {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        justify-content: space-between;
    }
    
    .cart-item-quantity {
        flex: 1;
        min-width: 120px;
        justify-content: space-between;
    }
    
    .cart-item-quantity button {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .cart-item-quantity input {
        width: 40px;
        font-size: 14px;
    }
    
    .cart-item-remove {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        text-align: center;
    }
    
    .cart-summary-section {
        position: static;
        order: -1;
        margin-bottom: 20px;
    }
    
    .cart-summary {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .cart-summary-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .cart-summary-details {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .cart-summary-row {
        font-size: 14px;
    }
    
    .cart-summary-row.cart-summary-total {
        font-size: 18px;
        padding-top: 12px;
    }
    
    .cart-checkout-btn,
    a.cart-checkout-btn {
        padding: 12px 20px;
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .cart-continue-shopping {
        font-size: 14px;
    }
    
    .cart-empty {
        padding: 40px 15px;
        border-radius: 15px;
    }
    
    .cart-empty-icon {
        margin-bottom: 20px;
    }
    
    .cart-empty-icon svg {
        width: 80px;
        height: 80px;
    }
    
    .cart-empty-title {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .cart-empty-text {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .cart-empty-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cart-page {
        padding-top: 70px;
    }
    
    .cart-content {
        padding: 20px 0 50px;
    }
    
    .cart-hero {
        padding: 40px 0 25px;
    }
    
    .cart-hero-title {
        font-size: 24px;
    }
    
    .cart-hero-subtitle {
        font-size: 13px;
    }
    
    .cart-items-section {
        padding: 12px;
    }
    
    .cart-item {
        padding: 12px;
    }
    
    .cart-item-image {
        height: 150px;
    }
    
    .cart-item-name {
        font-size: 15px;
    }
    
    .cart-item-price {
        font-size: 16px;
    }
    
    .cart-summary {
        padding: 15px 12px;
    }
    
    .cart-summary-title {
        font-size: 18px;
    }
    
    .cart-summary-row {
        font-size: 13px;
    }
    
    .cart-summary-row.cart-summary-total {
        font-size: 16px;
    }
    
    .cart-checkout-btn,
    a.cart-checkout-btn {
        padding: 11px 18px;
        font-size: 13px;
    }
}

/* RTL Support */
body.rtl .cart-item,
body[dir="rtl"] .cart-item {
    flex-direction: row-reverse;
}

body.rtl .cart-item-price .old-price,
body[dir="rtl"] .cart-item-price .old-price {
    margin-right: 0;
    margin-left: 10px;
}

