:root {
    --primary: #68bb93;
    --accent: #000000;
    --bg: #f1f2f6;
    --card-bg: #ffffff;
    --text: #2f3542;
    --text-muted: #747d8c;
    --border: #e4e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Шапка сайта */
.main-header {
    background: var(--primary);
    padding: 15px 0;
}
.main-header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}
.main-header nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}
.main-header nav a.active, .main-header nav a:hover {
    background: var(--accent);
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s;
}
.product-card:hover {
    transform: translateY(-5px);
}

.badge-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
}

.product-img-wrap {
    height: 250px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
.product-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-vendor {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: bold;
}
.product-title {
    font-size: 16px;
    margin: 8px 0;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.current-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}
.old-price {
    font-size: 14px;
    text-decoration: line-through;
    color: var(--text-muted);
}

.btn-buy {
    background: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
}
.btn-buy:hover {
    background: #000;
}

/* Специально для мобильных телефонов (экраны до 576 пикселей)  сетка товаров*/
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-top: 15px !important;
    }

    .product-img-wrap {
        height: auto !important;
        aspect-ratio: 1 / 1 !important; /* Квадратная область для фото */
        padding: 8px !important;
    }

    .product-info {
        padding: 10px !important;
    }

    /* Исправляем размер бренда (категории) */
    .product-vendor {
        font-size: 10px !important; /* Делаем мелким и аккуратным */
        letter-spacing: 0.5px;
    }

    /* Исправляем размер и высоту названия товара */
    .product-title {
        font-size: 13px !important;       /* Оптимальный читаемый размер для телефона */
        line-height: 1.3 !important;      /* Комфортный межстрочный интервал */
        height: 3.9em !important;         /* Четко резервируем место под 3 строки */
        margin: 4px 0 8px 0 !important;   /* Отступы сверху и снизу */
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important; /* Обрезает текст с тремя точками, если он длиннее 3 строк */
        line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
    }

    /* Блок с ценами */
    .product-price-block {
        gap: 6px !important;
        margin-bottom: 12px !important;
        flex-wrap: wrap !important;       /* Если старая цена не поместится рядом, она перенесется ниже */
    }

    /* Исправляем размер текущей цены */
    .current-price {
        font-size: 15px !important;       /* Выделяется, но не ломает верстку */
    }

    /* Исправляем размер старой цены */
    .old-price {
        font-size: 11px !important;       /* Мелкая зачеркнутая цена */
    }

    /* Исправляем размер текста на кнопке */
    .btn-buy {
        padding: 8px !important;
        font-size: 12px !important;       /* Аккуратный текст на кнопке */
    }
}



/* Сетка Блога */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}




/* Настройки для карточек на компьютерах */
.blog-card {
    display: flex;
    flex-direction: row;
    gap: 24px;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.blog-card-image {
    flex: 0 0 280px; /* Фиксированная ширина картинки на ПК */
    height: 180px;
    overflow: hidden;
    border-radius: 6px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
/*-------------------------------------------------------------------------*/
.post-date {
    font-size: 13px;
    color: var(--text-muted);
}
.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}

/* Красивое оформление цитаты с линией слева */
.wysiwyg-editor blockquote, 
blockquote {
    border-left: 4px solid #ccc; /* Вертикальная черта */
    padding-left: 15px;          /* Отступ текста от линии */
    margin-left: 0;
    margin-right: 0;
    font-style: italic;          /* Курсив для текста цитаты */
    color: #555;
}

/* Live-Панель */
#live-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 30px;
    color: #000000;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.live-panel-hidden { transform: translateX(200%); }
.live-panel-visible { transform: translateX(0); }

.status-ok { background: #c7e5da; }
.status-alert { background: #ffa502; }
.status-error { background: #ff4757; }

.live-icon {
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* Делаем все картинки внутри контента визуально кликабельными */
.wysiwyg-editor img, 
.post-content img, 
article img {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}
.wysiwyg-editor img:hover, 
.post-content img:hover, 
article img:hover {
    opacity: 0.9; /* Легкое затемение при наведении */
}

                                            /* Плавающая кнопка фильтров в углу экрана */
.floating-filter-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #2ecc71; /* Зеленый цвет под стиль вашей шапки */
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 999; /* Поверх товаров */
  transition: transform 0.2s;
}
.floating-filter-btn:hover {
  transform: scale(1.05);
}

/* Сама выдвижная шторка */
.drawer {
  position: fixed;
  top: 0;
  right: -320px; /* Полностью спрятана за правым краем (ширина 300px + запас) */
  width: 300px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: -5px 0 15px rgba(0,0,0,0.15);
  transition: right 0.3s ease-out; /* Плавная анимация выезда */
  z-index: 1000; /* Выше плавающей кнопки */
}

/* Класс, который активируется через JS для открытия */
.drawer.open {
  right: 0; 
}

.drawer-content {
  padding: 25px;
  height: 100%;
  overflow-y: auto; /* Если фильтров много, внутри шторки появится свой скролл */
  position: relative;
}

/* Кнопка закрытия (крестик) top: 15px; right: 20px; */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

/* Стили элементов внутри шторки */
.filter-group {
  margin: 20px 0;
}
.filter-group h4 {
  margin-bottom: 8px;
}
.apply-btn {
  width: 100%;
  padding: 12px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 20px;
}


/* Адаптивность для мобильных телефонов */
@media (max-width: 768px) {
    .blog-card {
        flex-direction: column; /* Картинка становится НАД текстом */
        gap: 16px;
        padding: 15px;
    }

    .blog-card-image {
        flex: 0 0 auto;
        width: 100%; /* Картинка занимает всю ширину экрана смартфона */
        height: 200px;
    }
	
	/* Сама выдвижная шторка */
	.drawer {
	  position: fixed;
	  top: 0;
	  right: -320px; /* Полностью спрятана за правым краем (ширина 300px + запас) */
	  width: 230px;
	  height: 100%;
	  background-color: #cfcfcff2;
	  box-shadow: -5px 0 15px rgba(0,0,0,0.15);
	  transition: right 0.3s ease-out; /* Плавная анимация выезда */
	  z-index: 1000; /* Выше плавающей кнопки */
	}
}

