/* =========================================
   ПОКУПОНПРО: CSS-ПЕРЕМЕННЫЕ (THEME)
   ========================================= */
:root {
    /* === ЦВЕТА === */
    /* Основные (бренд) */
    --pokupon-primary: #5F3D9D;
    --pokupon-primary-dark: #4a2f7a;
    --pokupon-primary-light: #e1effc;
    
    /* Акцентные (оранжевые) */
    --pokupon-accent: #D4AF37;
    --pokupon-accent-dark: #bf360c;
    --pokupon-accent-light: #fff3e0;
    
    /* Успех / Промокод */
    --pokupon-success: #2e7d32;
    --pokupon-success-bg: #e8f5e9;
    --pokupon-success-border: #c8e6c9;
    
    /* Ошибка / Истёк */
    --pokupon-error: #c62828;
    --pokupon-error-bg: #ffebee;
    
    /* Текст */
    --pokupon-text-primary: #333;
    --pokupon-text-secondary: #555;
    --pokupon-text-muted: #666;
    --pokupon-text-disabled: #888;
    --pokupon-text-placeholder: #999;
    
    /* Фон */
    --pokupon-bg-white: #fff;
    --pokupon-bg-light: #f9f9f9;
    --pokupon-bg-lighter: #f8f9fa;
    --pokupon-bg-blue-light: #f4f7fa;
    --pokupon-bg-code: #f0f7ff;
    
    /* Границы */
    --pokupon-border-light: #eee;
    --pokupon-border: #e0e0e0;
    --pokupon-border-medium: #ddd;
    --pokupon-border-category: #dce3ea;
    
    /* Тени и оверлеи */
    --pokupon-shadow-card: 0 4px 12px rgba(0,0,0,0.1);
    --pokupon-shadow-card-hover: 0 6px 20px rgba(0,0,0,0.08);
    --pokupon-shadow-modal: 0 12px 40px rgba(0,0,0,0.25);
    --pokupon-overlay: rgba(0, 0, 0, 0.65);
    --pokupon-shadow-primary: 0 2px 6px rgba(34,113,177,0.3);
    
    /* === РАЗМЕРЫ И ОТСТУПЫ === */
    --pokupon-radius: 20px;
    --pokupon-radius-sm: 14px;
    --pokupon-radius-xs: 10px;
    --pokupon-radius-pill: 999px;
    
    --pokupon-gap-sm: 8px;
    --pokupon-gap: 16px;
    --pokupon-gap-lg: 24px;
    --pokupon-gap-xl: 30px;
    
    --pokupon-padding-sm: 12px;
    --pokupon-padding: 12px;
    --pokupon-padding-lg: 24px;
    
    /* === ШРИФТЫ === */
    --pokupon-font-family: font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --pokupon-font-mono: monospace;
    
    --pokupon-font-size-xs: 10px;
    --pokupon-font-size-sm: 11px;
    --pokupon-font-size-base: 13px;
    --pokupon-font-size-md: 14px;
    --pokupon-font-size-lg: 16px;
    --pokupon-font-size-xl: 17px;
    --pokupon-font-size-xxl: 22px;
    --pokupon-font-size-xxxl: 28px;
    
    --pokupon-line-height-tight: 1.1;
    --pokupon-line-height-base: 1.3;
    --pokupon-line-height-relaxed: 1.45;
    --pokupon-line-height-loose: 1.6;
    
    /* === ПЕРЕХОДЫ === */
    --pokupon-transition: all 0.2s ease;
    --pokupon-transition-fast: all 0.15s ease;
    --pokupon-transition-slow: all 0.3s ease;
}

/* =========================================
   ПОКУПОНПРО: Глобальные стили
   ========================================= */
.pokupon-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: var(--pokupon-padding);
    font-family: var(--pokupon-font-family);
    color: var(--pokupon-text-primary);
    line-height: var(--pokupon-line-height-relaxed);
}
.pokupon-empty {
    text-align: center; padding: 40px; color: var(--pokupon-text-placeholder); font-size: var(--pokupon-font-size-lg);
    padding: 20px;
    background: #f8f9fa;
    border-radius: 20px;
}
.pokupon-section { margin-bottom: var(--pokupon-gap-lg); }
.pokupon-section h2 {
    font-size: var(--pokupon-font-size-xxl); margin-bottom: var(--pokupon-gap); color: var(--pokupon-text-primary); padding-bottom: 10px;
}

/* =========================================
   АЛФАВИТНАЯ НАВИГАЦИЯ
   ========================================= */
