/* =========================================
   1. ПЕРЕМЕННЫЕ (если ещё не объявлены глобально)
   ========================================= */
:root {
    --primary: #6220b4;
    --primary-light: #8a3fd4;
    --primary-dark: #4a1887;
    --accent: #ff9800;
    --accent-gold: #d4af37;
    --elyos: #c9a227;
    --asmo: #8e44ad;
    --bg-dark: #121d3b;
    --bg-darker: #0a1128;
    --text: #333;
    --text-muted: #777;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.18);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. ОСНОВНОЙ КОНТЕЙНЕР МАГАЗИНА
   ========================================= */
.shop-container {
    width: 100%;
    margin: 0 auto;
    min-height: 600px;
}

/* --- Шапка --- */
.shop-container .shop-header {
    background: linear-gradient(135deg, rgba(15, 12, 41, 0.85), rgba(48, 43, 99, 0.75)),
                url(../img/webshop/honeycomb_mesh.jpg) repeat;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    color: #fff;
    padding-bottom: 20px;
    font-size: 14px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.shop-container .shop-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: shop-shimmer 3s linear infinite;
}

@keyframes shop-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.shop-container .shop-header .shop-title {
    font-size: 30px;
    text-transform: uppercase;
    font-weight: bold;
    padding: 30px 0 10px;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.shop-container .shop-header .shop-title a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

.shop-container .shop-header .shop-title a:hover {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* --- Контент --- */
.shop-container .shop-content {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.shop-container > .shop-content > .row {
    margin: 0;
    display: table;
    width: 100%;
}

/* =========================================
   3. БАЛАНС И ПОИСК В ШАПКЕ
   ========================================= */
.shop-search-wrapper {
    text-align: right;
    margin: 10px 20px 0;
}

.shop-search-wrapper p {
    color: #ddd !important;
    margin: 0 8px 10px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.shop-search-wrapper form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.shop-search-wrapper input[type="text"] {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--radius-sm);
    padding: 6px 12px !important;
    width: 200px;
    transition: var(--transition);
}

.shop-search-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}

.shop-search-wrapper input[type="submit"] {
    background: linear-gradient(135deg, #c0392b, #990000) !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 16px !important;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(153, 0, 0, 0.3);
}

.shop-search-wrapper input[type="submit"]:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(153, 0, 0, 0.5);
}

.shop-balance-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 20px;
    margin-top: 10px;
}

.balance-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 14px 12px;
    text-align: center;
    transition: var(--transition);
}

.balance-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.balance-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    margin-bottom: 6px;
    font-weight: 500;
}

.balance-card > a {
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
    display: block;
    transition: var(--transition);
    text-decoration: none;
}

.balance-card > a:hover {
    color: #ffb74d;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

.balance-card small {
    display: block;
    margin-top: 4px;
}

.balance-card small a {
    font-size: 11px;
    color: #888;
    font-weight: normal;
    text-decoration: none;
}

.balance-card small a:hover {
    color: #fff;
}

/* КэшБэк акцент */
.balance-card.cashback {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 152, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.3);
}

.balance-card.cashback:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 152, 0, 0.2));
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.cashback-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #FFD700;
    cursor: pointer;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 152, 0, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    transition: var(--transition);
    margin-bottom: 6px;
}

.cashback-value:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.cashback-transfer {
    font-size: 11px !important;
    color: #aaa !important;
    font-weight: normal !important;
    text-decoration: none;
}

.cashback-transfer:hover {
    color: var(--accent) !important;
}

/* =========================================
   4. БОКОВОЕ МЕНЮ (САЙДБАР)
   ========================================= */
