/* Club Stock V2 Styles */

.club-stock-upload {
    padding: 20px 0;
}

.club-stock-title {
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Поиск */
.club-stock-search {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.club-stock-search .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 14px;
    margin-bottom: 0;
    height: 40px;
}

.club-stock-search .form-control:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
}

.club-stock-search .btn {
    border-radius: 6px;
    padding: 5px 20px;
    font-size: 14px;
}

/* Контейнер для кнопок поиска */
.club-stock-search-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Кнопка поиска */
#club-stock-search-btn {
    background: #B11E2F;
    border-color: #B11E2F;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

#club-stock-search-btn:hover {
    background: #9a1a28;
    border-color: #9a1a28;
    color: white;
    transform: translateY(-1px);
}

#club-stock-search-btn svg {
    flex-shrink: 0;
}

/* Кнопка очистки */
#club-stock-clear-search {
    background: #333;
    border-color: #333;
    color: white;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 6px;
}

#club-stock-clear-search:hover {
    background: #000;
    border-color: #000;
    color: white;
    transform: translateY(-1px);
}

#club-stock-clear-search svg {
    width: 16px;
    height: 16px;
}
#club-stock-create-product {
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Кнопки модуля загрузки остатков */

#club-stock-load-more {
    background: #B11E2F;
    border-color: #B11E2F;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

#club-stock-load-more:hover {
    background: #9a1a28;
    border-color: #9a1a28;
    color: white;
    transform: translateY(-1px);
}

.product-actions .btn-stock-details {
    background: #B11E2F;
    border-color: #B11E2F;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    max-height: 35px;
    padding: 3px 13px;
}

.product-actions .btn-stock-details:hover {
    background: #9a1a28;
    border-color: #9a1a28;
    color: white;
    transform: translateY(-1px);
}

.product-actions .btn-add-version {
    background: #28a745;
    border-color: #28a745;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    max-height: 35px;
    padding: 3px 10px;
    margin-top: 5px;
}

.product-actions .btn-add-version:hover {
    background: #218838;
    border-color: #218838;
    color: white;
    transform: translateY(-1px);
}

/* Таблица */
.club-stock-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 200px;
}

.club-stock-table {
    margin-bottom: 0;
}

.club-stock-table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 15px 12px;
    vertical-align: middle;
    text-align: center;
}

.club-stock-table thead th:first-child {
    width: 35%;
    text-align: left;
}

.club-stock-table thead th:nth-child(2) {
    width: 8%;
}
.club-stock-table thead th:nth-child(6) {
    width: 10%;
}

.club-stock-table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}
.club-stock-table tbody td:first-child {
    text-align: left;
}

.club-stock-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Колонки таблицы */
.product-title {
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.product-title-link {
    color: #B11E2F;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.product-title-link:hover {
    color: #9a1a28;
    text-decoration: underline;
}

.product-sku {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #666;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.product-volume,
.product-harvest-year,
.product-strana {
    text-align: center;
    color: #666;
}

.product-total-stock {
    text-align: center;
    font-weight: 600;
    color: #28a745;
}

.product-actions {
    text-align: center;
}

/* Кнопки */
.btn-stock-details {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: #B11E2F;
}

/* Индикатор загрузки */
#club-stock-loading {
    padding: 20px;
}

#club-stock-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    color: #007cba;
}

#club-stock-loading p {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Кнопка "Загрузить еще" */
#club-stock-load-more-container {
    padding: 20px;
}

#club-stock-load-more {
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#club-stock-load-more:hover {
    transform: translateY(-1px);
}

#club-stock-load-more:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Модальное окно */
#club-stock-detail-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

#club-stock-detail-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#club-stock-detail-modal .modal-dialog {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

#club-stock-detail-modal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#club-stock-detail-modal .modal-title {
    color: #333;
    font-weight: 600;
    margin: 0;
    font-size: 18px;
}

#club-stock-detail-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#club-stock-detail-modal .modal-close:hover {
    background-color: none;
    color: #666;
}

#club-stock-detail-modal .modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Детальная информация по остаткам */
.stock-details-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.stock-details-header h6 {
    margin-bottom: 5px;
    color: #333;
}

.stock-details-header h6:last-child {
    margin-bottom: 0;
}

.stock-details-header strong {
    color: #007cba;
}