.pokupon-alphabet-nav {
    margin-bottom: var(--pokupon-gap-lg); background: var(--pokupon-bg-lighter); border: 1px solid var(--pokupon-border-light);
    border-radius: var(--pokupon-radius); padding: 20px; /*position: sticky;*/ top: 20px; z-index: 100;
    backdrop-filter: blur(5px);
}
.pokupon-alphabet-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 5px; /*justify-content: center;*/
}
.pokupon-alpha-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 35px; background: var(--pokupon-bg-white); border: 2px solid #e3e3e3;
    border-radius: 10px; text-decoration: none; color: var(--pokupon-text-primary);
    font-weight: 600; font-size: var(--pokupon-font-size-lg); /*transition: var(--pokupon-transition);*/
}
.pokupon-alpha-link:hover,
.pokupon-alpha-link.active {
    background: var(--pokupon-primary); color: var(--pokupon-bg-white); border-color: var(--pokupon-primary);
    box-shadow: var(--pokupon-shadow-primary);
}
.pokupon-alpha-block { margin-bottom: var(--pokupon-gap-lg); scroll-margin-top: 70px; }
.pokupon-alpha-block__title {
    font-size: var(--pokupon-font-size-xxl); font-weight: 700; color: var(--pokupon-primary);
    border-bottom: 2px solid var(--pokupon-primary); padding-bottom: 8px; margin-bottom: 15px;
}

/* =========================================
   СЕТКА МАГАЗИНОВ
   ========================================= */
.pokupon-stores-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--pokupon-gap);
}
.pokupon-store-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: var(--pokupon-padding-sm); background: var(--pokupon-bg-white); /*border: 1px solid var(--pokupon-border);*/ border: 2px solid #e3e3e3;
    border-radius: var(--pokupon-radius); text-decoration: none; color: var(--pokupon-text-primary);
    transition: var(--pokupon-transition);
}
.pokupon-store-card:hover { /*box-shadow: var(--pokupon-shadow-card); transform: translateY(-2px);*/ border: 2px solid  var(--pokupon-accent);}
.pokupon-store-card img { 
    /*max-width: 80px; max-height: 80px;*/
    max-width: 175px;
    max-height: 105px;
    margin-bottom: 10px; object-fit: contain; }
.pokupon-store-card__placeholder {
    width: 60px; height: 60px; background: var(--pokupon-primary); color: var(--pokupon-bg-white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; margin-bottom: 10px;
}
.pokupon-store-card__title { font-weight: 500; font-size: var(--pokupon-font-size-lg); }

/* =========================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================= */
.pokupon-breadcrumbs {
    margin-bottom: var(--pokupon-gap); font-size: var(--pokupon-font-size-base); color: var(--pokupon-text-muted);
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: var(--pokupon-line-height-relaxed);
}
.pokupon-breadcrumbs__item a {
    color: var(--pokupon-primary); text-decoration: none; transition: var(--pokupon-transition);
}
.pokupon-breadcrumbs__item a:hover { color: var(--pokupon-primary-dark); text-decoration: underline; }
.pokupon-breadcrumbs__current { color: var(--pokupon-text-primary); font-weight: 500; }
.pokupon-breadcrumbs__separator { color: var(--pokupon-text-disabled); font-size: 12px; margin: 0 2px; user-select: none; }

/* =========================================
   СПИСОК КАТЕГОРИЙ С ИКОНКАМИ
   ========================================= */
.pokupon-categories-list {
    display: flex; flex-wrap: wrap; gap: var(--pokupon-gap-sm); margin: 12px 0 24px; padding: 0;
}
.pokupon-category-item {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 20px; background: var(--pokupon-bg-blue-light); color: var(--pokupon-primary);
    text-decoration: none; border-radius: var(--pokupon-radius); font-size: var(--pokupon-font-size-lg);
    font-weight: 500;     border: 2px solid #e3e3e3; /*transition: var(--pokupon-transition);*/
}
.pokupon-category-icon { width: 25px; height: 20px; object-fit: contain; flex-shrink: 0; }
.pokupon-category-name { line-height: var(--pokupon-line-height-base); }
.pokupon-category-item:hover {
    background: var(--pokupon-primary); color: var(--pokupon-bg-white); /*border-color: var(--pokupon-primary);
    transform: translateY(-1px); box-shadow: var(--pokupon-shadow-primary);*/
}
.pokupon-category-item:hover .pokupon-category-icon { filter: brightness(0) invert(1); }
.pokupon-cat-count { font-size: var(--pokupon-font-size-sm); color: var(--pokupon-text-disabled); font-weight: 400; margin-left: 4px; }
.pokupon-category-item:hover .pokupon-cat-count { color: rgba(255,255,255,0.8); }

.pokupon-category-desc{
    padding: 20px;
    background: #f8f9fa;
    margin-bottom: 20px;
    border-radius: 20px;
}

.pokupon-category-archive h1{
    margin-bottom: 20px;
}

/* =========================================
   ШОРТКОД: Популярные категории
   ========================================= */
.pokupon-section__title {
    font-weight: 500;
    margin: 0 0 15px;
    color: var(--pokupon-primary);
    text-align: center;
    margin-bottom: 2rem;
}
.pokupon-popular-cats {
    margin-bottom: var(--pokupon-gap-lg);
    background-color: #f7f7f7;
    border-radius: var(--pokupon-radius);
    padding: 3rem 20px;
}
.pokupon-popular-cats__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--pokupon-gap);
}