.shop-container > .shop-content > .row > .sidebar {
    background: linear-gradient(180deg, rgba(18, 29, 59, 0.95), rgba(10, 17, 40, 0.95));
    padding: 0;
    height: 100%;
    display: table-cell;
    float: none;
    vertical-align: top;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.shop-container > .shop-content > .row > .items-content {
    display: table-cell;
    float: none;
    padding: 20px;
    overflow: visible;
    vertical-align: top;
    background: rgba(255, 255, 255, 0.3);
}

.nav-sidebar {
    margin: 0;
    padding: 10px 0;
}

.nav-sidebar > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
}

.nav-sidebar > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform var(--transition);
}

.nav-sidebar > li:hover::before {
    transform: scaleY(1);
}

.nav-sidebar > li > a {
    padding: 12px 15px;
    font-size: 13px;
    color: #ddd;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.nav-sidebar > li > a:hover,
.nav-sidebar > li > a:focus {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.15), transparent);
    color: var(--accent);
    padding-left: 20px;
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

.nav-sidebar > li > ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
}

.nav-sidebar > li > ul > .sub-category > a {
    color: #aaa;
    padding: 8px 15px 8px 30px;
    font-size: 12px;
    background-color: transparent;
    transition: var(--transition);
    display: block;
    border-left: 2px solid transparent;
    text-decoration: none;
}

.nav-sidebar > li > ul > .sub-category > a:hover,
.nav-sidebar > li > ul > .sub-category > a:focus {
    color: var(--accent);
    background: rgba(255, 152, 0, 0.08);
    border-left-color: var(--accent);
    padding-left: 35px;
}

/* =========================================
   5. СПИСОК И ДЕТАЛИ ТОВАРОВ
   ========================================= */
/* ===== ТАБЛИЦА МАГАЗИНА (ИСПРАВЛЕННАЯ ДЛЯ BOOTSTRAP) ===== */

/* 1. База таблицы: создаем отступы между строками */
.table.shop-items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px; /* Вертикальный зазор между строками */
    margin-bottom: 20px;
}

/* Убираем стандартные полосы Bootstrap, чтобы не мешали */
.table.shop-items-table > tbody > tr:nth-of-type(odd) {
    background-color: transparent;
}

.table.shop-items-table > thead > tr > th {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    padding-bottom: 12px;
    background: transparent;
}

/* 2. Стилизация ячеек как единой строки-карточки */
.table.shop-items-table > tbody > tr {
    transition: var(--transition);
    animation: fadeInUp 0.4s ease backwards;
}

/* Базовый стиль для ВСЕХ ячеек в строке */
.table.shop-items-table > tbody > tr > td {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 14px 16px !important;
    vertical-align: middle;
    transition: var(--transition);
}

/* ПЕРВАЯ ячейка: левая граница и скругление */
.table.shop-items-table > tbody > tr > td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    text-align: center;
    width: 80px; /* Фиксируем ширину колонки с картинкой */
}

/* ПОСЛЕДНЯЯ ячейка (кнопка/цена): правая граница и скругление */
.table.shop-items-table > tbody > tr > td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    text-align: right;
    white-space: nowrap; /* ЗАПРЕЩАЕМ перенос кнопки/цены */
    width: 1%; /* ТРЮК: заставляем колонку сжаться до размера контента */
}

/* СРЕДНИЕ ячейки: убираем вертикальные границы, чтобы строка выглядела цельной */
.table.shop-items-table > tbody > tr > td:not(:first-child):not(:last-child) {
    border-left: none;
    border-right: none;
}

/* 3. Исправление длинного текста (название предмета) */
/* Предполагаем, что название во 2-й колонке. Если в другой, поменяй nth-child(2) */
.table.shop-items-table > tbody > tr > td:nth-child(2) {
    max-width: 350px; /* Ограничиваем ширину, чтобы текст переносился */
}

.shop-item-text {
    font-weight: 600;
    color: var(--text);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; /* РАЗРЕШАЕМ перенос текста на новую строку */
    line-height: 1.4;
    display: block;
}