/* Таблица в модальном окне */
#club-stock-detail-modal .table {
    margin-bottom: 0;
}

#club-stock-detail-modal .table thead th {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

#club-stock-detail-modal .table tbody td {
    border-bottom: 1px solid #dee2e6;
}

#club-stock-detail-modal .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .club-stock-search .row {
        flex-direction: column;
    }
    
    .club-stock-search .col-md-6 {
        margin-bottom: 10px;
    }
    
    .club-stock-search .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .club-stock-table-container {
        overflow-x: auto;
    }
    
    .club-stock-table {
        min-width: 600px;
    }
    
    .club-stock-table th,
    .club-stock-table td {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .btn-stock-details {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 576px) {
    .club-stock-upload {
        padding: 10px 0;
    }
    
    .club-stock-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .club-stock-search {
        padding: 15px;
    }
    
    .club-stock-table {
        min-width: 500px;
    }
    
    .club-stock-table th,
    .club-stock-table td {
        padding: 6px 4px;
        font-size: 12px;
    }
    
    #club-stock-detail-modal .modal-dialog {
        width: 95%;
        max-width: none;
        margin: 10px;
    }
}

/* Анимации */
.club-stock-table tbody tr {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Состояния загрузки */
.club-stock-table.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Пустое состояние */
.club-stock-table tbody .text-center {
    padding: 40px 20px;
    font-style: italic;
}

.club-stock-table tbody .text-muted {
    color: #6c757d !important;
}

.club-stock-table tbody .text-danger {
    color: #dc3545 !important;
}

/* Индикаторы загрузки */
.club-stock-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
    backdrop-filter: blur(2px);
}

.club-stock-loading-content {
    text-align: center;
}

.club-stock-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: club-stock-spin 1s linear infinite;
    margin: 0 auto 15px;
}

.club-stock-loading-text {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
    text-align: center;
}

@keyframes club-stock-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#club-stock-detail-content {
    min-height: 60px;
}

/* Индикатор загрузки для модального окна */
.club-stock-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 15;
    border-radius: 8px;
}

.club-stock-modal-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: club-stock-spin 1s linear infinite;
    margin: 0 auto 10px;
}

.club-stock-modal-loading-text {
    color: #666;
    font-size: 13px;
    margin: 0;
    font-weight: 500;
    text-align: center;
}

/* Компактный индикатор загрузки в таблице */
.club-stock-table-loading-row {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px;
}

.club-stock-table-loading-row .club-stock-spinner {
    width: 30px;
    height: 30px;
    border-width: 3px;
    margin-bottom: 10px;
}

.club-stock-table-loading-row .club-stock-loading-text {
    font-size: 14px;
    color: #666;
    margin: 0;
    text-align: center;
}

/* Адаптивность для индикаторов загрузки */
@media (max-width: 768px) {
    .club-stock-spinner {
        width: 30px;
        height: 30px;
        border-width: 3px;
    }
    
    .club-stock-loading-text {
        font-size: 13px;
    }
    
    .club-stock-modal-spinner {
        width: 25px;
        height: 25px;
        border-width: 2px;
    }
    
    .club-stock-modal-loading-text {
        font-size: 12px;
    }
    
    .club-stock-table-loading-row {
        padding: 20px 15px;
    }
    
    .club-stock-table-loading-row .club-stock-spinner {
        width: 25px;
        height: 25px;
        border-width: 2px;
    }
    
    .club-stock-table-loading-row .club-stock-loading-text {
        font-size: 13px;
    }
    
    /* Адаптивность для кнопок поиска */
    .club-stock-search-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    #club-stock-search-btn {
        width: 100%;
        justify-content: center;
    }
    
    #club-stock-clear-search {
        width: 100%;
        height: 36px;
    }
}

@media (max-width: 576px) {
    .club-stock-search .row {
        flex-direction: column;
    }
    
    .club-stock-search .col-md-8,
    .club-stock-search .col-md-4 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .club-stock-search-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    #club-stock-search-btn {
        flex: 1;
    }
    
    #club-stock-clear-search {
        width: 40px;
        height: 40px;
    }
}

/* Стили для редактируемых полей */
.stock-input,
.price-input {
    width: 80px;
    text-align: right;
    font-size: 13px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.stock-input:focus,
.price-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
    outline: none;
}