/* Карточка категории: ВСЕГДА вертикальная */
.pokupon-popular-cat {
    display: flex;
    flex-direction: column; /* Фиксируем вертикальное расположение */
    align-items: center;
    text-align: center;
    padding: var(--pokupon-padding-sm);
    background: var(--pokupon-bg-white);
    border: 2px solid #e3e3e3;
    border-radius: var(--pokupon-radius-sm);
    text-decoration: none;
    color: var(--pokupon-text-primary);
    /*transition: var(--pokupon-transition);*/
    justify-content: center;
    min-height: 140px;
}
.pokupon-popular-cat:hover {
    /*box-shadow: var(--pokupon-shadow-card);
    transform: translateY(-2px);*/
    border-color: var(--pokupon-accent);
}

/* Иконка / Плейсхолдер */
.pokupon-popular-cat__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pokupon-popular-cat__icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.pokupon-popular-cat__placeholder {
    width: 48px;
    height: 48px;
    background: var(--pokupon-primary);
    color: var(--pokupon-bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Название категории */
.pokupon-popular-cat__name {
    font-size: var(--pokupon-font-size-lg);
    font-weight: 600;
    line-height: var(--pokupon-line-height-base);
    color: var(--pokupon-text-primary);
    word-break: break-word;
}

/* =========================================
   ШОРТКОД: AJAX Поиск
   ========================================= */
.pokupon-hero {
    background: linear-gradient(135deg, #5f3d9d 0%, #4a2f7a 100%);
    color: #fff;
    padding: 40px 20px;
    /*text-align: center;*/
    border-radius: var(--pokupon-radius);
    margin-bottom: 20px;
}
.pokupon-search-widget { /*margin-bottom: var(--pokupon-gap-lg);*/ max-width: 600px; margin-left: auto; margin-right: auto; }
.pokupon-search__title { /*font-size: var(--pokupon-font-size-xl);*/ font-weight: 500; margin: 0 0 12px; text-align: center; }
.pokupon-search__desc{ text-align: center; }
.pokupon-search__container { position: relative; }
.pokupon-search__input {
    width: 100%; padding: 12px 16px 12px 40px; border: 1px solid var(--pokupon-border-medium); border-radius: var(--pokupon-radius-sm);
    font-size: var(--pokupon-font-size-lg); outline: none; transition: var(--pokupon-transition); box-sizing: border-box;
    background: var(--pokupon-bg-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 12px center;
}
.pokupon-search__input:focus { border-color: var(--pokupon-primary); box-shadow: 0 0 0 3px rgba(34,113,177,0.15); }
.pokupon-search__results {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px;
    background: var(--pokupon-bg-white); border: 1px solid var(--pokupon-border); border-radius: var(--pokupon-radius-sm);
    box-shadow: var(--pokupon-shadow-card); z-index: 1000; max-height: 300px; overflow-y: auto;
}
.pokupon-search__list { list-style: none; margin: 0; padding: 6px 0; }
.pokupon-search__item { border-bottom: 1px solid var(--pokupon-bg-lighter); }
.pokupon-search__item:last-child { border-bottom: none; }
.pokupon-search__item a {
    display: flex; align-items: center; padding: 10px 14px; text-decoration: none;
    color: var(--pokupon-text-primary); transition: var(--pokupon-transition-fast); gap: 10px;
}
.pokupon-search__item a:hover { background: var(--pokupon-bg-lighter); }
.pokupon-search__item-icon { width: 32px; height: 32px; object-fit: contain; border-radius: var(--pokupon-radius-xs); background: var(--pokupon-bg-lighter); flex-shrink: 0; }
.pokupon-search__item-title { font-weight: 500; flex: 1; }
.pokupon-search__item-type { font-size: var(--pokupon-font-size-sm); padding: 2px 6px; border-radius: var(--pokupon-radius-pill); background: var(--pokupon-success-bg); color: var(--pokupon-success); flex-shrink: 0; }
.pokupon-search__item.is-category .pokupon-search__item-type { background: var(--pokupon-accent-light); color: var(--pokupon-accent); }
.pokupon-search__empty, .pokupon-search__error { padding: 12px 14px; color: var(--pokupon-text-muted); text-align: center; font-size: var(--pokupon-font-size-md); margin: 0; }
.pokupon-search__loader {
    position: absolute; /*top: 50%;*/ top: 25px; right: 12px; transform: translateY(-50%);
    width: 16px; height: 16px; border: 2px solid var(--pokupon-border); border-top-color: var(--pokupon-primary);
    border-radius: 50%; animation: pp-spin 0.8s linear infinite;
}
@keyframes pp-spin { to { transform: translateY(-50%) rotate(360deg); } }

/* =========================================
   ГОРИЗОНТАЛЬНЫЙ СПИСОК КУПОНОВ (СТРАНИЦА МАГАЗИНА) — БАЗОВЫЕ СТИЛИ
   ========================================= */
.pokupon-coupons-list { display: flex; flex-direction: column; gap: var(--pokupon-gap); width: 100%; }

.pokupon-card {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    background: var(--pokupon-bg-white); /*border: 1px solid var(--pokupon-border);*/ border-radius: var(--pokupon-radius);
    padding: var(--pokupon-padding-lg); width: 100%; box-sizing: border-box;
    transition: var(--pokupon-transition);
}
.pokupon-card:hover {
    /*box-shadow: var(--pokupon-shadow-card-hover); transform: translateY(-2px); border-color: var(--pokupon-primary-light);*/
}
.pokupon-card__content { flex: 1 1 65%; min-width: 280px; }
.pokupon-card__header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.pokupon-card__type {
    background: var(--pokupon-success-bg); color: var(--pokupon-success); padding: 4px 10px;
    border-radius: var(--pokupon-radius-xs); font-size: var(--pokupon-font-size-base); font-weight: 600;
}
.pokupon-card.is-deal .pokupon-card__type { background: var(--pokupon-accent-light); color: var(--pokupon-accent); }
.pokupon-card__title { font-size: var(--pokupon-font-size-xl); font-weight: 500; margin: 0 0 6px; line-height: var(--pokupon-line-height-base); }
.pokupon-card__desc { font-size: var(--pokupon-font-size-md); color: var(--pokupon-text-secondary); margin: 0 0 6px; line-height: var(--pokupon-line-height-relaxed); }
.pokupon-card__store { font-size: var(--pokupon-font-size-base); color: var(--pokupon-primary); font-weight: 500; display: inline-block; }
.pokupon-card__actions {
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    min-width: 180px; flex: 0 0 auto; text-align: right;
}
.pokupon-card__expiry { font-size: var(--pokupon-font-size-base); color: var(--pokupon-text-muted); }
.pokupon-card__expired { font-size: var(--pokupon-font-size-base); color: var(--pokupon-error); font-weight: 600; }
.pokupon-card__btn {
    display: inline-block; padding: 12px 22px; border: none; border-radius: var(--pokupon-radius);
    font-size: var(--pokupon-font-size-md); font-weight: 600; text-align: center; text-decoration: none;
    cursor: pointer; transition: var(--pokupon-transition); width: auto; min-width: 160px; line-height: var(--pokupon-line-height-base);
}
.pokupon-card__btn--promo { background: var(--pokupon-primary); color: var(--pokupon-bg-white); }
.pokupon-card__btn--promo:hover { background: var(--pokupon-primary-dark); /*transform: translateY(-1px);*/ }
.pokupon-card__btn--deal { background: var(--pokupon-accent); color: var(--pokupon-bg-white); }
.pokupon-card__btn--deal:hover { background: var(--pokupon-accent-dark); /*transform: translateY(-1px);*/ }
.pokupon-card__btn--disabled { background: var(--pokupon-border); color: var(--pokupon-text-disabled); cursor: not-allowed; }

/* Изображение магазина в карточке купона */
.pokupon-card__store-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: var(--pokupon-radius-xs); background: var(--pokupon-bg-white);
    /*border: 1px solid var(--pokupon-border);*/ overflow: hidden; text-decoration: none;
    transition: var(--pokupon-transition); margin-top: 6px; box-sizing: border-box;
}
.pokupon-card__store-link:hover {
    /*border-color: var(--pokupon-primary); transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(34,113,177,0.15);*/
}
.pokupon-card__store-img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pokupon-card__store-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px; color: var(--pokupon-primary); background: var(--pokupon-bg-blue-light); user-select: none;
}

/* Описание с переключателем +/- */
.pokupon-card__desc-wrapper { position: relative; margin-bottom: 6px; }
.pokupon-card__desc {
    margin: 0; line-height: var(--pokupon-line-height-relaxed); font-size: var(--pokupon-font-size-md); color: var(--pokupon-text-secondary);
    padding-right: 32px; display: -webkit-box; -webkit-line-clamp: 1;
    -webkit-box-orient: vertical; overflow: hidden; transition: var(--pokupon-transition-slow);
}
.pokupon-card__desc--expanded { -webkit-line-clamp: unset; display: block; padding-right: 0; }
.pokupon-card__desc-toggle {
    position: absolute; top: 0; right: 0; height: 100%; display: none;
    /*align-items: center;*/ background: transparent; border: none;
    color: var(--pokupon-primary); font-size: 18px; font-weight: bold; cursor: pointer;
    padding-left: 4px; z-index: 2; line-height: var(--pokupon-line-height-relaxed); transition: var(--pokupon-transition-fast);
}
.pokupon-card__desc-toggle:hover { color: var(--pokupon-primary-dark); }

/* =========================================
   GRID ДЛЯ ШОРТКОДОВ (ГЛАВНАЯ / ВИДЖЕТЫ)
   ========================================= */
.pokupon-grid { display: grid; gap: var(--pokupon-gap-lg); }
.pokupon-grid-2-cols { grid-template-columns: repeat(2, 1fr); }
.pokupon-grid-3-cols { grid-template-columns: repeat(3, 1fr); }
.pokupon-grid-4-cols { grid-template-columns: repeat(4, 1fr); }

/* Базовая перестройка карточки в сетке */
.pokupon-grid .pokupon-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 20px 16px !important;
    gap: 10px !important;
    border: 2px solid #e3e3e3;
}

/* Контейнер информации внутри карточки */
.pokupon-grid .pokupon-card__info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

/* === ЛОГОТИП: сверху по центру, макс 175×105 === */
.pokupon-grid .pokupon-card__store-link {
    order: -1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 175px !important;
    height: 105px !important;
    max-width: 175px !important;
    max-height: 105px !important;
    margin: 0 auto 4px !important;
    border-radius: var(--pokupon-radius) !important;
    /*border: 1px solid var(--pokupon-border-light) !important;*/
    /*background: var(--pokupon-bg-lighter) !important;*/
    padding: 8px !important;
    box-sizing: border-box !important;
    overflow: hidden;
}
.pokupon-grid .pokupon-card__store-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 0 !important;
    display: block;
}
.pokupon-grid .pokupon-card__store-placeholder {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--pokupon-primary) !important;
    border-radius: var(--pokupon-radius) !important;
}