/* 4. Эффект при наведении на ВЕСЬ ряд сразу */
.table.shop-items-table > tbody > tr:hover > td {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    /* ВАЖНО: никакого transform: translateX, чтобы границы не разъезжались! */
}

/* 5. Картинки внутри таблицы */
.table.shop-items-table > tbody > tr > td img {
    max-height: 48px;
    width: auto;
    display: block;
    margin: 0 auto;
    transition: var(--transition);
}

.table.shop-items-table > tbody > tr:hover > td img {
    transform: scale(1.1);
}

/* 6. Анимация появления строк */
.table.shop-items-table > tbody > tr:nth-child(1) { animation-delay: 0.05s; }
.table.shop-items-table > tbody > tr:nth-child(2) { animation-delay: 0.1s; }
.table.shop-items-table > tbody > tr:nth-child(3) { animation-delay: 0.15s; }
.table.shop-items-table > tbody > tr:nth-child(4) { animation-delay: 0.2s; }
.table.shop-items-table > tbody > tr:nth-child(5) { animation-delay: 0.25s; }

/* =========================================
   6. БЛОК ПОКУПКИ
   ========================================= */
.shop-purchase-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 240, 220, 0.85));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-top: 4px solid var(--accent);
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: 16px;
    box-shadow: inset 0 2px 8px rgba(255, 152, 0, 0.1);
    position: relative;
}

.shop-purchase-box::before {
    content: '💎';
    position: absolute;
    top: -18px;
    right: 20px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.95);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    border: 2px solid var(--accent);
}

.purchase-info {
    margin-bottom: 16px;
}

.purchase-info-row {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    padding: 4px 0;
}

.purchase-info-row strong {
    color: var(--text);
    font-weight: 600;
}

.purchase-price-block {
    background: linear-gradient(135deg, rgba(201, 155, 75, 0.1), rgba(212, 175, 55, 0.08));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    margin-top: 12px;
}

.purchase-price-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 6px;
}

#totalPrice {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #c99b4b, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.purchase-notes {
    margin-top: 20px;
    padding-top: 16px !important;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.purchase-notes p {
    font-size: 12px !important;
    color: #555;
    line-height: 1.6;
    margin: 4px 0 !important;
    padding-left: 16px;
    position: relative;
}

.purchase-notes p::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-weight: bold;
}

/* =========================================
   7. ИСПРАВЛЕНИЕ МОДАЛОК (BOOTSTRAP 3 FIX)
   ========================================= */
#purchaseItem .modal-content,
#transferShopPoints .modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#purchaseItem .modal-title,
#transferShopPoints .modal-title {
    color: var(--primary) !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

#purchaseItem .form-group,
#transferShopPoints .form-group {
    margin-bottom: 16px;
}

#purchaseItem label,
#transferShopPoints label {
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    display: block;
    font-size: 13px;
}

/* SELECT и INPUTS */
#purchaseItem select.form-control,
#purchaseItem input[type="text"].form-control,
#purchaseItem input[type="number"].form-control,
#transferShopPoints input[type="text"].form-control,
#transferShopPoints input[type="number"].form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    height: auto !important; /* Ключевое исправление для Bootstrap 3 */
    line-height: 1.5;
    transition: var(--transition);
    color: #333;
    font-size: 14px;
    width: 100%;
}

#purchaseItem select.form-control:focus,
#purchaseItem input[type="text"]:focus,
#purchaseItem input[type="number"]:focus,
#transferShopPoints input[type="text"]:focus,
#transferShopPoints input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(98, 32, 180, 0.15);
    outline: none;
    background: #fff;
}

/* INPUT-GROUP (Кнопки +/-) */
#purchaseItem .input-group {
    display: table;
    width: 100%;
    border-collapse: separate;
}

#purchaseItem .input-group .form-control {
    display: table-cell;
    width: 100%;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    border-radius: 0;
    margin: 0;
    vertical-align: middle;
    height: 38px !important;
    padding: 6px 12px;
    -moz-appearance: textfield;
}

