/* Стили для магазина WInrar */

/* Основные стили магазина */
.shop-main {
    min-height: 100vh;
    background: var(--gradient-hero);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.shop-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

/* Навигация магазина */
.shop-navbar {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.shop-navbar .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.shop-navbar .nav-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.shop-navbar .nav-logo i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.shop-navbar .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.shop-navbar .nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.shop-navbar .nav-link:hover,
.shop-navbar .nav-link.active {
    color: var(--primary-color);
}

.shop-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.shop-navbar .nav-link:hover::after,
.shop-navbar .nav-link.active::after {
    width: 100%;
}

/* Переключатель языка для магазина */
.shop-navbar .nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shop-navbar .lang-switcher {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.shop-navbar .lang-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: var(--transition);
    outline: none;
    min-width: 30px;
    text-align: center;
}

.shop-navbar .lang-btn.active,
.shop-navbar .lang-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.shop-navbar .lang-divider {
    color: var(--text-light);
    font-size: 1.1rem;
    user-select: none;
}

/* Кнопка админа в навигации */
.nav-admin {
    margin-left: 20px;
}

.admin-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-size: 14px;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.admin-btn i {
    font-size: 12px;
}

/* Селектор валюты */
.currency-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.currency-selector label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    margin: 0;
}

.currency-selector select {
    border: none;
    background: transparent;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.currency-selector select:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.1);
}

/* Элементы только для админа */
.admin-only {
    display: none !important;
}

.admin-only.show {
    display: flex !important;
}

/* Модальное окно админа */
.admin-modal {
    max-width: 400px;
}

.admin-form {
    padding: 30px;
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    padding-right: 50px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    letter-spacing: 4px;
    text-align: center;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.toggle-password:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Модальное окно удаления */
.delete-modal .modal-body {
    padding: 30px;
    text-align: center;
}

.delete-modal .modal-body p {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.delete-modal .warning {
    color: #ef4444;
    font-weight: 500;
}

.modal-actions {
    padding: 0 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Заголовок магазина */
.shop-hero {
    padding: 80px 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.shop-title {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.shop-title .typing-text {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shop-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin-bottom: 40px;
}

/* Панель управления */
.shop-controls {
    padding: 40px 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 0 20px 60px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.controls-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Поиск */
.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Фильтры */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Кнопка добавления */
.add-product-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.add-product-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Сетка товаров */
.products-grid {
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.products-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Карточка товара */
.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

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

.product-image .placeholder {
    font-size: 3rem;
    color: var(--text-light);
}

.product-content {
    padding: 25px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.product-category {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fbbf24;
    font-weight: 500;
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.action-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
}

.edit-btn {
    background: var(--primary-color);
    color: white;
}

.delete-btn {
    background: #ef4444;
    color: white;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Статистика */
.shop-stats {
    padding: 60px 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.product-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Уведомления */
.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.info {
    border-left-color: #3b82f6;
}

/* Анимации */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Медиа запросы */
@media (max-width: 768px) {
    .shop-title {
        font-size: 2.5rem;
    }

    .controls-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        width: 100%;
    }

    .filter-buttons {
        justify-content: center;
    }

    .products-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .product-actions {
        opacity: 1;
    }

    /* Мобильный переключатель языка для магазина */
    .shop-navbar .lang-switcher {
        display: flex !important;
    }

    .shop-navbar .lang-btn {
        font-size: 0.9rem;
        padding: 1px 6px;
        min-width: 25px;
    }

    /* Мобильное меню для магазина */
    .shop-navbar .hamburger {
        display: flex;
    }

    .shop-navbar .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }

    .shop-navbar .nav-menu.active {
        left: 0;
    }

    .shop-navbar .nav-menu .nav-item {
        margin: 1rem 0;
    }

    .shop-navbar .nav-menu .nav-link {
        justify-content: center;
        padding: 1rem;
        font-size: 1.1rem;
        color: var(--text-primary);
    }

    .shop-navbar .nav-menu .nav-link:hover {
        background: var(--bg-secondary);
    }

    .nav-admin {
        margin-left: 10px;
    }
    
    .admin-btn span {
        display: none;
    }
    
    .admin-btn {
        padding: 8px 12px;
    }
    
    .currency-selector {
        flex-direction: column;
        gap: 5px;
        padding: 10px;
    }
    
    .currency-selector label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .shop-hero {
        padding: 60px 0;
    }

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

    .shop-controls {
        margin: 0 10px 40px;
    }

    .products-wrapper {
        padding: 0 10px;
    }

    .product-content {
        padding: 20px;
    }

    .shop-stats {
        padding: 40px 0;
    }

    .notifications {
        right: 10px;
        left: 10px;
    }

    .notification {
        font-size: 14px;
    }

    .nav-admin {
        margin-left: 5px;
    }
    
    .admin-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .currency-selector {
        padding: 8px;
    }
} 