/* Modern Cart Styles - NEUROSTUFF Design */

/* Anti-blur fixes - убираем все блюр эффекты, кроме заголовков */
.cart-wrapper *:not(.hero-title):not(.hero-subtitle),
.cart-detail-block *,
.user-info-section *,
.order-section * {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Убираем text-shadow везде, кроме hero секции */
.cart-wrapper *:not(.hero-title):not(.hero-subtitle),
.cart-detail-block *,
.user-info-section *,
.order-section * {
    text-shadow: none !important;
}

/* Исключения для теней кнопок и карточек */
.order-btn,
.quantity-btn,
.remove-btn,
.cart-detail-block,
.user-info-item {
    filter: none !important;
    backdrop-filter: none !important;
}

/* Переопределяем прозрачный текст из hero-page.css */
.cart-wrapper .hero-title,
.hero-section .hero-title {
    -webkit-text-fill-color: white !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    background: none !important;
    color: white !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 40px 0;
    margin-bottom: 30px;
}

.hero-title {
    color: #ffffff !important;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.5px;
    opacity: 1 !important;
    filter: none !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    text-align: center;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Cart Detail Block */
.cart-detail-block {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

/* Cart Items */
.cart-items {
    padding: 0;
}

.cart-item-card {
    background: white;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
}

.cart-item-card:hover {
    background: rgba(248, 250, 252, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

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

.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.image-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 24px;
}

.cart-item-title {
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.original-price {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.discounted-price {
    color: #059669;
    font-weight: 600;
}

.current-price {
    color: #6366f1;
    font-weight: 600;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    background: rgba(248, 250, 252, 0.9);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.quantity-btn {
    background: #6366f1 !important;
    color: white !important;
    border: 2px solid #6366f1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    font-weight: 900;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    position: relative;
}

.quantity-btn i,
.quantity-btn .fas {
    font-size: 16px !important;
    font-weight: 900 !important;
    color: white !important;
    line-height: 1;
    display: block;
}

.quantity-btn:hover {
    background: #8b5cf6 !important;
    border-color: #8b5cf6;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.quantity-btn:hover i,
.quantity-btn:hover .fas {
    color: white !important;
}

.quantity-display {
    padding: 0 16px;
    font-weight: 600;
    color: #1e293b;
    min-width: 40px;
    text-align: center;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove button */
.remove-btn, 
.remove-btn:hover, 
.remove-btn:focus, 
.remove-btn:active,
button.remove-btn, 
button.remove-btn:hover, 
button.remove-btn:focus, 
button.remove-btn:active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.remove-btn:hover,
button.remove-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.total-price {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Cart Total */
.cart-total-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding: 24px;
    text-align: center;
}

.cart-total-title {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.cart-total-amount {
    color: #6366f1;
    font-weight: 700;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

/* Order Section */
.order-section {
    background: white;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding: 24px;
}

.order-section-title {
    color: #1e293b;
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 8px;
    text-align: center;
}

.order-section-desc {
    color: #64748b;
    text-align: center;
    margin-bottom: 24px;
}

.form-label {
    color: #374151;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: rgba(248, 250, 252, 0.5);
}

.form-control:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.form-check {
    margin-bottom: 1rem;
}

.form-check-input {
    border: 2px solid #6366f1;
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.125em;
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
}

.form-check-input:focus {
    border-color: #8b5cf6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

.form-check-label {
    color: #1e293b;
    font-weight: 500;
    margin-left: 0.5rem;
    line-height: 1.4;
    cursor: pointer;
}

.form-check-label a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.form-check-label a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

.order-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.order-btn:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.3);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    color: rgba(99, 102, 241, 0.3);
    margin-bottom: 16px;
}

.empty-cart-icon i {
    font-size: 4rem;
}

.empty-cart-title {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.empty-cart-desc {
    color: #94a3b8;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .cart-item-card {
        padding: 16px;
    }
    
    .cart-item-title {
        font-size: 1rem;
    }
    
    .quantity-controls {
        margin-top: 12px;
    }
    
    .cart-total-amount {
        font-size: 1.6rem;
    }
    
    .order-section {
        padding: 20px;
    }
    
    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .quantity-display {
        height: 32px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 30px 0;
        margin-bottom: 20px;
    }
    
    .cart-item-image img,
    .image-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .cart-total-section,
    .order-section {
        padding: 16px;
    }
    
    .quantity-wrapper {
        gap: 0;
    }
}

/* User Info Section - для авторизованных пользователей */
.user-info-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.user-info-title {
    color: #1a202c;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.user-info-title i {
    color: #6366f1;
}

.user-info-item {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.08);
    padding: 16px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.user-info-item:hover {
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.user-info-label {
    color: #718096;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.user-info-label i {
    color: #6366f1;
    width: 16px;
}

.user-info-value {
    color: #2d3748;
    font-weight: 700;
    font-size: 1rem;
    word-break: break-word;
}

.user-info-note {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.user-info-note i {
    color: #6366f1;
}

.profile-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.profile-link:hover {
    color: #5856eb;
    text-decoration: underline;
}

/* Responsive для user info */
@media (max-width: 768px) {
    .user-info-section {
        padding: 16px;
    }
    
    .user-info-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .user-info-label {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .user-info-value {
        font-size: 0.95rem;
    }
    
    .user-info-note {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* Финальная защита от всех блюр эффектов (исключая hero заголовки) */
.cart-wrapper,
.cart-wrapper *:not(.hero-title):not(.hero-subtitle),
.cart-detail-block,
.cart-detail-block *,
.user-info-section,
.user-info-section *,
.order-section,
.order-section *,
.cart-item-card,
.cart-item-card *,
.user-info-title,
.user-info-item,
.user-info-label,
.user-info-value,
.order-btn,
.quantity-btn,
.remove-btn {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Убираем text-shadow везде, кроме hero заголовков */
.cart-wrapper *:not(.hero-title):not(.hero-subtitle),
.cart-detail-block *,
.user-info-section *,
.order-section *,
.cart-item-card *,
.user-info-title,
.user-info-item,
.user-info-label,
.user-info-value,
.order-btn,
.quantity-btn,
.remove-btn {
    text-shadow: none !important;
    -webkit-text-shadow: none !important;
}

/* Четкий текст без размытия */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}