#purchaseItem .input-group .form-control::-webkit-outer-spin-button,
#purchaseItem .input-group .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#purchaseItem .input-group-btn {
    display: table-cell;
    width: 1%;
    vertical-align: middle;
}

#purchaseItem .input-group-btn .btn {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
    transition: var(--transition);
    min-width: 40px;
    height: 38px !important;
    line-height: 36px !important;
    display: inline-block;
    vertical-align: middle;
}

#purchaseItem .input-group-btn:first-child .btn {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

#purchaseItem .input-group-btn:last-child .btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
}

#purchaseItem .input-group-btn .btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    color: #fff !important;
    transform: scale(1.05);
}

#purchaseItem .input-group-btn .btn:active {
    transform: scale(0.95);
}

/* Подарок */
#purchaseItem #giftInput {
    animation: fadeInUp 0.3s ease;
    padding: 12px;
    background: rgba(255, 152, 0, 0.08);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
    margin-top: 12px;
}

#purchaseItem #giftInput label {
    color: #555;
    font-size: 13px;
}

#purchaseItem #giftInput input {
    margin-top: 6px;
}

/* =========================================
   8. ХЛЕБНЫЕ КРОШКИ, ИСТОРИЯ И ПОИСК
   ========================================= */
.shop-container .breadcrumb {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 13px;
}

.shop-container .breadcrumb a {
    color: var(--primary);
    transition: var(--transition);
    text-decoration: none;
}

.shop-container .breadcrumb a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.shop-container .breadcrumb .glyphicon {
    margin-right: 6px;
    color: var(--accent);
}

.search-results-block,
.history-block {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    animation: fadeInUp 0.4s ease;
}

.search-results-title,
.history-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Таблица истории */
.shop-container .shop-content table,
.shop-container .shop-content .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.shop-container .shop-content table thead th {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border: none;
}

.shop-container .shop-content table thead th:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.shop-container .shop-content table thead th:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.shop-container .shop-content table tbody tr {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    transition: var(--transition);
    animation: fadeInUp 0.4s ease backwards;
}

.shop-container .shop-content table tbody tr:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
}

.shop-container .shop-content table tbody td {
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #333;
    vertical-align: middle;
}

.shop-container .shop-content table tbody td:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.shop-container .shop-content table tbody td:last-child {
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.shop-container .shop-content table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.shop-container .shop-content table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.shop-container .shop-content table tbody tr:nth-child(3) { animation-delay: 0.15s; }

/* Алерты */
.shop-container .items-content .alert {
    border-radius: var(--radius);
    border: 1px solid;
    padding: 16px 20px;
    backdrop-filter: blur(8px);
    margin-bottom: 20px;
}

.shop-container .items-content .alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

.shop-container .items-content .alert-danger,
.shop-container .items-content .alert-error {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #721c24;
}

.shop-container .items-content .alert-success {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
    color: #155724;
}

/* =========================================
   9. АНИМАЦИИ
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   10. АДАПТИВНОСТЬ
   ========================================= */
@media (max-width: 768px) {
    .shop-container > .shop-content > .row {
        display: block;
    }
    
    .shop-container > .shop-content > .row > .sidebar,
    .shop-container > .shop-content > .row > .items-content {
        display: block;
        width: 100%;
    }
    
    .shop-balance-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .shop-search-wrapper {
        text-align: center;
        margin: 10px;
    }
    
    .shop-search-wrapper form {
        flex-direction: column;
        width: 100%;
    }
    
    .shop-search-wrapper input[type="text"] {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .shop-balance-row {
        grid-template-columns: 1fr;
    }
}

/* ===== БЛОК "НЕДЕЛЬНОЕ ПРЕДЛОЖЕНИЕ" ===== */
.weekly-special-block {
    background: linear-gradient(135deg, rgba(255, 240, 220, 0.7), rgba(255, 220, 180, 0.6));
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.5s ease backwards;
}

.weekly-special-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b00, var(--accent), #ff6b00);
    background-size: 200% 100%;
    animation: shop-shimmer 3s linear infinite;
}

.weekly-special-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px dashed rgba(255, 152, 0, 0.3);
}

