/* ==============================================
   SHOP SECTION
   ============================================== */

.shop-section {
    background: transparent;
    padding: 60px 20px 80px;
    min-height: calc(100vh - 80px);
    position: relative;
    z-index: 1;
}

.shop-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Shop Header */
.shop-header {
    text-align: center;
    margin-bottom: 50px;
}

.shop-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-gold);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.shop-subtitle {
    font-size: 1.1rem;
    color: #9ca3af;
    line-height: 1.6;
}

/* Shop Controls */
.shop-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

/* Category Select */
.shop-category {
    position: relative;
}

.shop-category > svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

/* Custom Select */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    width: 100%;
    padding: 14px 40px 14px 45px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.125;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-trigger:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.2);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--accent-gold);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: var(--accent-gold);
    pointer-events: none;
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.custom-select.open .custom-select-options {
    max-height: 500px;
    overflow-y: auto;
    opacity: 1;
}

.custom-select-option {
    padding: 8px 45px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.custom-select-option:hover {
    background: rgba(212, 165, 116, 0.2);
    color: var(--accent-gold);
}

.custom-select-option.active {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.3) 0%, rgba(212, 165, 116, 0.1) 100%);
    color: var(--accent-gold);
}

.custom-select-option:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Scrollbar для выпадающего списка */
.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #e6c58a;
}

/* Search Input */
.shop-search {
    position: relative;
}

.shop-search svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.2);
}

.search-input::placeholder {
    color: #6b7280;
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin: 0 auto;
}

/* Shop Card */
.shop-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid rgba(212, 165, 116, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

.shop-card .card-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px solid var(--accent-gold);
    position: relative;
    overflow: hidden;
}

.shop-card .card-image img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.shop-card:hover .card-image img {
    transform: rotate(5deg) scale(1.1);
}

.shop-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 5px;
}

.shop-card .card-subtitle {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 12px;
}

.shop-card .card-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 5px;
}

.shop-card .card-quantity {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

.shop-card .card-button {
    background: var(--accent-gold, #d4a574);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 0.9rem;
}

.shop-card .card-button:hover {
    background: #e6c58a;
    transform: translateY(-2px);
}

/* МОДАЛЬНОЕ ОКНО */
.shop-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.shop-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shop-modal-content {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shop-modal-image {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-radius: 20px 0 0 20px;
}

.shop-modal-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.shop-modal-body {
    padding: 40px;
}

.shop-modal-header {
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(251, 191, 36, 0.2);
    padding-bottom: 20px;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 5px;
}

.modal-subtitle {
    font-size: 1.1rem;
    color: #9ca3af;
    font-style: italic;
}

.shop-modal-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 0.9rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.section-content {
    color: #d1d5db;
    line-height: 1.6;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.quantity-control {
    margin-bottom: 30px;
}

.quantity-label {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 10px;
}

.quantity-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.quantity-slider {
    flex: 1;
    height: 8px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

.quantity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.7);
}

.quantity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.quantity-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.7);
}

.quantity-input {
    width: 80px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    text-align: center;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.shop-modal-notice {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.shop-modal-notice p {
    color: #fca5a5;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.shop-modal-notice p:last-child {
    margin-bottom: 0;
}

.buy-button {
    background: linear-gradient(135deg, var(--gradient-yellow), #fcd34d);
    color: #000;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    animation: pulse-buy 2s infinite;
    transform-origin: center bottom;
}

.buy-button:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

@keyframes pulse-buy {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
    }
}

.shop-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
}

.shop-modal-close:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* Кастомный scrollbar для модальных окон */
.shop-modal-content::-webkit-scrollbar {
    width: 8px;
}

.shop-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.shop-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 10px;
}

.shop-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1600px) {
    .shop-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1400px) {
    .shop-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .shop-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .shop-title {
        font-size: 2rem;
    }

    .shop-subtitle {
        font-size: 1rem;
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .shop-modal-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }

    .shop-modal-image {
        border-radius: 20px 20px 0 0;
        padding: 30px;
    }

    .shop-modal-image img {
        max-width: 200px;
    }

    .shop-modal-body {
        padding: 30px 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-price {
        font-size: 2rem;
    }

    .shop-card .card-image {
        height: 140px;
    }

    .shop-card .card-image img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .shop-section {
        padding: 40px 15px 60px;
    }

    .shop-title {
        font-size: 1.5rem;
    }

    .shop-grid {
        gap: 10px;
    }

    .shop-card {
        padding: 15px;
    }

    .shop-card .card-title {
        font-size: 0.9rem;
    }

    .shop-card .card-price {
        font-size: 1.1rem;
    }
}

