:root {
    /* Основные цвета - нефритовая палитра */
    --jade-primary: #2c5e3f;
    --jade-primary-dark: #1e3b2a;
    --jade-primary-light: #4c8b67;
    --emerald: #2ecc71;
    --emerald-light: #6fbf73;
    --emerald-dark: #27ae60;
    --mint: #a8e6cf;
    --sage: #9baf8c;
    
    /* Дополнительные цвета */
    --gray-light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --black: #212529;
}

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f7f5;
    padding-top: 70px; 
}

main {
    flex: 1;
}

/* ==================== ФИКСИРОВАННАЯ ШАПКА ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: linear-gradient(135deg, var(--jade-primary) 0%, var(--emerald) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    background: transparent !important;
    padding: 0.5rem 1rem;
}

.navbar-brand {
    color: white !important;
    font-weight: bold;
}

.navbar-brand i {
    color: white;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    transform: translateY(-2px);
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, var(--jade-primary) 0%, var(--emerald) 100%);
    border: none;
    color: white;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--jade-primary-dark) 0%, var(--emerald-dark) 100%);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.btn-outline-primary {
    border-color: var(--jade-primary);
    color: var(--jade-primary);
}

.btn-outline-primary:hover {
    background-color: var(--jade-primary);
    border-color: var(--jade-primary);
    color: white;
}

/* Карточки товаров */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(44, 94, 63, 0.15);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.product-card .price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--emerald-dark);
}

/* Статусы товаров */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-in-stock {
    background-color: #d4edda;
    color: var(--emerald-dark);
    border: 1px solid var(--emerald);
}

.status-expected {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.status-on-order {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #17a2b8;
}

.status-out-of-stock {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}

/* Hero секция */
.hero-section {
    background: linear-gradient(135deg, var(--jade-primary) 0%, var(--emerald) 100%);
    color: white;
    border-radius: 15px;
    padding: 60px 20px;
    margin-bottom: 30px;
}

/* Карточки отзывов */
.review-card {
    border-left: 4px solid var(--emerald);
    transition: transform 0.3s;
    background: white;
    border-radius: 10px;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rating i {
    font-size: 1rem;
}

.fa-star.text-warning {
    color: var(--emerald) !important;
}

/* Каталог - боковая панель */
.category-sidebar {
    position: sticky;
    top: 90px; /* Отступ от фиксированной шапки */
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--jade-primary) 0%, var(--emerald) 100%);
    color: white;
    border: none;
}

.category-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.category-list li {
    margin-bottom: 0;
    border-bottom: 1px solid #e9ecef;
}

.category-list a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: linear-gradient(135deg, rgba(44, 94, 63, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
    color: var(--jade-primary);
    font-weight: 500;
    padding-left: 1.5rem;
}

/* Карточка товара */
.product-gallery {
    position: sticky;
    top: 90px; /* Отступ от фиксированной шапки */
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-gallery img {
    width: 100%;
    border-radius: 8px;
}

.price {
    color: var(--emerald-dark);
    font-weight: bold;
}

.pharmacy-availability {
    max-height: 400px;
    overflow-y: auto;
}

.availability-item {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s;
}

.availability-item:hover {
    background-color: rgba(46, 204, 113, 0.05);
}

.availability-item:last-child {
    border-bottom: none;
}

/* Поиск */
.search-container {
    min-width: 250px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    background: white;
    border: 1px solid var(--emerald);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Пагинация */
.pagination .page-link {
    color: var(--jade-primary);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--jade-primary) 0%, var(--emerald) 100%);
    border-color: var(--jade-primary);
    color: white;
}

.pagination .page-link:hover {
    color: var(--emerald-dark);
}

/* Формы */
.form-control:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
}

/* Футер */
.footer {
    background: linear-gradient(135deg, var(--jade-primary-dark) 0%, var(--jade-primary) 100%) !important;
    color: white;
    margin-top: auto;
}

.footer a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--mint);
    text-decoration: none;
}

/* Бейджи скидок */
.discount-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Карточки скидок */
.discount-card {
    transition: transform 0.3s;
    border-left: 4px solid var(--emerald);
    border-radius: 12px;
    overflow: hidden;
}

.discount-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Алерты */
.alert-success {
    background-color: #d4edda;
    border-color: var(--emerald);
    color: var(--jade-primary-dark);
}
/* public/css/style.css */
.prescription-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 5px;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}


/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding-top: 60px; /* Меньший отступ для мобильных */
    }
    
    .search-container {
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .category-sidebar {
        position: static;
        margin-bottom: 2rem;
        top: auto;
    }
    
    .product-gallery {
        position: static;
        margin-bottom: 2rem;
        top: auto;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .navbar {
        padding: 0.5rem;
    }
}
/* Адаптивная сетка товаров*/

/* Основной контейнер с отступами */
.container, .container-fluid {
    padding-left: 30px !important;
    padding-right: 30px !important;
}

/* Ряд товаров с отрицательными маргинами для компенсации отступов карточек */
.products-row {
    margin-left: -12px;
    margin-right: -12px;
}

/* Карточка товара */
.product-card-col {
    flex: 0 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 24px;
}

/* 5 карточек в ряд на больших экранах (1200px и выше) */
@media (min-width: 1200px) {
    .product-card-col {
        width: 20%; /* 5 карточек в ряд */
    }
}

/* 4 карточки в ряд на планшетах */
@media (min-width: 992px) and (max-width: 1199px) {
    .product-card-col {
        width: 25%; /* 4 карточки в ряд */
    }
}

/* 3 карточки в ряд на маленьких планшетах */
@media (min-width: 768px) and (max-width: 991px) {
    .product-card-col {
        width: 33.33333333%; /* 3 карточки в ряд */
    }
}

/* 2 карточки в ряд на телефонах */
@media (max-width: 767px) {
    .product-card-col {
        width: 50%; /* 2 карточки в ряд */
    }
}

/* 1 карточка в ряд на очень маленьких экранах */
@media (max-width: 480px) {
    .product-card-col {
        width: 100%; /* 1 карточка в ряд */
    }
}

/* Уменьшенные карточки товаров */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    font-size: 0.85rem;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.product-card .card-img-top {
    height: 140px;
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .card-body {
    padding: 8px !important;
}

.product-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    height: 2.2rem;
    overflow: hidden;
}

.product-card .price {
    font-size: 1rem;
    font-weight: 700;
    color: #2c5e3f;
}

.product-card .status-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
}

.product-card .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.prescription-badge {
    font-size: 0.6rem;
    padding: 2px 5px;
}

/* Боковые отступы для основного контента */
.catalog-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Для мобильных устройств уменьшаем отступы */
@media (max-width: 768px) {
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}
/* Мобильный оверлей */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1055;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

/* Скрываем десктопную шапку на мобильных */
@media (max-width: 991px) {
    .header {
        display: none;
    }
}
/* Фикс для подвала */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

.footer {
    margin-top: auto;
    flex-shrink: 0;
}

