/* ========== ОСНОВНЫЕ СТИЛИ МАГАЗИНА ========== */

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 30px 60px;
    flex: 1;
    width: 100%;
}

.shop-header {
    text-align: center;
    margin-bottom: 40px;
}

.shop-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff, var(--main-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.shop-title .highlight {
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.shop-subtitle {
    color: var(--description-color);
    font-size: 18px;
}

/* ========== ФИЛЬТРЫ ========== */
.shop-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    background: var(--background-card);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 10px 28px;
    font-weight: 600;
    color: var(--description-color);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    color: #1a1a1a;
    border-color: transparent;
}

/* ========== СЕТКА ТОВАРОВ ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* ========== КАРТОЧКА ТОВАРА ========== */
.product-card {
    background: var(--background-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--main-color-glow);
    transform: translateY(-5px);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1a1a20, #252530);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image i {
    font-size: 70px;
    color: var(--main-color);
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white-color);
}

.product-description {
    font-size: 13px;
    color: var(--description-color);
    line-height: 1.45;
    margin-bottom: 16px;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.product-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--main-color);
}

.product-price small {
    font-size: 13px;
    color: var(--description-color);
}

.buy-button {
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    color: #1a1a1a;
}

.buy-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--main-color-glow);
}

/* ========== МОДАЛЬНОЕ ОКНО ТОВАРА ========== */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}

.product-modal.open {
    visibility: visible;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--background-elevated);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 30px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2001;
    animation: fadeInUp 0.3s ease;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--stats-background);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 3px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--description-color);
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2002;
}

.modal-close:hover {
    color: var(--main-color);
    transform: rotate(90deg);
}

/* Контейнер изображения с размытым фоном */
.modal-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1a1a20, #252530);
}

.modal-image-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    opacity: 0.6;
    z-index: 0;
}

.modal-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image img {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.modal-image i {
    font-size: 120px;
    color: var(--main-color);
    padding: 40px;
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    text-align: center;
    color: var(--white-color);
}

.modal-full-description {
    color: var(--description-color);
    margin-bottom: 25px;
    line-height: 1.7;
    text-align: left;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.modal-full-description::-webkit-scrollbar {
    width: 4px;
}

.modal-full-description::-webkit-scrollbar-track {
    background: var(--stats-background);
}

.modal-full-description::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 3px;
}

.modal-full-description b,
.modal-full-description strong {
    color: var(--main-color);
}

.modal-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--main-color);
    margin-bottom: 25px;
    text-align: center;
}

/* Селектор количества */
.quantity-selector {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 15px;
    margin: 10px 0;
}

.quantity-label {
    display: block;
    font-size: 14px;
    color: var(--description-color);
    margin-bottom: 10px;
    text-align: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--background-card);
    border: 1px solid var(--glass-border);
    color: var(--main-color);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: var(--main-color);
    color: #1a1a1a;
    transform: scale(1.05);
}

.quantity-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--white-color);
    min-width: 60px;
    text-align: center;
}

.total-price {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--main-color);
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
}

.total-price span {
    font-size: 24px;
    font-weight: 800;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.modal-buy-now, .modal-add-cart {
    padding: 14px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.modal-buy-now {
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    border: none;
    color: #1a1a1a;
}

.modal-buy-now:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px var(--main-color-glow);
}

.modal-add-cart {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--white-color);
}

.modal-add-cart:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    transform: scale(1.02);
}

/* ========== КОРЗИНА САЙДБАР ========== */
.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    border-left: 1px solid var(--glass-border);
    z-index: 1600;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 40px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--main-color);
}