.weekly-special-icon {
    font-size: 48px;
    line-height: 1;
    animation: flame-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.5));
}

@keyframes flame-pulse {
    0%, 100% { transform: scale(1) rotate(-3deg); }
    50% { transform: scale(1.1) rotate(3deg); }
}

.weekly-special-text {
    flex: 1;
}

.weekly-special-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
    background: linear-gradient(135deg, #c0392b, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.weekly-special-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
}

.weekly-special-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 24px rgba(231, 76, 60, 0.6); }
}

.weekly-special-content {
    position: relative;
    z-index: 1;
}

/* ===== АДАПТИВ ДЛЯ НЕДЕЛЬНОГО ПРЕДЛОЖЕНИЯ ===== */
@media (max-width: 768px) {
    .weekly-special-header {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .weekly-special-icon {
        font-size: 36px;
    }
    
    .weekly-special-title {
        font-size: 20px;
    }
}

/* =========================================
   КАРТОЧКА ТОВАРА (ДЕТАЛИ ПРЕДМЕТА)
   ========================================= */

/* Основной блок карточки */
.shop-item-detail {
    background: linear-gradient(135deg, rgba(18, 29, 59, 0.95), rgba(30, 40, 70, 0.9));
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 32px !important;
    margin: 24px 0 !important;
    color: #e0e0e0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease backwards;
}

/* Декоративная полоса сверху */
.shop-item-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: shop-shimmer 3s linear infinite;
}

/* Декоративный элемент в углу */
.shop-item-detail::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    opacity: 0.3;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.6; transform: scale(1.1) rotate(10deg); }
}

/* ===== НАЗВАНИЕ ПРЕДМЕТА ===== */
.shop-item-detail h3,
.shop-item-detail .item-name {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 0 16px 0 !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    letter-spacing: 0.5px !important;
    position: relative;
    z-index: 1;
}

/* ===== ИЗОБРАЖЕНИЕ ПРЕДМЕТА ===== */
.shop-item-detail img {
    max-width: 128px !important;
    height: auto !important;
    display: block !important;
    margin: 20px auto !important;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)) !important;
    transition: var(--transition) !important;
    position: relative;
    z-index: 1;
}

.shop-item-detail img:hover {
    transform: scale(1.1) rotate(-3deg) !important;
    filter: drop-shadow(0 12px 30px rgba(255, 152, 0, 0.4)) !important;
}

/* ===== КАЧЕСТВО ПРЕДМЕТА ===== */
.shop-item-detail .shop-quality-2,
.shop-item-detail .shop-quality-3,
.shop-item-detail .shop-quality-4,
.shop-item-detail .shop-quality-5,
.shop-item-detail .shop-quality-6,
.shop-item-detail .shop-quality-7,
.shop-item-detail .shop-quality-8,
.shop-item-detail .shop-quality-9 {
    font-size: 18px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    margin: 8px 0 !important;
}

.shop-item-detail .shop-quality-2 {
    background: rgba(105, 225, 94, 0.15) !important;
    border: 1px solid rgba(105, 225, 94, 0.4) !important;
}

.shop-item-detail .shop-quality-3 {
    background: rgba(76, 207, 255, 0.15) !important;
    border: 1px solid rgba(76, 207, 255, 0.4) !important;
}

.shop-item-detail .shop-quality-4 {
    background: rgba(240, 183, 28, 0.15) !important;
    border: 1px solid rgba(240, 183, 28, 0.4) !important;
}

.shop-item-detail .shop-quality-5 {
    background: rgba(240, 128, 51, 0.15) !important;
    border: 1px solid rgba(240, 128, 51, 0.4) !important;
}