/* === НАЗВАНИЕ ПРЕДЛОЖЕНИЯ (ИСПРАВЛЕННОЕ) === */
.pokupon-grid .pokupon-card__title {
    display: -webkit-box !important; /* Обязательно для работы line-clamp */
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    line-height: var(--pokupon-line-height-base) !important;
    font-size: var(--pokupon-font-size-lg) !important;
    font-weight: 500 !important;
    text-align: center !important;
    word-break: break-word; /* Предотвращает вылезание длинных слов без пробелов */
    border-top: 2px dashed #e3e3e3;
    width: 100%;
    padding-top: 10px;
}

/* === КНОПКА === */
.pokupon-grid .pokupon-card__action {
    width: 100% !important;
    margin-top: auto !important;
}
.pokupon-grid .pokupon-card__btn {
    width: 100% !important;
    min-width: auto !important;
    padding: 15px !important;
    font-size: var(--pokupon-font-size-lg) !important;
    font-weight: 400 !important;
}

/* === СКРЫТИЕ ВСЕГО ЛИШНЕГО В ШОРТКОДАХ === */
.pokupon-grid .pokupon-card__badge,
.pokupon-grid .pokupon-card__type,
.pokupon-grid .pokupon-card__expiry,
.pokupon-grid .pokupon-card__expired,
.pokupon-grid .pokupon-card__desc-wrapper,
.pokupon-grid .pokupon-card__desc,
.pokupon-grid .pokupon-card__desc-toggle {
    display: none !important;
}