.warehouse-editable .save-warehouse-data {
    font-size: 12px;
    padding: 4px 8px;
    min-width: 80px;
    background-color: #B11E2F;
    border-color: #B11E2F;
    color: white;
}

.warehouse-editable .save-warehouse-data:hover {
    background-color: #9a1a28;
    border-color: #9a1a28;
    color: white;
}

.warehouse-editable .save-warehouse-data:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #9a1a28;
}

.warehouse-editable .save-warehouse-data .spinner-border-sm {
    width: 12px;
    height: 12px;
}

/* Стили для таблицы с редактируемыми полями */
.club-stock-detail-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    padding: 8px;
    text-align: center;
}

.club-stock-detail-table td {
    padding: 8px;
    vertical-align: middle;
}

.club-stock-detail-table .text-right {
    text-align: right;
}

.club-stock-detail-table .text-center {
    text-align: center;
}

/* Индикатор успешного сохранения */
.btn-outline-success {
    border-color: #28a745;
    color: #28a745;
}

/* Стиль для не установленной цены */
.text-muted {
    color: #6c757d !important;
    font-style: italic;
}

/* Стили для отформатированных цен */
.club-stock-detail-table .price-display {
    font-weight: 500;
    color: #28a745;
    font-family: 'Courier New', monospace;
}

.club-stock-detail-table .price-display.text-muted {
    color: #6c757d !important;
    font-weight: normal;
}

/* Стили для отображения остатков */
.club-stock-detail-table .stock-display {
    font-weight: 500;
    color: #007cba;
    font-family: 'Courier New', monospace;
}

/* Стили для строк таблицы */
.club-stock-detail-table .warehouse-editable {
    background-color: #f8f9fa;
}

.club-stock-detail-table .warehouse-editable:hover {
    background-color: #e9ecef;
}

.club-stock-detail-table .warehouse-readonly {
    background-color: #ffffff;
}

.club-stock-detail-table .warehouse-readonly:hover {
    background-color: #f8f9fa;
}

/* Индикатор доступности для редактирования */
.club-stock-detail-table .warehouse-editable td:first-child::before {
    content: "✏️ ";
    margin-right: 5px;
    font-size: 12px;
}

.club-stock-detail-table .warehouse-readonly td:first-child::before {
    content: "👁️ ";
    margin-right: 5px;
    font-size: 12px;
    opacity: 0.6;
}

/* Стили для легенды */
.warehouse-legend {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.warehouse-legend .legend-item {
    display: inline-block;
    margin-right: 15px;
}

.warehouse-legend .legend-icon {
    margin-right: 4px;
    font-size: 14px;
}

/* Адаптивность для редактируемых полей на мобильных */
@media (max-width: 768px) {
    .stock-input,
    .price-input {
        width: 60px;
        font-size: 11px;
        padding: 3px 4px;
    }
    
    .warehouse-editable .save-warehouse-data {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 60px;
    }
    
    .club-stock-detail-table th,
    .club-stock-detail-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    /* Скрываем иконки на мобильных для экономии места */
    .club-stock-detail-table .warehouse-editable td:first-child::before,
    .club-stock-detail-table .warehouse-readonly td:first-child::before {
        display: none;
    }
    
    /* Уменьшаем размеры отображения остатков и цен */
    .club-stock-detail-table .stock-display,
    .club-stock-detail-table .price-display {
        font-size: 11px;
    }
    
    /* Адаптивность для легенды на мобильных */
    .warehouse-legend .legend-item {
        display: block;
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .warehouse-legend .legend-item:last-child {
        margin-bottom: 0;
    }
}

/* Стили для колонки "Склад" */
.club-stock-detail-table th.text-left,
.club-stock-detail-table td.text-left {
    text-align: left !important;
}

/* Стили для состояния загрузки */
.stock-input:disabled,
.price-input:disabled {
    background-color: #f8f9fa !important;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Стили для успешного сохранения */
.club-stock-detail-table tr.saved-successfully {
    background-color: #d4edda !important;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.club-stock-detail-table tr.saved-successfully td {
    color: #155724;
}

/* Анимация для кнопки сохранения */
.save-warehouse-data .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}

/* Стили для кнопки в состоянии загрузки */
.save-warehouse-data:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Стили для обновления основной таблицы */
.table-updated {
    background-color: #e8f5e8 !important;
    border-left: 4px solid #28a745 !important;
    transition: all 0.5s ease;
}

.table-updated .product-total-stock {
    font-weight: bold;
    color: #155724;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Стили для новой добавленной строки */
.club-stock-detail-table tr.newly-added {
    background-color: #d4edda !important;
    border-left: 4px solid #28a745 !important;
    animation: highlightNewRow 2s ease-in-out;
}

@keyframes highlightNewRow {
    0% { 
        background-color: #d4edda !important;
        transform: scale(1.02);
    }
    50% { 
        background-color: #c3e6cb !important;
    }
    100% { 
        background-color: #d4edda !important;
        transform: scale(1);
    }
}

/* Модальное окно для добавления версии товара */
#add-product-version-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

#add-product-version-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#add-product-version-modal .modal-dialog {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

#add-product-version-modal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#add-product-version-modal .modal-title {
    color: #333;
    font-weight: 600;
    margin: 0;
    font-size: 18px;
}

#add-product-version-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#add-product-version-modal .modal-close:hover {
    background-color: none;
    color: #666;
}

#add-product-version-modal .modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

#add-product-version-modal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#add-product-version-modal .row {
    width: 100%;
}
#add-product-version-modal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 5px;
}