.shop-item-detail .shop-quality-6 {
    background: rgba(176, 110, 232, 0.15) !important;
    border: 1px solid rgba(176, 110, 232, 0.4) !important;
}

.shop-item-detail .shop-quality-7 {
    background: rgba(217, 168, 57, 0.15) !important;
    border: 1px solid rgba(217, 168, 57, 0.4) !important;
}

.shop-item-detail .shop-quality-8 {
    background: rgba(232, 110, 240, 0.15) !important;
    border: 1px solid rgba(232, 110, 240, 0.4) !important;
}

.shop-item-detail .shop-quality-9 {
    background: rgba(254, 75, 75, 0.15) !important;
    border: 1px solid rgba(254, 75, 75, 0.4) !important;
    animation: legendary-glow 2s ease-in-out infinite !important;
}

@keyframes legendary-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(254, 75, 75, 0.3); }
    50% { box-shadow: 0 0 20px rgba(254, 75, 75, 0.6); }
}

/* ===== ХАРАКТЕРИСТИКИ ПРЕДМЕТА ===== */
.shop-item-detail p,
.shop-item-detail .item-stats {
    font-size: 14px !important;
    line-height: 1.8 !important;
    color: #ccc !important;
    margin: 8px 0 !important;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: var(--radius-sm) !important;
    border-left: 3px solid var(--accent) !important;
    position: relative;
    z-index: 1;
}

.shop-item-detail p strong,
.shop-item-detail .item-stats strong {
    color: #fff !important;
    font-weight: 600 !important;
}

/* ===== РАЗДЕЛИТЕЛЬ ===== */
.shop-item-detail hr {
    border: none !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    margin: 20px 0 !important;
}

/* ===== ОПИСАНИЕ ПРЕДМЕТА ===== */
.shop-item-detail .item-description {
    font-size: 13px !important;
    color: #aaa !important;
    font-style: italic !important;
    line-height: 1.6 !important;
    padding: 12px 16px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: var(--radius-sm) !important;
    border-left: 3px solid var(--primary-light) !important;
    margin: 16px 0 !important;
}

/* ===== БЕЙДЖИ (если есть) ===== */
.shop-item-detail .badge,
.shop-item-detail .item-badge {
    display: inline-block !important;
    padding: 4px 12px !important;
    background: linear-gradient(135deg, var(--accent), #ffb74d) !important;
    color: #000 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 20px !important;
    margin: 4px !important;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3) !important;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .shop-item-detail {
        padding: 20px !important;
    }
    
    .shop-item-detail h3,
    .shop-item-detail .item-name {
        font-size: 22px !important;
    }
    
    .shop-item-detail img {
        max-width: 96px !important;
    }
}

/* === СЕТКА КАРТОЧЕК ТОВАРА (ГОРИЗОНТАЛЬНАЯ) === */
.items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px 5px;
}

/* ===== ГОРИЗОНТАЛЬНАЯ КАРТОЧКА ===== */
.item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1.5px solid rgba(98,32,180,0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: relative;
    padding: 8px;
    animation: fadeInUp 0.4s ease backwards;
}

.item-card:nth-child(1) { animation-delay: 0.03s; }
.item-card:nth-child(2) { animation-delay: 0.06s; }
.item-card:nth-child(3) { animation-delay: 0.09s; }
.item-card:nth-child(4) { animation-delay: 0.12s; }
.item-card:nth-child(5) { animation-delay: 0.15s; }
.item-card:nth-child(6) { animation-delay: 0.18s; }

/* Декоративная полоса сверху */
.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6220b4, #ff9800, #6220b4);
    opacity: 0.6;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98,32,180,0.2);
    border-color: #6220b4;
}

.item-card:hover::before { opacity: 1; }

