/* ── ADAP DEALS SHORTCODE v3 ── */
.adap-deals-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1280px;
    margin: 0 auto;
}

/* ══ HERO SLIDER ══════════════════════════════════════════════════ */
.adap-hero-section {
    margin-bottom: 32px;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid #e8edf2;
}

.adap-hero-slider {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 220px;
}

.adap-hero-slide {
    display: none;
    align-items: stretch;
    border-bottom: 1.5px solid #e8edf2;
}
.adap-hero-slide.active,
.adap-hero-slide.active-pair,
.adap-hero-slide.active-pair2,
.adap-hero-slide.active-pair3 {
    display: flex;
}

/* Разделители внутри группы */
.adap-hero-slide.active-pair,
.adap-hero-slide.active-pair2,
.adap-hero-slide.active-pair3 {
    border-left: 1.5px solid #e8edf2;
}
/* Нижняя строка без border-bottom */
.adap-hero-slide.active-pair2,
.adap-hero-slide.active-pair3 {
    border-bottom: none;
}
.adap-hero-slide.active {
    border-bottom: 1.5px solid #e8edf2;
}

.adap-hero-img {
    width: 200px;
    min-width: 200px;
    overflow: hidden;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.adap-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.adap-hero-img-placeholder {
    font-size: 48px;
    opacity: 0.3;
}

.adap-hero-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.adap-hero-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--adap-accent, #e0334c);
    background: rgba(224,51,76,0.08);
    padding: 3px 9px;
    border-radius: 4px;
    align-self: flex-start;
}

.adap-hero-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adap-hero-preview {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.adap-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.adap-hero-date {
    font-size: 11px;
    color: #aab;
}

.adap-hero-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--adap-accent, #e0334c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
    align-self: flex-start;
    margin-top: auto;
}
.adap-hero-read-btn:hover { opacity: 0.85; }

/* Hero Nav */
.adap-hero-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 24px;
    border-top: 1.5px solid #e8edf2;
    background: #fff;
}
.adap-hero-prev,
.adap-hero-next {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}
.adap-hero-prev:hover, .adap-hero-next:hover {
    border-color: var(--adap-accent, #e0334c);
    color: var(--adap-accent, #e0334c);
    background: rgba(224,51,76,0.04);
}
.adap-hero-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}
.adap-hero-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s;
    display: block;
}
.adap-hero-dot.active {
    background: var(--adap-accent, #e0334c);
    width: 22px;
    border-radius: 4px;
}

/* Hero Footer */
.adap-hero-footer {
    padding: 10px 20px 14px;
    text-align: center;
    border-top: 1.5px solid #e8edf2;
}
.adap-hero-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--adap-accent, #e0334c);
    text-decoration: none;
}
.adap-hero-all-btn:hover { text-decoration: underline; }

/* ══ FILTER ══════════════════════════════════════════════════════ */
.adap-filter-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    padding-bottom: 4px;
}
.adap-filter-wrap::-webkit-scrollbar { height: 3px; }
.adap-filter-wrap::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }

.adap-deals-filter {
    display: flex;
    gap: 8px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap;
    min-width: max-content;
}