/* =========================================
   МОДАЛЬНОЕ ОКНО (ПРОМОКОД) — ОБНОВЛЁННЫЙ ДИЗАЙН
   ========================================= */
.pokupon-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--pokupon-overlay); z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 1; transition: var(--pokupon-transition-slow);
}
.pokupon-modal {
    background: var(--pokupon-bg-white); border-radius: var(--pokupon-radius-sm); padding: 20px;
    max-width: 480px; width: 92%; text-align: center; position: relative;
    box-shadow: var(--pokupon-shadow-modal); margin: 20px;
}
.pokupon-modal__close {
    position: absolute; top: 8px; right: 10px; background: none; border: none;
    font-size: 28px; line-height: 1; color: var(--pokupon-text-disabled); cursor: pointer; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    transition: var(--pokupon-transition); padding: 0;
}
.pokupon-modal__close:hover { color: var(--pokupon-text-primary); /*background: var(--pokupon-bg-lighter);*/ /*transform: rotate(90deg);*/ }
.pokupon-modal__title { font-size: var(--pokupon-font-size-xxl); font-weight: 500; margin: 0 0 20px; line-height: var(--pokupon-line-height-base); text-align: left; padding-right: 20px; }

/* Поле промокода с иконкой копирования */
.pokupon-modal__code-wrapper { position: relative; margin-bottom: 20px; }
.pokupon-modal__code-container {
    display: flex; width: 100%; border-radius: var(--pokupon-radius); overflow: hidden; border: 3px solid var(--pokupon-primary);
}
.pokupon-modal__code {
    flex: 1; background: var(--pokupon-bg-code); padding: 16px 20px; font-size: 22px;
    font-weight: 700; letter-spacing: 1px; color: var(--pokupon-primary); font-family: var(--pokupon-font-mono);
    text-align: center; user-select: all; word-break: break-all; line-height: var(--pokupon-line-height-base);
    display: flex; align-items: center; justify-content: center; min-height: 60px; box-sizing: border-box;
}
.pokupon-modal__copy-btn {
    width: 60px; background: var(--pokupon-primary); color: var(--pokupon-bg-white); cursor: pointer; border: none;
    /*border-left: 2px solid var(--pokupon-primary-dark);*/ display: flex; align-items: center;
    justify-content: center; transition: var(--pokupon-transition); flex-shrink: 0; padding: 0;
}
.pokupon-modal__copy-btn:hover { background: var(--pokupon-primary-dark); border-color: var(--pokupon-primary); }
.pokupon-modal__copy-btn.copied { background: var(--pokupon-success); border-color: var(--pokupon-success); }
.pokupon-modal__copy-btn .icon-svg {
    width: 22px; height: 22px; display: block; stroke: currentColor; fill: none; pointer-events: none;
}