#add-product-version-modal .form-control,
#add-product-version-modal .form-select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
#club-create-product-form .form-select,
#add-product-version-modal .form-select {
    height: 50px;
}

#add-product-version-modal .form-control:focus,
#add-product-version-modal .form-select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
}

#add-product-version-modal .form-control[readonly] {
    background-color: #f8f9fa;
    opacity: 1;
}

#add-product-version-modal .btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 16px;
}

#add-product-version-modal .btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

#add-product-version-modal .btn-success:hover:not(:disabled) {
    background-color: #218838;
    border-color: #218838;
    color: white;
}

#add-product-version-modal .btn-success:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    color: white;
}

#add-product-version-modal .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

#add-product-version-modal .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: white;
}

/* Индикатор загрузки для модального окна версии */
#version-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 15;
    border-radius: 8px;
    height: 100vh;
}

/* Блокировка скролла страницы при открытом модальном окне */
body.modal-open {
    overflow: hidden;
}

/* ===== СТИЛИ ВКЛАДОК ===== */
.club-stock-tabs {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid #e1e1e1;
    margin: 0;
    background: #f8f9fa;
}

.tab-button {
    background: none;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.tab-button:hover {
    color: #333;
    background-color: #fff;
}

.tab-button.active {
    color: #B11E2F;
    border-bottom-color: #B11E2F;
    background-color: #fff;
    font-weight: 600;
}

.tab-content {
    position: relative;
    padding: 0;
}

.tab-panel {
    display: none;
    padding: 20px;
}

.tab-panel.active {
    display: block;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .tab-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .tab-panel {
        padding: 15px;
    }
}

/* Стили для секции управления складами */
#warehouse-management-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

#show-warehouse-forms-btn {
    background-color: #007cba;
    border-color: #007cba;
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#show-warehouse-forms-btn:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: white;
    transform: translateY(-1px);
}

#warehouse-forms-container {
    margin-top: 15px;
}

/* Стили для карточек форм */
#warehouse-forms-container .card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#warehouse-forms-container .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
}

#warehouse-forms-container .card-header h6 {
    margin: 0;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
}

#warehouse-forms-container .card-body {
    padding: 16px;
}

/* Стили для форм */
#warehouse-forms-container .form-label {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}
#warehouse-forms-container .form-select,
#warehouse-forms-container .form-control {
    height: 40px;
    margin-bottom: 0;
    font-size: 13px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 10px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#warehouse-forms-container .form-select:focus,
#warehouse-forms-container .form-control:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
    outline: none;
}

/* Стили для кнопок форм */
#warehouse-forms-container .row {
    width: 100%;
}
#warehouse-forms-container .btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#warehouse-forms-container .btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    height: 40px;
}

#warehouse-forms-container .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

#warehouse-forms-container .btn-primary {
    background-color: #007cba;
    border-color: #007cba;
    color: white;
    height: 40px;
}

#warehouse-forms-container .btn-primary:hover {
    background-color: #005a87;
    border-color: #004085;
    color: white;
}

#warehouse-forms-container .btn-outline-success {
    border-color: #28a745;
    color: #28a745;
    background-color: transparent;
}