.adap-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: #f5f5f5;
    border: 1.5px solid transparent;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.adap-cat-btn:hover { background: #fff; border-color: var(--adap-accent, #e0334c); color: var(--adap-accent, #e0334c); }
.adap-cat-btn.active { background: var(--adap-accent, #e0334c); color: #fff; border-color: var(--adap-accent, #e0334c); }
.adap-cat-check { display: none; font-size: 10px; font-weight: 900; margin-right: 2px; }
.adap-cat-btn.active .adap-cat-check { display: inline; }
.adap-cat-count { background: rgba(255,255,255,0.3); padding: 1px 6px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.adap-cat-btn:not(.active) .adap-cat-count { background: #e8e8e8; color: #888; }

/* ══ LAYOUT ══════════════════════════════════════════════════════ */
.adap-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 24px;
    align-items: start;
}

/* ══ GRID ════════════════════════════════════════════════════════ */
.adap-deals-grid {
    display: grid;
    grid-template-columns: repeat(var(--adap-cols, 3), 1fr);
    gap: 16px;
}

/* ══ CARD ════════════════════════════════════════════════════════ */
.adap-deal-card {
    background: #fff;
    border: 1.5px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.22s ease;
    position: relative;
}
.adap-deal-card:hover { border-color: #ddd; box-shadow: 0 6px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.adap-deal-card.is-blitz { border-color: #ffe0d6; background: linear-gradient(180deg, #fff8f6 0%, #fff 60%); }

.adap-card-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 3px; z-index: 2; }
.adap-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 5px; line-height: 1.4; }
.adap-badge-discount { background: var(--adap-accent, #e0334c); color: #fff; }
.adap-badge-blitz { background: #ff6b35; color: #fff; white-space: nowrap; }

.adap-card-img { width: 100%; height: 160px; display: flex; align-items: center; justify-content: center; background: #fafafa; overflow: hidden; padding: 12px; }
.adap-card-img img { max-width: 100%; max-height: 136px; object-fit: contain; transition: transform 0.3s; }
.adap-deal-card:hover .adap-card-img img { transform: scale(1.04); }
.adap-img-placeholder { font-size: 40px; opacity: 0.3; }

.adap-card-body { padding: 12px 14px 8px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.adap-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.adap-card-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--adap-accent, #e0334c); background: rgba(224,51,76,0.07); padding: 2px 7px; border-radius: 4px; }
.adap-card-date { font-size: 10px; color: #aaa; white-space: nowrap; }
.adap-card-title { font-size: 12.5px; font-weight: 600; color: #1a1a1a; line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.adap-card-prices { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.adap-price-main { font-size: 20px; font-weight: 800; color: var(--adap-accent, #e0334c); letter-spacing: -0.5px; }
.adap-price-old { font-size: 12px; color: #bbb; text-decoration: line-through; }
.adap-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.adap-tag { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 5px; }
.adap-tag-blitz { background: #fff3f0; color: #e0334c; border: 1px solid #ffd6cc; }
.adap-tag-coupon { background: #fffbf0; color: #b8860b; border: 1px solid #ffe8a0; }
.adap-tag-kasse { background: #f0fff4; color: #2d6a4f; border: 1px solid #b7e4c7; }
.adap-card-rating { display: flex; align-items: center; gap: 4px; font-size: 11px; }
.adap-stars { color: #f59e0b; font-size: 12px; }
.adap-rating-num { font-weight: 700; color: #555; }
.adap-reviews { color: #bbb; }

.adap-card-footer { padding: 10px 14px 12px; }
.adap-btn-buy {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    width: 100%; padding: 9px 14px;
    background: #FF9900;
    color: #111 !important;
    border: none; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    text-decoration: none !important; cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
    box-shadow: 0 1px 0 rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.22);
    position: relative; overflow: hidden;
}
.adap-btn-buy::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 55%);
    pointer-events: none; border-radius: inherit;
}
.adap-btn-buy:hover {
    background: #e8920a;
    box-shadow: 0 3px 12px rgba(255,153,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
    color: #111 !important;
}
.adap-btn-buy:active { transform: translateY(0); }
.adap-btn-buy .adap-btn-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; flex: 1; }
.adap-btn-buy .adap-btn-label-top { font-size: 9.5px; font-weight: 600; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
.adap-btn-buy .adap-btn-label-main { font-size: 13px; font-weight: 800; }
.adap-btn-blitz {
    background: linear-gradient(135deg, #ff4e00 0%, #e0334c 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(224,51,76,0.35) !important;
}
.adap-btn-blitz:hover {
    background: linear-gradient(135deg, #e04400 0%, #c41e3a 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(224,51,76,0.45) !important;
}
.adap-no-deals { grid-column: 1/-1; text-align: center; padding: 48px; color: #aaa; }

/* ══ SIDEBAR ═════════════════════════════════════════════════════ */
.adap-sidebar { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 20px; }
.adap-banner { border-radius: 10px; overflow: hidden; border: 1.5px solid #f0f0f0; transition: box-shadow 0.2s; }
.adap-banner:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.adap-banner img { width: 100%; height: auto; display: block; }
.adap-banner a { display: block; }

/* Load More */
.adap-load-more-wrap { text-align: center; margin-top: 24px; }
.adap-load-more { display: inline-flex; align-items: center; gap: 8px; padding: 11px 28px; background: #fff; border: 2px solid #e8e8e8; border-radius: 100px; font-size: 13px; font-weight: 600; color: #555; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.adap-load-more:hover { border-color: var(--adap-accent, #e0334c); color: var(--adap-accent, #e0334c); }
.adap-load-more.loading { opacity: 0.6; pointer-events: none; }
.adap-spinner-inline { width: 14px; height: 14px; border: 2px solid #ddd; border-top-color: var(--adap-accent, #e0334c); border-radius: 50%; animation: adap-spin 0.7s linear infinite; display: inline-block; }
@keyframes adap-spin { to { transform: rotate(360deg); } }

/* Telegram */
.adap-tg-widget { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #e8f4fd, #dbeafe); border: 1.5px solid #bfdbfe; border-radius: 12px; padding: 14px 18px; margin-top: 20px; flex-wrap: wrap; }
.adap-tg-icon { font-size: 22px; }
.adap-tg-text { flex: 1; font-size: 13px; font-weight: 600; color: #1e40af; }
.adap-tg-btn { display: inline-flex; align-items: center; padding: 8px 18px; background: #2563eb; color: #fff !important; border-radius: 7px; font-size: 12px; font-weight: 700; text-decoration: none !important; transition: background 0.2s; white-space: nowrap; }
.adap-tg-btn:hover { background: #1d4ed8 !important; }

/* ══ MODAL ═══════════════════════════════════════════════════════ */
.adap-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: adap-fade-in 0.2s ease;
}
@keyframes adap-fade-in { from { opacity: 0; } to { opacity: 1; } }

.adap-modal-box {
    background: #fff;
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: adap-slide-up 0.25s ease;
}
@keyframes adap-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.adap-modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 32px; height: 32px;
    background: rgba(0,0,0,0.5); border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #fff; font-size: 16px; line-height: 1;
    transition: background 0.2s;
}
.adap-modal-close:hover { background: rgba(0,0,0,0.75); }

.adap-modal-img-wrap img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    display: block;
}

.adap-modal-body { padding: 24px; }
.adap-modal-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.adap-modal-cat { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--adap-accent, #e0334c); background: rgba(224,51,76,0.08); padding: 3px 9px; border-radius: 4px; }
.adap-modal-date { font-size: 11px; color: #aaa; }
.adap-modal-title { font-size: 20px; font-weight: 800; color: #1a1a1a; line-height: 1.3; margin: 0 0 16px; }
.adap-modal-text { font-size: 14px; color: #374151; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.adap-modal-footer { margin-top: 20px; padding-top: 16px; border-top: 1.5px solid #f0f0f0; }
.adap-modal-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    background: var(--adap-accent, #e0334c);
    color: #fff !important; text-decoration: none !important;
    border-radius: 9px; font-size: 13px; font-weight: 700;
    transition: opacity 0.2s;
}
.adap-modal-link:hover { opacity: 0.88; }

/* ══ RESPONSIVE ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .adap-layout { grid-template-columns: 1fr 180px; gap: 16px; }
    .adap-deals-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .adap-hero-img { width: 160px; min-width: 160px; }
}

@media (max-width: 768px) {
    .adap-hero-slider { grid-template-columns: 1fr; }
    /* На мобильном показываем только 2 из 4 */
    .adap-hero-slide.active-pair2,
    .adap-hero-slide.active-pair3 { display: none !important; }
    .adap-hero-slide.active-pair { border-left: none; border-top: 1.5px solid #e8edf2; }
    .adap-hero-img { width: 130px; min-width: 130px; }
    .adap-layout { grid-template-columns: 1fr; }
    .adap-sidebar { flex-direction: row; flex-wrap: wrap; position: static; }
    .adap-banner { flex: 1 1 calc(50% - 6px); }
    .adap-deals-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
}

@media (max-width: 480px) {
    .adap-hero-content { padding: 16px; }
    .adap-hero-title { font-size: 13px; }
    .adap-deals-grid { grid-template-columns: repeat(1, 1fr) !important; gap: 10px; }
    .adap-card-img { height: 120px; padding: 8px; }
    .adap-price-main { font-size: 16px; }
    .adap-sidebar { display: none; }
    .adap-modal-box { border-radius: 12px; }
    .adap-modal-body { padding: 16px; }
}

@media (max-width: 360px) {
    .adap-deals-grid { grid-template-columns: 1fr !important; }
}

/* Share button */
.adap-card-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 12px;
    align-items: center;
}
.adap-btn-buy { flex: 1; }
.adap-btn-share,
.adap-btn-copy {
    width: 38px; height: 38px; flex-shrink: 0;
    background: #f5f5f5; border: 1.5px solid #e8e8e8;
    border-radius: 9px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #666; transition: all 0.2s;
    padding: 0;
}
.adap-btn-share:hover { background: #e8f4fd; border-color: #2563eb; color: #2563eb; }
.adap-btn-copy:hover { background: #f0fdf4; border-color: #16a34a; color: #16a34a; }
.adap-btn-copy.copied { background: #f0fdf4; border-color: #16a34a; color: #16a34a; }

/* Share toast */
.adap-share-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #1a1a1a; color: #fff;
    padding: 10px 20px; border-radius: 100px;
    font-size: 13px; font-weight: 600;
    z-index: 999999; opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    pointer-events: none;
}
.adap-share-toast.show { opacity: 1; }

/* Manual modal category */
.adap-manual-category-select {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; background: #fff;
    cursor: pointer; font-family: inherit;
}
.adap-manual-category-select:focus { outline: none; border-color: #667eea; }

/* ── PRICES BLOCK ─────────────────────────────────────────────── */
.adap-prices-block { display: flex; flex-direction: column; gap: 5px; }

.adap-price-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

/* Главная цена */
.adap-price-row--main { margin-bottom: 2px; }
.adap-price-main { font-size: 20px; font-weight: 800; color: var(--adap-accent, #e0334c); letter-spacing: -0.5px; }
.adap-price-blitz { color: #ff6b35 !important; }
.adap-price-old { font-size: 12px; color: #bbb; text-decoration: line-through; }

/* Spar-Abo */
.adap-price-row--sns { background: #f0fdf4; border-radius: 6px; padding: 4px 8px; }
.adap-price-label { font-size: 11px; color: #555; }
.adap-price-sns { font-size: 14px; font-weight: 700; color: #16a34a; }
.adap-price-sns-orig { font-size: 11px; color: #aaa; text-decoration: line-through; }

/* Купон */
.adap-price-row--coupon { background: #fffbf0; border-radius: 6px; padding: 4px 8px; }
.adap-price-coupon-badge { font-size: 11px; font-weight: 600; color: #b45309; }
.adap-price-after-coupon { font-size: 12px; font-weight: 700; color: #b45309; }

/* Кассе */
.adap-price-row--kasse { background: #f0fff4; border-radius: 6px; padding: 4px 8px; }
.adap-price-kasse-badge { font-size: 11px; font-weight: 600; color: #2d6a4f; }

/* Кликабельные ссылки в модале */
.adap-modal-text { font-size: 14px; color: #374151; line-height: 1.7; word-break: break-word; }
.adap-modal-inline-link {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid rgba(37,99,235,0.3);
    transition: border-color 0.2s;
    word-break: break-all;
}
.adap-modal-inline-link:hover { border-color: #2563eb; }

/* ── TODAY SWITCH ─────────────────────────────────────────────── */
.adap-filter-top {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-bottom: 2px solid #f0f0f0;
}
.adap-filter-top .adap-deals-filter {
    border-bottom: none;
    padding-bottom: 10px;
    flex: 1;
}
.adap-filter-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 12px;
}

@media (max-width: 768px) {
    .adap-filter-bottom {
        gap: 6px;
        padding: 6px 0 10px;
    }
    .adap-today-switch {
        padding: 5px 10px 5px 7px;
        flex: 0 0 auto;
    }
    .adap-today-label {
        font-size: 11px;
    }
    .adap-today-slider {
        width: 30px; height: 17px;
    }
    .adap-today-slider::after {
        width: 11px; height: 11px;
        top: 3px; left: 3px;
    }
    .adap-today-switch input:checked + .adap-today-slider::after {
        transform: translateX(13px);
    }
}
.adap-today-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    background: #f5f5f5;
    border: 1.5px solid #e8e8e8;
    border-radius: 100px;
    padding: 5px 12px 5px 8px;
    transition: all 0.2s;
}
.adap-today-switch:hover { border-color: var(--adap-accent, #e0334c); }
.adap-today-switch input { display: none; }

.adap-today-slider {
    width: 36px; height: 20px;
    background: #d1d5db;
    border-radius: 100px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}
.adap-today-slider::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.adap-today-switch input:checked + .adap-today-slider {
    background: var(--adap-accent, #e0334c);
}
.adap-today-switch input:checked + .adap-today-slider::after {
    transform: translateX(16px);
}
.adap-today-label {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    transition: color 0.2s;
}
.adap-today-switch:has(input:checked) {
    background: #fff1f2;
    border-color: var(--adap-accent, #e0334c);
}
.adap-today-switch:has(input:checked) .adap-today-label {
    color: var(--adap-accent, #e0334c);
}

/* ── WISHLIST BUTTON (на фото) ────────────────────────────────── */
.adap-card-img { position: relative; }

.adap-btn-wishlist {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #bbb;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.adap-btn-wishlist:hover {
    color: #e0334c;
    background: #fff;
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(224,51,76,0.2);
}
.adap-btn-wishlist.is-saved {
    color: #e0334c;
    background: #fff;
    border-color: rgba(224,51,76,0.3);
    box-shadow: 0 2px 10px rgba(224,51,76,0.25);
}
.adap-btn-wishlist.is-saved svg { fill: #e0334c; stroke: #e0334c; }
.adap-btn-wishlist svg { transition: transform 0.15s; }
.adap-btn-wishlist:active svg { transform: scale(1.3); }

/* ── WISHLIST STICKY BAR ──────────────────────────────────────── */
/* Убираем старый inline бар */
.adap-wishlist-bar { display: none !important; }

/* Sticky бар внизу */
#adap-wishlist-sticky {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 680px;
    background: #fff;
    border: 2px solid #fecdd3;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(224, 51, 76, 0.18), 0 2px 12px rgba(0,0,0,0.08);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    opacity: 0;
}
#adap-wishlist-sticky.visible {
    bottom: 16px;
    pointer-events: all;
    opacity: 1;
}
.adap-wishlist-bar-left {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: #9f1239;
    white-space: nowrap;
}
.adap-wishlist-count-badge {
    background: #e0334c; color: #fff;
    border-radius: 100px; padding: 2px 9px;
    font-size: 12px; font-weight: 800;
    min-width: 22px; text-align: center;
    animation: adap-pop 0.25s ease;
}
@keyframes adap-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.adap-wishlist-actions { display: flex; gap: 8px; flex-shrink: 0; }
.adap-btn-show-wishlist, .adap-btn-clear-wishlist {
    padding: 7px 16px; border-radius: 10px;
    font-size: 12px; font-weight: 700;
    cursor: pointer; border: none; transition: all 0.2s;
    white-space: nowrap;
}
.adap-btn-show-wishlist {
    background: #e0334c; color: #fff;
    box-shadow: 0 2px 8px rgba(224,51,76,0.3);
}
.adap-btn-show-wishlist:hover { background: #c41e3a; transform: translateY(-1px); }
.adap-btn-show-wishlist.active { background: #1a1a1a; }
.adap-btn-clear-wishlist {
    background: #f5f5f5; color: #666;
    border: 1.5px solid #e8e8e8;
}
.adap-btn-clear-wishlist:hover { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }

@media (max-width: 480px) {
    #adap-wishlist-sticky { padding: 10px 12px; gap: 8px; }
    .adap-btn-show-wishlist, .adap-btn-clear-wishlist { padding: 7px 12px; font-size: 11px; }
    .adap-wishlist-bar-left { font-size: 12px; }
}

/* ══ ALL POSTS MODAL ═════════════════════════════════════════════ */
.adap-allposts-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-end;
    animation: adap-fade-in 0.2s ease;
}
@keyframes adap-fade-in { from { opacity: 0; } to { opacity: 1; } }

.adap-allposts-modal {
    width: 100%; max-height: 90vh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    display: flex; flex-direction: column;
    animation: adap-slide-up 0.3s cubic-bezier(0.34,1.2,0.64,1);
    overflow: hidden;
}
@keyframes adap-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.adap-allposts-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1.5px solid #f0f0f0;
    flex-shrink: 0;
}
.adap-allposts-modal-header h2 { font-size: 17px; font-weight: 800; margin: 0; }
.adap-allposts-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: #f0f0f0; border: none; cursor: pointer;
    font-size: 14px; font-weight: 700; color: #555;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.adap-allposts-close:hover { background: #e0334c; color: #fff; }

.adap-allposts-grid {
    overflow-y: auto; padding: 16px 20px;
    flex: 1;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; align-content: start;
}
.adap-allposts-loading { grid-column: 1/-1; text-align: center; padding: 48px; color: #aaa; font-size: 14px; }

.adap-allposts-item {
    display: flex; gap: 12px; padding: 12px;
    border: 1.5px solid #f0f0f0; border-radius: 12px;
    cursor: pointer; transition: all 0.18s;
    background: #fff;
}
.adap-allposts-item:hover { border-color: #e0334c; box-shadow: 0 2px 12px rgba(224,51,76,0.1); }
.adap-allposts-img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #f5f5f5; }
.adap-allposts-img img { width: 100%; height: 100%; object-fit: cover; }
.adap-allposts-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.adap-allposts-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adap-allposts-cat {
    font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
    color: #e0334c; background: #fff1f2; padding: 2px 6px; border-radius: 4px;
    display: inline-block; width: fit-content;
}
.adap-allposts-title { font-size: 12px; font-weight: 700; line-height: 1.35; margin: 0; color: #1a1a1a; }
.adap-allposts-preview { font-size: 11px; color: #888; line-height: 1.4; margin: 0; flex: 1; }
.adap-allposts-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.adap-allposts-date { font-size: 10px; color: #bbb; }
.adap-allposts-read {
    font-size: 10px; font-weight: 700; color: #e0334c;
    background: none; border: none; cursor: pointer; padding: 0;
}

/* Pagination */
.adap-allposts-pagination {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 14px 20px 20px; flex-shrink: 0;
    border-top: 1.5px solid #f0f0f0;
}
.adap-allposts-page-btn {
    width: 34px; height: 34px; border-radius: 9px;
    background: #f5f5f5; border: 1.5px solid #ebebeb;
    font-size: 13px; font-weight: 700; color: #555;
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.adap-allposts-page-btn:hover { background: #fff1f2; border-color: #e0334c; color: #e0334c; }
.adap-allposts-page-btn.active { background: #e0334c; border-color: #e0334c; color: #fff; }
.adap-allposts-page-btn:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 600px) {
    .adap-allposts-grid { grid-template-columns: 1fr; padding: 12px; }
    .adap-allposts-modal { max-height: 92vh; }
}