/* Сообщение о копировании */
.pokupon-modal__copy-feedback {
    position: absolute; bottom: -22px; left: 0; width: 100%; text-align: center;
    font-size: var(--pokupon-font-size-base); color: var(--pokupon-success); font-weight: 500; opacity: 0; visibility: hidden;
    transition: var(--pokupon-transition-fast); pointer-events: none;
}
.pokupon-modal__copy-feedback.show { opacity: 1; visibility: visible; }

/* Описание в модалке */
.pokupon-modal__desc-wrapper {
    position: relative;
    margin-bottom: 16px;
    text-align: left;
    width: 100%;
}
.pokupon-modal__desc {
    margin: 0;
    line-height: var(--pokupon-line-height-relaxed);
    font-size: var(--pokupon-font-size-md);
    color: var(--pokupon-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--pokupon-transition-slow);
    text-align: left;
}
.pokupon-modal__desc--expanded {
    -webkit-line-clamp: unset;
    display: block;
}
.pokupon-modal__desc-toggle {
    position: static;
    display: none;
    /*margin-top: 8px;*/
    background: transparent;
    border: none;
    color: var(--pokupon-primary);
    font-size: var(--pokupon-font-size-base);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: var(--pokupon-transition-fast);
}
.pokupon-modal__desc-toggle:hover {
    color: var(--pokupon-primary-dark);
    text-decoration: underline;
}

/* Ссылка в модалке */
.pokupon-modal__link {
    display: inline-block; color: var(--pokupon-primary); text-decoration: none;
    font-size: var(--pokupon-font-size-md); font-weight: 500; border-bottom: 1px dashed var(--pokupon-primary); margin-top: 4px;
}
.pokupon-modal__link:hover { border-bottom-style: solid; }

/* =========================================
   СТРАНИЦА МАГАЗИНА: САЙДБАР + КОНТЕНТ
   ========================================= */
.pokupon-store-layout { display: flex; gap: var(--pokupon-gap-xl); align-items: flex-start; margin-top: 10px; }