#warehouse-forms-container .btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

/* Стили для состояний кнопок */
#warehouse-forms-container .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#warehouse-forms-container .btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}

/* Адаптивность для форм складов */
@media (max-width: 768px) {
    #warehouse-forms-container .row {
        flex-direction: column;
    }
    
    #warehouse-forms-container .col-md-4,
    #warehouse-forms-container .col-md-8 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #warehouse-forms-container .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    #warehouse-forms-container .d-flex.align-items-end {
        align-items: flex-start;
    }
    
    #warehouse-forms-container .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    #warehouse-forms-container .card-body {
        padding: 12px;
    }
    
    #warehouse-forms-container .form-label {
        font-size: 12px;
    }
    
    #warehouse-forms-container .form-select,
    #warehouse-forms-container .form-control {
        font-size: 12px;
        padding: 5px 8px;
    }
}

@media (max-width: 576px) {
    #warehouse-management-section {
        margin-top: 15px;
        padding-top: 15px;
    }
    
    #show-warehouse-forms-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    #warehouse-forms-container .card-header {
        padding: 10px 12px;
    }
    
    #warehouse-forms-container .card-header h6 {
        font-size: 13px;
    }
    
    #warehouse-forms-container .card-body {
        padding: 10px;
    }
}

/* ===== МОДАЛЬНОЕ ОКНО СОЗДАНИЯ ТОВАРА ===== */

.club-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.club-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.club-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.club-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.club-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.club-modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.club-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.club-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Форма создания товара */
#club-create-product-form .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

#club-create-product-form .form-control,
#club-create-product-form .form-select {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 10px 12px;
    font-size: 14px;
}

#club-create-product-form .form-select {
    margin-bottom: 0;
}

#club-create-product-form .form-control:focus,
#club-create-product-form .form-select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
}

/* Загрузка изображения */
.product-image-upload {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.2s ease;
}

.product-image-upload:hover {
    border-color: #007cba;
    background: #f0f8ff;
}

.product-image-preview {
    margin-bottom: 15px;
}

.product-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#select-product-image {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#select-product-image:hover {
    background: #005a87;
}

#remove-product-image {
    margin-top: 10px;
    font-size: 12px;
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#remove-product-image:hover {
    background: #c82333;
}

/* Стили для медиа-загрузчика */
.media-frame {
    z-index: 160000 !important;
}

.media-modal {
    z-index: 160000 !important;
}

.media-modal-backdrop {
    z-index: 159999 !important;
}

/* Улучшенные стили для кнопок медиа-загрузчика */
.wp-core-ui .button-primary {
    background: #007cba !important;
    border-color: #007cba !important;
}

.wp-core-ui .button-primary:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
}

/* Стили для превью изображения */
.product-image-preview {
    position: relative;
    display: inline-block;
}

.product-image-preview img {
    border: 2px solid #e9ecef;
    transition: border-color 0.2s ease;
}

.product-image-preview img:hover {
    border-color: #007cba;
}

/* Стили для кнопок загрузки изображения */
.image-upload-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.image-upload-buttons button {
    flex: 1;
    max-width: 150px;
}

/* Создание нового склада */
.new-warehouse-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

#create-new-warehouse {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 18px;
}

#create-new-warehouse:hover {
    background: #5a6268;
}

/* Валидация полей */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#warehouse-short-code {
    text-transform: uppercase;
    font-family: monospace;
    letter-spacing: 1px;
}

/* Атрибуты товара */
#club-create-product-form h5 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

/* Кнопки */
#club-create-product-submit {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#club-create-product-submit:hover {
    background: #218838;
}

#club-create-product-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

#club-create-product-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#club-create-product-cancel:hover {
    background: #5a6268;
}

/* Состояние модального окна */
body.modal-open {
    overflow: hidden;
}

/* Адаптивность */
@media (max-width: 768px) {
    .club-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .club-modal-header,
    .club-modal-body,
    .club-modal-footer {
        padding: 15px;
    }
    
    .club-modal-footer {
        flex-direction: column;
    }
    
    .club-modal-footer .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .product-image-preview img {
        max-width: 150px;
        max-height: 150px;
    }
}

/* Анимации */
.club-modal {
    animation: fadeIn 0.3s ease;
}

.club-modal-content {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}