/* 
 * Основные стили для проекта sadtovar.ru
 * Цветовая схема: зеленый #2c5f2d, акцентный оранжевый #ff9f1c
 * Дополняет Bootstrap 5
 */

/* ===== СБРОС СТИЛЕЙ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== ТИПОГРАФИЯ ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #2c5f2d;
}

/* ===== ШАПКА САЙТА ===== */
.site-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    flex-direction: column;
    color: #2c5f2d;
    text-decoration: none;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

/* ===== НАВИГАЦИЯ ===== */
.main-nav {
    position: relative;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(44, 95, 45, 0.1);
    color: #2c5f2d;
}

.nav-link.active {
    background-color: #2c5f2d;
    color: white;
}

.nav-link.active:hover {
    background-color: #234a24;
    color: white;
}

/* Стили для иконок без текста */
.nav-link i.fa-info-circle,
.nav-link i.fa-question-circle,
.nav-link i.fa-address-book {
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-register {
    background-color: #ff9f1c;
    color: white !important;
}

.btn-register:hover {
    background-color: #e68a00;
}

/* ===== КАРТОЧКИ ПОЛЬЗОВАТЕЛЯ ===== */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(44, 95, 45, 0.1);
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.user-link:hover {
    background-color: rgba(44, 95, 45, 0.2);
    color: #2c5f2d;
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    width: 40px;
    height: 40px;
}

.logout-link:hover {
    background-color: rgba(255, 159, 28, 0.1);
    color: #ff9f1c;
}

/* Стили для выпадающего меню (только для организаторов и администраторов) */
.nav-user.has-dropdown {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    min-width: 200px;
    display: none;
    z-index: 1001;
}

.nav-user.has-dropdown:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
}

.user-dropdown a:hover {
    background-color: #f8f9fa;
    color: #2c5f2d;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

/* ===== КОРЗИНА ===== */
.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff9f1c;
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c5f2d;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: right 0.3s ease;
    z-index: 1050;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
    margin-top: 2rem;
    padding: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: 500;
    text-decoration: none;
}

.mobile-nav-link:hover {
    color: #2c5f2d;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1049;
}

.mobile-menu-overlay.active {
    display: block;
}

/* ===== ОСНОВНОЕ СОДЕРЖИМОЕ ===== */
main {
    flex: 1;
    padding: 2rem 0;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* ===== КАРТОЧКИ ===== */
.card {
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ===== ФОРМЫ ===== */
.form-control:focus {
    border-color: #2c5f2d;
    box-shadow: 0 0 0 0.25rem rgba(44, 95, 45, 0.25);
}

.form-control.error {
    border-color: #dc3545;
}

.form-text.error {
    color: #dc3545;
}

/* ===== КНОПКИ ===== */
.btn-primary {
    background-color: #2c5f2d;
    border-color: #2c5f2d;
}

.btn-primary:hover {
    background-color: #234a24;
    border-color: #234a24;
}

.btn-warning {
    background-color: #ff9f1c;
    border-color: #ff9f1c;
}

.btn-warning:hover {
    background-color: #e68a00;
    border-color: #e68a00;
}

.btn-outline-primary {
    color: #2c5f2d;
    border-color: #2c5f2d;
}

.btn-outline-primary:hover {
    background-color: #2c5f2d;
    border-color: #2c5f2d;
}

/* ===== ПОДВАЛ ===== */
.site-footer {
    background-color: #2c5f2d;
    color: white;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3, .footer-section h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.footer-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contacts li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contacts a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-contacts a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-legal a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    opacity: 1;
    color: white;
}

/* ===== КАТАЛОГ ===== */
.product-card {
    height: 100%;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #2c5f2d;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-list {
        display: none;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-section {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo-subtitle {
        font-size: 0.8rem;
    }
}

/* ===== УТИЛИТЫ ===== */
.text-success {
    color: #2c5f2d !important;
}

.bg-success {
    background-color: #2c5f2d !important;
}

.border-success {
    border-color: #2c5f2d !important;
}

.text-warning {
    color: #ff9f1c !important;
}

.bg-warning {
    background-color: #ff9f1c !important;
}

.border-warning {
    border-color: #ff9f1c !important;
}

/* Специальные классы для проекта */
.role-card {
    cursor: pointer;
}

.role-card.selected .card {
    border-color: #2c5f2d;
    background-color: rgba(44, 95, 45, 0.05);
}

.step-number {
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-image img {
    border-radius: 8px;
}

.stats-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.category-section {
    margin-bottom: 3rem;
}

.category-section h2 {
    border-bottom: 2px solid #2c5f2d;
    padding-bottom: 0.5rem;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: #2c5f2d;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #666;
}

.pagination .page-item.active .page-link {
    background-color: #2c5f2d;
    border-color: #2c5f2d;
}

.pagination .page-link {
    color: #2c5f2d;
}

.pagination .page-link:hover {
    color: #234a24;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(44, 95, 45, 0.05);
}

.list-group-item.active {
    background-color: #2c5f2d;
    border-color: #2c5f2d;
}

.list-group-item-action:hover {
    background-color: rgba(44, 95, 45, 0.1);
}

.progress-bar {
    background-color: #2c5f2d;
}

.badge.bg-success {
    background-color: #2c5f2d !important;
}

.badge.bg-warning {
    background-color: #ff9f1c !important;
}

.badge.bg-primary {
    background-color: #2c5f2d !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5f2d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== КАСТОМНЫЕ УВЕДОМЛЕНИЯ (для избежания конфликтов с Bootstrap) ===== */
.custom-alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.custom-alert-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.custom-alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.custom-alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.custom-alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

.custom-alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.custom-alert i {
    margin-right: 0.5rem;
}

/* ===== ГОРИЗОНТАЛЬНОЕ МЕНЮ ОРГАНИЗАТОРА ===== */
.org-horizontal-nav {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.org-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.org-nav-item {
    flex: 1;
    min-width: 0;
}

.org-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-nav-link:hover {
    background-color: rgba(44, 95, 45, 0.05);
    color: #2c5f2d;
    border-bottom-color: rgba(44, 95, 45, 0.3);
}

.org-nav-link.active {
    background-color: rgba(44, 95, 45, 0.1);
    color: #2c5f2d;
    border-bottom-color: #2c5f2d;
}

.org-nav-link i {
    font-size: 1.1rem;
}

/* Адаптивность горизонтального меню */
@media (max-width: 768px) {
    .org-nav-list {
        flex-direction: column;
    }
    
    .org-nav-item {
        flex: none;
    }
    
    .org-nav-link {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
        border-left: 3px solid transparent;
        border-right: none;
    }
    
    .org-nav-link.active {
        border-left-color: #2c5f2d;
        border-bottom-color: #eee;
    }
}

/* ===== НОВАЯ СТРУКТУРА СТРАНИЦЫ ОРГАНИЗАТОРА ===== */
.org-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.org-header-left {
    flex: 1;
    min-width: 300px;
}

.org-header-right {
    flex-shrink: 0;
}

.org-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.org-content-with-nav {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .org-content-with-nav {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