/* Цветная левая полоса по качеству */
.item-card.quality-0, .item-card.quality-1 { border-left: 3px solid #000; }
.item-card.quality-2 { border-left: 3px solid #69e15e; }
.item-card.quality-3 { border-left: 3px solid #4ccfff; }
.item-card.quality-4 { border-left: 3px solid #f0b71c; }
.item-card.quality-5 { border-left: 3px solid #f08033; }
.item-card.quality-6 { border-left: 3px solid #8f39ce; }
.item-card.quality-7 { border-left: 3px solid #d9a839; }
.item-card.quality-8 { border-left: 3px solid #d944ec; }
.item-card.quality-9 { 
    border-left: 3px solid #fe4b4b;
    box-shadow: 0 0 8px rgba(254,75,75,0.15);
}

/* ===== ИКОНКА СЛЕВА ===== */
.item-icon-wrap {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(98,32,180,0.04), rgba(255,152,0,0.02));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.item-icon {
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.15));
    transition: transform 0.2s ease;
    border-radius: 4px;
}

.item-card:hover .item-icon { 
    transform: scale(1.08); 
    filter: drop-shadow(0 0 6px rgba(255,215,0,0.6));
}

/* ===== КОНТЕНТ ПО ЦЕНТРУ ===== */
.item-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.item-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.item-card-link:hover { text-decoration: none; }

/* Название предмета */
.item-card .item-name {
    font-size: 11px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.item-card .item-name.shop-quality-2 { color: #27ae60; }
.item-card .item-name.shop-quality-3 { color: #2980b9; }
.item-card .item-name.shop-quality-4 { color: #d4af37; }
.item-card .item-name.shop-quality-5 { color: #e67e22; }
.item-card .item-name.shop-quality-6 { color: #8e44ad; }
.item-card .item-name.shop-quality-7 { color: #b8860b; }
.item-card .item-name.shop-quality-8 { color: #c030d0; }
.item-card .item-name.shop-quality-9 { 
    color: #e74c3c; 
    text-shadow: 0 0 4px rgba(254,75,75,0.2);
}

/* Бейджи (зачар, темпранс, количество) */
.item-card-badges {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    align-items: center;
}

.item-badge {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    white-space: nowrap;
}

.item-badge.enchant {
    background: rgba(231,76,60,0.15);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.3);
}

.item-badge.temper {
    background: rgba(255,152,0,0.15);
    color: #e67e22;
    border: 1px solid rgba(255,152,0,0.3);
}

.item-badge.qty {
    background: rgba(108,117,125,0.15);
    color: #6c757d;
    border: 1px solid rgba(108,117,125,0.3);
}

/* ===== ЦЕНА + КНОПКА СПРАВА ===== */
.item-card-right {
    flex-shrink: 0;
    text-align: right;
    padding-left: 8px;
    border-left: 1px solid rgba(98,32,180,0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    min-width: 70px;
}

.item-card .item-price {
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, #6220b4, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    white-space: nowrap;
}

.item-card .btn-buy {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #6220b4, #8e44ad);
    color: #fff !important;
    border-radius: 5px;
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(98,32,180,0.25);
    white-space: nowrap;
}

.item-card .btn-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(98,32,180,0.4);
    color: #fff !important;
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.items-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    border: 1px dashed rgba(98,32,180,0.2);
    color: #666;
    font-size: 13px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
    .items-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .items-grid { grid-template-columns: 1fr; }
    .item-card .item-name { font-size: 10px; }
    .item-card .item-price { font-size: 11px; }
}

/* === ОСНОВНОЙ СПИСОК: 2 КОЛОНКИ, БОЛЬШЕ КАРТОЧКИ === */
.items-grid-main {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 10px;
}

/* Увеличенная иконка */
.items-grid-main .item-icon-wrap {
    width: 75px;
    height: 75px;
    padding: 6px;
}

.items-grid-main .item-icon {
    max-width: 63px;
    max-height: 63px;
}

/* Увеличенный отступ карточки */
.items-grid-main .item-card {
    padding: 14px 12px;
    gap: 14px;
}

/* Название крупнее */
.items-grid-main .item-card .item-name {
    font-size: 13px;
    min-height: auto;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
}

/* Бейджи крупнее */
.items-grid-main .item-badge {
    font-size: 10px;
    padding: 2px 7px;
}

/* Цена крупнее */
.items-grid-main .item-card .item-price {
    font-size: 16px;
}

/* Кнопка крупнее */
.items-grid-main .item-card .btn-buy {
    padding: 7px 14px;
    font-size: 11px;
}

/* Правый блок шире */
.items-grid-main .item-card-right {
    min-width: 90px;
    padding-left: 12px;
}

/* Адаптив */
@media (max-width: 768px) {
    .items-grid-main {
        grid-template-columns: 1fr;
    }
}

/* === ФОТОГРАФИИ ПРЕДМЕТА === */
.item-photos-section {
    margin-top: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(98, 32, 180, 0.15);
    border-radius: var(--radius);
}

.photos-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(98, 32, 180, 0.15);
}

.item-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.photo-slot {
    aspect-ratio: 1;
    border: 2px dashed rgba(98, 32, 180, 0.3);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.5);
}

.photo-slot.empty {
    cursor: pointer;
}

.photo-slot.empty:hover {
    border-color: var(--primary);
    background: rgba(98, 32, 180, 0.05);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(98, 32, 180, 0.15);
}

.photo-slot.empty.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.photo-slot.empty.disabled:hover {
    transform: none;
    box-shadow: none;
}

.photo-slot.filled {
    border-style: solid;
    border-color: rgba(98, 32, 180, 0.2);
    cursor: pointer;
}

.photo-upload-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 10px;
}

.photo-upload-placeholder .upload-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.photo-upload-placeholder .upload-text {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.photo-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.photo-slot.filled:hover .photo-thumbnail {
    transform: scale(1.05);
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
    color: #fff;
    padding: 20px 8px 8px;
    font-size: 10px;
    text-align: center;
    opacity: 0;
    transition: var(--transition);
}

.photo-slot.filled:hover .photo-info {
    opacity: 1;
}

.photos-note {
    display: block;
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 60px rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    line-height: 1;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 152, 0, 0.8);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .item-photos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .photo-upload-placeholder .upload-icon {
        font-size: 28px;
    }
    
    .photo-upload-placeholder .upload-text {
        font-size: 10px;
    }
}

/* ===== КОНТЕЙНЕР ПРАВИЛ ЗАГРУЗКИ ФОТО ===== */
.photos-note-container {
    margin: 16px 20px;
    background: linear-gradient(135deg, rgba(98, 32, 180, 0.08), rgba(255, 152, 0, 0.06));
    border: 1px solid rgba(98, 32, 180, 0.2);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(98, 32, 180, 0.1);
}

.photos-note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(98, 32, 180, 0.15);
    font-size: 14px;
    font-weight: 700;
    color: #6220b4;
}

.photos-note-header i.fa-camera {
    font-size: 18px;
    animation: camera-shake 2s ease-in-out infinite;
}

@keyframes camera-shake {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
    30% { transform: rotate(0deg); }
}

.photos-rules-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.photos-rules-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text, #2c3e50);
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.photos-rules-list li:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rule-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.photos-rules-list li strong {
    color: #6220b4;
    font-weight: 700;
}

.photos-note-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(98, 32, 180, 0.2);
    font-size: 11px;
    color: var(--text-muted, #6c757d);
    display: flex;
    align-items: center;
    gap: 6px;
    font-style: italic;
}

.photos-note-footer i {
    color: #ff9800;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .photos-note-container {
        margin: 12px 10px;
        padding: 12px;
    }
    .photos-rules-list li {
        font-size: 11px;
        padding: 5px 8px;
    }
}