.close-cart-sidebar {
    background: none;
    border: none;
    color: var(--description-color);
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-cart-sidebar:hover {
    color: var(--main-color);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-track {
    background: var(--stats-background);
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 3px;
}

.cart-empty {
    text-align: center;
    padding: 40px;
    color: var(--description-color);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--white-color);
}

.cart-item-price {
    font-size: 13px;
    color: var(--main-color);
    font-weight: 600;
}

.remove-item {
    background: var(--warning-background);
    border: none;
    color: var(--red-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white-color);
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    border: none;
    padding: 14px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px var(--main-color-glow);
}

/* ========== ИКОНКА КОРЗИНЫ В НАВБАРЕ ========== */
.nav-cart {
    position: relative;
}

.nav-cart .cart-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--red-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.nav-cart .cart-indicator.active {
    opacity: 1;
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--background-elevated);
    backdrop-filter: blur(12px);
    border-left: 3px solid var(--main-color);
    padding: 12px 20px;
    border-radius: 12px;
    color: var(--white-color);
    z-index: 1700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    pointer-events: none;
}

/* ========== ПОСЛЕДНИЕ ПОКУПКИ ========== */
.recent-purchases-section {
    margin-top: 60px;
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
}

.recent-purchases-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.recent-purchases-section .section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white-color);
}

.recent-purchases-section .section-title .highlight {
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.recent-purchases-section .section-subtitle {
    text-align: center;
    color: var(--description-color);
    margin-bottom: 40px;
    font-size: 16px;
}

.purchases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}

.purchase-card {
    background: var(--background-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    animation: fadeInUp 0.4s ease backwards;
}

.purchase-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateX(5px);
}

.purchase-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--main-color), #e0b050);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.purchase-avatar i {
    font-size: 24px;
    color: #1a1a1a;
}

.purchase-info {
    flex: 1;
}

.purchase-player {
    font-weight: 700;
    font-size: 15px;
    color: var(--white-color);
    margin-bottom: 4px;
}

.purchase-product {
    font-size: 13px;
    color: var(--description-color);
    margin-bottom: 2px;
}

.purchase-date {
    font-size: 11px;
    color: var(--description-color);
    opacity: 0.7;
}

.purchase-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--main-color);
    flex-shrink: 0;
}

.loading-purchases, .empty-purchases {
    text-align: center;
    padding: 40px;
    color: var(--description-color);
    grid-column: 1 / -1;
}

.loading-purchases i {
    margin-right: 8px;
}

.empty-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--description-color);
    font-size: 18px;
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.4s ease backwards;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cart-indicator.active {
    animation: pulse 0.3s ease;
}

/* ========== АДАПТИВ ========== */
@media screen and (max-width: 1000px) {
    .shop-container {
        padding: 110px 20px 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .shop-container {
        padding: 100px 15px 40px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .filter-btn {
        padding: 6px 16px;
        font-size: 12px;
    }
    
    .modal-content {
        max-width: 95%;
        padding: 20px;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 22px;
    }
    
    .modal-price {
        font-size: 28px;
    }
    
    .modal-full-description {
        font-size: 13px;
        max-height: 250px;
    }
    
    .modal-image {
        max-height: 200px;
    }
    
    .modal-image i {
        font-size: 80px;
        padding: 30px;
    }
    
    .shop-title {
        font-size: 32px;
    }
    
    .shop-subtitle {
        font-size: 14px;
    }
    
    .recent-purchases-section {
        margin-top: 40px;
        padding: 30px 0;
    }
    
    .recent-purchases-section .container {
        padding: 0 20px;
    }
    
    .purchases-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .purchase-card {
        padding: 12px 15px;
    }
    
    .purchase-avatar {
        width: 40px;
        height: 40px;
    }
    
    .purchase-avatar i {
        font-size: 20px;
    }
    
    .purchase-player {
        font-size: 14px;
    }
    
    .purchase-product {
        font-size: 12px;
    }
    
    .purchase-price {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .product-image {
        height: 160px;
    }
    
    .product-price {
        font-size: 22px;
    }
    
    .modal-buttons {
        gap: 10px;
    }
    
    .modal-buy-now, .modal-add-cart {
        padding: 12px;
        font-size: 14px;
    }
    
    .quantity-controls {
        gap: 15px;
    }
    
    .quantity-btn {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    
    .quantity-value {
        font-size: 24px;
        min-width: 50px;
    }
    
    .purchase-card {
        flex-wrap: wrap;
    }
    
    .purchase-price {
        margin-left: auto;
    }
}