/* Cart Page Styles */

.cart-page {
    padding: var(--spacing-xxl) 0;
    min-height: 60vh;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

/* Cart Items */
.cart-items {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 150px 120px 50px;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-light);
}

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

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.cart-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

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

.cart-item-producer {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

.cart-item-price {
    font-size: 0.95rem;
    color: var(--color-text);
    margin: 0;
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-xs);
}

.cart-item-quantity input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
}

.cart-item-quantity input:focus {
    outline: none;
}

.qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all 0.2s;
}

.qty-btn:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

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

.item-total-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

/* Remove Button */
.btn-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: all 0.2s;
    border-radius: var(--radius-md);
}

.btn-remove:hover {
    color: var(--color-accent);
    background: #fee;
}

/* Empty Cart State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xxl);
    text-align: center;
}

.empty-state svg {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

.empty-state h2 {
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.empty-state p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xl);
}

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

.summary-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.summary-card h2 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-lg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

.summary-row span:last-child {
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--spacing-lg) 0;
}

.summary-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

/* Cart Benefits */
.cart-benefits {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-text);
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-item svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* Loading State */
.loading {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--color-text-light);
}

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

    .cart-summary {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-details {
        grid-column: 2 / 3;
    }

    .cart-item-quantity {
        grid-column: 1 / 2;
        grid-row: 2;
        justify-content: center;
    }

    .cart-item-total {
        grid-column: 2 / 3;
        grid-row: 2;
        text-align: right;
    }

    .cart-item-remove {
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
    }

    .cart-item {
        position: relative;
    }

    .summary-card {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .cart-page {
        padding: var(--spacing-lg) 0;
    }

    .cart-items {
        padding: var(--spacing-md);
    }

    .cart-item-name {
        font-size: 1rem;
    }

    .item-total-price {
        font-size: 1.1rem;
    }
}