/* Левый сайдбар */
.pokupon-store-sidebar { width: 290px; flex-shrink: 0; }
.pokupon-store-sidebar__inner {
    background: #fff; /*border: 1px solid var(--pokupon-border-light);*/ border-radius: var(--pokupon-radius);
    padding: 20px; text-align: center; position: sticky; top: 20px;
}
.pokupon-store-sidebar__logo-wrap {
    width: 250px; height: 150px; /*margin: 0 auto 16px;*/ display: flex;
    align-items: center; justify-content: center; background: #fff;
    border-radius: var(--pokupon-radius-xs); /*border: 1px solid var(--pokupon-border);*/ overflow: hidden;
}
.pokupon-store-sidebar__logo { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Кнопка в сайдбаре */
.pokupon-store-sidebar__btn {
    width: 100%; padding: 12px 16px; background: var(--pokupon-primary); color: var(--pokupon-bg-white);
    border: none; border-radius: var(--pokupon-radius-sm); font-size: var(--pokupon-font-size-md); font-weight: 600;
    cursor: pointer; transition: var(--pokupon-transition); text-align: center;
    text-decoration: none; display: inline-block; box-sizing: border-box;
}
.pokupon-store-sidebar__btn:hover { background: var(--pokupon-primary-dark); transform: translateY(-1px); }

/* Правая часть */
.pokupon-store-main { flex: 1; min-width: 0; width: 100%; }
.pokupon-store-main__title {
    margin: 0 0 20px 0;; font-size: var(--pokupon-font-size-xxxl); font-weight: 700;
    line-height: var(--pokupon-line-height-base); color: var(--pokupon-text-primary);
}
.pokupon-store-single .pokupon-breadcrumbs { margin-bottom: var(--pokupon-gap); }

/* Описание магазина */
.pokupon-store-description {
    margin: 20px 0; padding: 20px; background: var(--pokupon-bg-light);
    border-radius: var(--pokupon-radius); /*border: 1px solid var(--pokupon-border-light);*/
}
.pokupon-store-description__content { font-size: var(--pokupon-font-size-lg); line-height: var(--pokupon-line-height-loose); color: var(--pokupon-text-secondary); }
.pokupon-store-description__content p { margin: 0 0 12px; }
.pokupon-store-description__content p:last-child { margin-bottom: 0; }
.pokupon-store-description__content a { color: var(--pokupon-primary); text-decoration: none; }
.pokupon-store-description__content a:hover { text-decoration: underline; }

/* =========================================
   КАРТОЧКА НА СТРАНИЦЕ МАГАЗИНА: FLEX-СТРУКТУРА
   ========================================= */
.pokupon-store-single .pokupon-card {
    display: flex; align-items: center; gap: 20px;
    padding: 20px; width: 100%; box-sizing: border-box;
}
.pokupon-store-single .pokupon-card__badge {
    flex-shrink: 0; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center;
}
.pokupon-store-single .pokupon-card__type {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; padding: 6px; border-radius: var(--pokupon-radius);
    font-size: var(--pokupon-font-size-md); font-weight: 700; line-height: var(--pokupon-line-height-tight); text-align: center;
    word-break: break-word; background: #e9ecef; color: var(--pokupon-primary); box-sizing: border-box;
}
.pokupon-store-single .pokupon-card.is-deal .pokupon-card__type { background: #e9ecef; color: var(--pokupon-primary); }
.pokupon-store-single .pokupon-card__info {
    flex: 1; min-width: 0; padding-top: 2px;
}
.pokupon-store-single .pokupon-card__title {
    margin: 0 0 4px; /*font-size: var(--pokupon-font-size-lg);*/ font-weight: 500; line-height: var(--pokupon-line-height-base);
}
.pokupon-store-single .pokupon-card__store-link { display: none !important; }
.pokupon-store-single .pokupon-card__desc-wrapper { position: relative; margin: 0; }
.pokupon-store-single .pokupon-card__desc {
    margin: 0; padding-right: 24px; font-size: var(--pokupon-font-size-md); color: var(--pokupon-text-secondary); line-height: var(--pokupon-line-height-relaxed);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.pokupon-store-single .pokupon-card__desc--expanded { -webkit-line-clamp: unset; display: block; padding-right: 0; }
.pokupon-store-single .pokupon-card__desc-toggle {
    position: absolute; top: 0; right: 0; height: 100%; display: none; /*align-items: center;*/
    background: transparent; border: none; color: var(--pokupon-primary); font-size: 20px; font-weight: bold;
    cursor: pointer; padding-left: 4px; z-index: 2;
}
.pokupon-store-single .pokupon-card__desc-toggle:hover { color: var(--pokupon-primary-dark); }
.pokupon-store-single .pokupon-card__expiry,
.pokupon-store-single .pokupon-card__expired {
    font-size: var(--pokupon-font-size-base); color: var(--pokupon-text-muted); margin-top: 2px; /*display: block;*/ display: inline-block;
    background: #e9ecef;
    padding: 2px 10px;
    border-radius: 10px;
}
.pokupon-store-single .pokupon-card__expired { color: var(--pokupon-error); font-weight: 600; }
.pokupon-store-single .pokupon-card__action {
    flex-shrink: 0; width: 180px;
}
.pokupon-store-single .pokupon-card__btn {
    width: 100%; min-height: 48px; display: flex; align-items: center;
    justify-content: center; padding: 10px 12px; font-size: var(--pokupon-font-size-md); font-weight: 500;
    border: none; border-radius: var(--pokupon-radius); cursor: pointer; text-align: center;
    line-height: var(--pokupon-line-height-base); transition: var(--pokupon-transition); white-space: nowrap;
    text-decoration: none; box-sizing: border-box;
}
.pokupon-store-single .pokupon-card__btn--promo { background: var(--pokupon-primary); color: var(--pokupon-bg-white); }
.pokupon-store-single .pokupon-card__btn--deal   { background: var(--pokupon-accent); color: var(--pokupon-bg-white); }
.pokupon-store-single .pokupon-card__btn--disabled { background: var(--pokupon-border); color: var(--pokupon-text-disabled); cursor: not-allowed; }
.pokupon-store-single .pokupon-card__btn:hover:not(:disabled) { /*transform: translateY(-1px);*/ filter: brightness(0.9); }

/* =========================================
   АДАПТИВНОСТЬ (ОБЩАЯ + СТРАНИЦА МАГАЗИНА)
   ========================================= */

@media (max-width: 1320px) {
    
}


@media (max-width: 992px) {
    .pokupon-grid-3-cols, .pokupon-grid-4-cols { grid-template-columns: repeat(2, 1fr); }
    
    .pokupon-store-layout { flex-direction: column; gap: var(--pokupon-gap-lg); width: 100%; }
    .pokupon-store-sidebar { width: 100%; position: static; }
    .pokupon-store-sidebar__inner {
        display: flex; align-items: center; justify-content: center;
        text-align: center; gap: var(--pokupon-gap); padding: var(--pokupon-padding-sm);
    }
    .pokupon-store-sidebar__logo-wrap { width: 250px; height: 150px; margin: 0; flex-shrink: 0; }
    .pokupon-store-sidebar__btn { width: auto; min-width: 180px; }
    .pokupon-store-main__title { font-size: var(--pokupon-font-size-xxl); margin-bottom: var(--pokupon-gap); text-align: center; }
    
    .pokupon-store-main { width: 100%; flex: none; min-width: 0; }

    .pokupon-popular-cats__grid { grid-template-columns: repeat(3, 1fr); }
    .pokupon-popular-cat__icon,
    .pokupon-popular-cat__placeholder { width: 60px; height: 60px; margin-bottom: 10px; }
    .pokupon-popular-cat__name { font-size: var(--pokupon-font-size-sm); }
    .pokupon-popular-cat { min-height: 160px; }
}

@media (max-width: 768px) {
    .pokupon-store-single .pokupon-card {
        flex-wrap: wrap; gap: var(--pokupon-gap-sm); padding: var(--pokupon-padding-sm);
    }
    .pokupon-store-single .pokupon-card__badge { width: 50px; height: 50px; }
    .pokupon-store-single .pokupon-card__info {
        flex: 1 1 calc(100% - 70px); min-width: 0;
    }
    .pokupon-store-single .pokupon-card__action {
        width: 100%; margin-top: 4px;
    }
    .pokupon-store-single .pokupon-card__btn { min-height: 44px; font-size: var(--pokupon-font-size-base); }
    .pokupon-store-single .pokupon-card__type { font-size: var(--pokupon-font-size-sm); padding: 4px; border-radius: var(--pokupon-radius-xs); }
    
    .pokupon-alphabet-nav { top: 0; /*border-radius: 0; margin: -20px -20px 20px -20px;*/ }
    .pokupon-categories-list { gap: 6px; margin-bottom: 18px; }
    .pokupon-category-item { /*padding: 5px 10px;*/ font-size: var(--pokupon-font-size-md); }
    .pokupon-category-icon { width: 16px; height: 16px; }

    .pokupon-popular-cats__grid { grid-template-columns: repeat(2, 1fr); }
    .pokupon-popular-cat__icon,
    .pokupon-popular-cat__placeholder { width: 70px; height: 70px; }
    .pokupon-popular-cat__name { font-size: var(--pokupon-font-size-base); }
    .pokupon-popular-cat { min-height: 170px; padding: var(--pokupon-padding); }
}

@media (max-width: 600px) {
    .pokupon-grid { grid-template-columns: 1fr; }
    .pokupon-stores-grid { grid-template-columns: repeat(2, 1fr); }
    
    .pokupon-store-sidebar__inner { flex-direction: column; gap: var(--pokupon-gap); }
    .pokupon-store-sidebar__logo-wrap { /*width: 200px;*/ height: 120px; }
    .pokupon-store-sidebar__btn { width: 100%; }
    .pokupon-store-main__title { /*font-size: var(--pokupon-font-size-xl);*/ text-align: left; }
    .pokupon-store-description { padding: var(--pokupon-padding-sm); margin: 24px 0; }
}

@media (max-width: 576px) {
    
}

@media (max-width: 480px) {
    .pokupon-card__actions { flex-direction: column; }
    .pokupon-card__btn { width: 100%; }
    .pokupon-modal { padding: 20px; }
    .pokupon-modal__code { font-size: 22px; padding: 12px 16px; }
    .pokupon-store-header { padding: 20px 15px; }
    .pokupon-page { padding: var(--pokupon-padding-sm); }
    
    .pokupon-store-layout { gap: var(--pokupon-gap); }
    .pokupon-store-sidebar__inner { padding: var(--pokupon-padding-sm); }
    .pokupon-store-sidebar__logo-wrap { /*width: 180px;*/ height: 108px; }
    .pokupon-store-main__title { /*font-size: var(--pokupon-font-size-lg);*/ }
    .pokupon-store-description { padding: 14px; }
    .pokupon-store-description__content { font-size: var(--pokupon-font-size-md); }
    
    .pokupon-store-single .pokupon-card { padding: 12px; gap: 10px; }
    .pokupon-store-single .pokupon-card__badge { width: 50px; height: 50px; }
    .pokupon-store-single .pokupon-card__type { font-size: var(--pokupon-font-size-xs); padding: 4px; border-radius: var(--pokupon-radius-xs); }
    
    .pokupon-breadcrumbs { /*font-size: var(--pokupon-font-size-sm);*/ gap: 4px; }
    .pokupon-search-widget { /*padding: 0 10px;*/ }
    .pokupon-search__item a { padding: 8px 10px; }
    .pokupon-search__item-icon { width: 28px; height: 28px; }

    .pokupon-popular-cats__grid { grid-template-columns: 1fr; }
    .pokupon-popular-cat__icon,
    .pokupon-popular-cat__placeholder { width: 80px; height: 80px; }
    .pokupon-popular-cat__name { font-size: var(--pokupon-font-size-md); }
    .pokupon-popular-cat { 
        min-height: auto; 
        padding: var(--pokupon-padding); 
        /* flex-direction: column сохраняется из базового правила */
    }

    .pokupon-stores-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* =========================================
   КНОПКА "НАВЕРХ" (SCROLL TO TOP)
   ========================================= */
.pokupon-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--pokupon-primary);
    color: var(--pokupon-bg-white);
    border: none;
    border-radius: var(--pokupon-radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    box-shadow: var(--pokupon-shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--pokupon-transition);
    z-index: 999;
    padding: 0;
    line-height: 1;
}
.pokupon-scroll-top:hover {
    background: var(--pokupon-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--pokupon-shadow-card-hover);
}
.pokupon-scroll-top:focus {
    outline: 2px solid var(--pokupon-primary);
    outline-offset: 2px;
}
.pokupon-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pokupon-scroll-top svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .pokupon-scroll-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}