/* =================================================================
   ONLYPEDIA DISCOVER PAGE — v1.1
   Editorial-style horizontal carousel feed.
   Card aspect ratio 4:5, ~210px width on desktop (6-7 visible).
   Anchored to header --op-* variables; --disc-* for component-local.

   v1.1 changes:
     - Search bar removed (redundant with header + tabbar)
     - Rail full-width breakout (fixes overflow issue)
     - Decorative hero blobs desktop-only
     - TRENDING badge removed from premium cards
     - Gradient border removed from premium cards
     - Price pill: same dark style for FREE and paid (matches category pages)
   ================================================================= */

/* =================================================================
   1. CSS VARIABLES — Theme tokens
   ================================================================= */

[data-op-theme="light"] {
    --disc-page-bg:                 var(--op-bg);
    --disc-hero-bg:                 transparent;
    --disc-hero-pattern-1:          rgba(248,87,166,0.08);
    --disc-hero-pattern-2:          rgba(255,88,88,0.06);
    --disc-hero-pattern-3:          rgba(3,175,240,0.05);

    --disc-title-gradient:          linear-gradient(125deg, #1a1a2e 0%, #4b0d85 35%, #f857a6 65%, #ff5858 100%);

    --disc-breadcrumb-color:        #6e6e80;
    --disc-breadcrumb-hover:        #f857a6;
    --disc-breadcrumb-current:      #1a1a2e;
    --disc-breadcrumb-separator:    rgba(0,0,0,0.25);

    --disc-best-badge-bg:           linear-gradient(135deg, #f857a6, #ff5858);
    --disc-best-badge-color:        #ffffff;
    --disc-updated-badge-bg:        rgba(0,0,0,0.05);
    --disc-updated-badge-border:    rgba(0,0,0,0.08);
    --disc-updated-badge-color:     #1a1a2e;

    --disc-intro-color:             #4a4a5e;
    --disc-intro-toggle-color:      #f857a6;
    --disc-intro-toggle-border:     rgba(11,8,30,0.20);
    --disc-intro-toggle-hover-bg:   rgba(248,87,166,0.08);

    --disc-divider-line:            rgba(0,0,0,0.08);
    --disc-divider-title:           #1a1a2e;
    --disc-divider-sub:             #6e6e80;

    --disc-carousel-title:          #1a1a2e;
    --disc-carousel-viewall:        #f857a6;
    --disc-carousel-viewall-hover:  #ff5858;

    --disc-arrow-color:             #1a1a2e;
    --disc-arrow-hover-color:       #f857a6;
    --disc-arrow-disabled-opacity:  0.30;

    --disc-card-shadow:             0 4px 20px rgba(11,8,30,0.10);
    --disc-card-shadow-hover:       0 12px 38px rgba(11,8,30,0.20);
    --disc-card-bg:                 #1a1a28;

    --disc-faq-bg:                  #ffffff;
    --disc-faq-border:              rgba(0,0,0,0.06);
    --disc-faq-shadow:              0 4px 20px rgba(0,0,0,0.05);
    --disc-faq-shadow-hover:        0 8px 30px rgba(0,0,0,0.10);
    --disc-faq-q-color:             #1a1a2e;
    --disc-faq-q-hover-bg:          #f8f9fa;
    --disc-faq-answer-bg:           #fafafa;
    --disc-faq-answer-color:        #4a4a5e;
    --disc-faq-title:               #1a1a2e;
}

[data-op-theme="dark"] {
    --disc-page-bg:                 var(--op-bg);
    --disc-hero-bg:                 transparent;
    --disc-hero-pattern-1:          rgba(248,87,166,0.10);
    --disc-hero-pattern-2:          rgba(255,88,88,0.08);
    --disc-hero-pattern-3:          rgba(3,175,240,0.06);

    --disc-title-gradient:          linear-gradient(125deg, #f1f7fd 0%, #fbf3fa 50%, #fff8f2 100%);

    --disc-breadcrumb-color:        var(--op-text-secondary);
    --disc-breadcrumb-hover:        var(--op-accent);
    --disc-breadcrumb-current:      var(--op-text-muted);
    --disc-breadcrumb-separator:    var(--op-text-muted);

    --disc-best-badge-bg:           linear-gradient(135deg, #f857a6, #ff5858);
    --disc-best-badge-color:        #ffffff;
    --disc-updated-badge-bg:        var(--op-bg-secondary);
    --disc-updated-badge-border:    var(--op-border);
    --disc-updated-badge-color:     var(--op-text-primary);

    --disc-intro-color:             var(--op-text-secondary);
    --disc-intro-toggle-color:      var(--op-accent);
    --disc-intro-toggle-border:     rgba(255,255,255,0.28);
    --disc-intro-toggle-hover-bg:   rgba(248,87,166,0.14);

    --disc-divider-line:            var(--op-border);
    --disc-divider-title:           var(--op-text-primary);
    --disc-divider-sub:             var(--op-text-secondary);

    --disc-carousel-title:          var(--op-text-primary);
    --disc-carousel-viewall:        var(--op-accent);
    --disc-carousel-viewall-hover:  #ff5858;

    --disc-arrow-color:             #ffffff;
    --disc-arrow-hover-color:       #f857a6;
    --disc-arrow-disabled-opacity:  0.35;

    --disc-card-shadow:             0 4px 20px rgba(0,0,0,0.4);
    --disc-card-shadow-hover:       0 12px 38px rgba(0,0,0,0.5);
    --disc-card-bg:                 #15151f;

    --disc-faq-bg:                  #1a1a28;
    --disc-faq-border:              var(--op-border);
    --disc-faq-shadow:              0 4px 20px rgba(0,0,0,0.4);
    --disc-faq-shadow-hover:        0 8px 30px rgba(0,0,0,0.5);
    --disc-faq-q-color:             var(--op-text-primary);
    --disc-faq-q-hover-bg:          var(--op-bg-secondary);
    --disc-faq-answer-bg:           var(--op-bg-secondary);
    --disc-faq-answer-color:        var(--op-text-secondary);
    --disc-faq-title:               var(--op-text-primary);
}

/* =================================================================
   2. PAGE BASE
   ================================================================= */

.discover-page {
    background: var(--disc-page-bg);
    min-height: 100vh;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* No overflow-x:hidden here — would break scroll-snap on inner rails.
       Body-level horizontal overflow is prevented by html/body rule below. */
}

/* Prevent the rail's full-width layout from creating a horizontal scrollbar
   at page level. body needs overflow-x:hidden; rails have their own
   internal overflow-x:auto for swiping.
   !important is required because the parent Wikilogy theme sets overflow rules. */
body.op-discover-page,
html:has(body.op-discover-page) {
    overflow-x: hidden !important;
}

.discover-page .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* =================================================================
   3. HERO
   ================================================================= */

.discover-hero {
    position: relative;
    padding: 36px 0 44px;                 /* match the category hero */
    overflow: hidden;
    background: var(--disc-hero-bg);
    border-bottom: 1px solid var(--cat-hero-border, rgba(0,0,0,0.06));
}

/* Animated liquid gradient bg — same treatment as the category hero. Defined here
   because category-styles.css isn't loaded on /discover/. */
.discover-hero .hero-liquid-bg { position:absolute; top:0; left:0; width:100%; height:100%; z-index:0; pointer-events:none; }
[data-op-theme="dark"] .discover-hero .hero-liquid-bg { opacity:0.5; mix-blend-mode:screen; }
@media (prefers-reduced-motion: reduce) {
    .discover-hero .hero-liquid-bg * { animation:none !important; }
}

/* Old static blur blobs replaced by the animated SVG above. */
.discover-hero::before,
.discover-hero::after { display: none !important; }

.discover-hero-content {
    max-width: var(--op-content-max, 1640px);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Breadcrumb */
.discover-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: 0.85rem;
    color: var(--disc-breadcrumb-color);
}

.discover-breadcrumb a {
    color: var(--disc-breadcrumb-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.discover-breadcrumb a:hover {
    color: var(--disc-breadcrumb-hover);
}

.discover-breadcrumb .current {
    color: var(--disc-breadcrumb-current);
    font-weight: 500;
}

.discover-breadcrumb .separator {
    margin: 0 8px;
    color: var(--disc-breadcrumb-separator);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .discover-breadcrumb { display: none; }
}

/* Badges row */
.discover-badges-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px 0;
}

.discover-best-badge {
    display: inline-block;
    margin: 0;
    padding: 6px 16px;
    font-family: 'Special Gothic Expanded One', sans-serif;
    font-weight: 400;
    background: var(--disc-best-badge-bg);
    color: var(--disc-best-badge-color);
    font-size: 0.65rem;
    border-radius: 25px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.discover-updated-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--disc-updated-badge-bg);
    border: 1px solid var(--disc-updated-badge-border);
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--disc-updated-badge-color);
}

/* Title */
.discover-header-main {
    margin-bottom: 18px;
}

.discover-title {
    font-display: swap;
    margin: 0;
    transform: translate3d(0,0,0);
}

.discover-title-main {
    display: block;
    font-family: 'Special Gothic Expanded One', sans-serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    background: var(--disc-title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Intro text — fully shown, small font */
.discover-intro {
    max-width: 760px;
    margin: 0 0 8px 0;
}

.discover-intro-text {
    font-size: 0.70rem;
    line-height: 1.7;
    color: var(--disc-intro-color);
    margin: 0;
    font-weight: 400;
}

@media (max-width: 768px) {
    .discover-hero { padding: 22px 0 18px; }
    .discover-hero-content { padding: 0 16px; }
    .discover-best-badge { font-size: 0.55rem; padding: 4px 12px; }
    .discover-updated-badge { font-size: 0.62rem; padding: 3px 10px; }
    .discover-title-main { font-size: 2rem; letter-spacing: -0.02em; }
}

@media (max-width: 480px) {
    .discover-hero-content { padding: 0 14px; }
}

/* =================================================================
   4. SECTIONS — wrappers
   ================================================================= */

.discover-section {
    padding: 14px 0 8px;
    position: relative;
}

.discover-section-sponsored { padding-top: 4px; }

/* Section divider — minimal title + subtitle */
.discover-section-divider {
    max-width: var(--op-content-max, 1640px);
    margin: 32px auto 18px;
    padding: 0 24px;
}

.discover-section-divider-title {
    font-family: 'Special Gothic Expanded One', sans-serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 2vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--disc-divider-title);
    margin: 0 0 6px 0;
}

[data-op-theme="dark"] .discover-section-divider-title {
    background: var(--disc-title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.discover-section-divider-sub {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--disc-divider-sub);
    margin: 0;
    max-width: 600px;
    font-weight: 400;
}

@media (max-width: 768px) {
    .discover-section-divider { margin: 24px auto 12px; padding: 0 16px; }
    .discover-section-divider-title { font-size: 1.25rem; }
    .discover-section-divider-sub { font-size: 0.82rem; }
}

@media (max-width: 480px) {
    .discover-section-divider { padding: 0 14px; }
}

/* =================================================================
   5. CAROUSEL — header + rail wrapper
   ═════════════════════════════════════════════════════════════════
   Layout strategy (V2 — contained):
   - .discover-carousel is contained at max-width: 1440px, centered
   - All children (header, rail-wrap, rail) live inside that 1440 box
   - Rail uses internal scroll when content exceeds container width
   - On screens > 1440px: empty space left/right (consistent with
     header and hero sections)
   - On screens < 1440px: natural width minus 24px gutters
   ================================================================= */

.discover-carousel {
    margin: 0 auto 30px;
    max-width: var(--op-content-max, 1640px);
    padding: 0 24px;
    position: relative;
}

@media (max-width: 768px) {
    .discover-carousel { padding: 0 16px; margin-bottom: 24px; }
}

@media (max-width: 480px) {
    .discover-carousel { padding: 0 14px; }
}

.discover-carousel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}

.discover-carousel-title {
    font-family: 'Special Gothic Expanded One', sans-serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--disc-carousel-title);
    margin: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-op-theme="dark"] .discover-carousel-title {
    background: var(--disc-title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.discover-carousel-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.discover-carousel-viewall {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--disc-carousel-viewall);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: gap 0.22s ease, color 0.18s ease;
    white-space: nowrap;
}

.discover-carousel-viewall:hover {
    color: var(--disc-carousel-viewall-hover);
    gap: 8px;
}

.discover-carousel-viewall svg { flex-shrink: 0; }

/* Arrows — pill buttons, modern */
.discover-carousel-arrows {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.discover-carousel-arrows .discover-arrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    cursor: pointer;
    transition: transform 0.18s ease;
    padding: 0;
    flex-shrink: 0;
}

.discover-carousel-arrows .discover-arrow:hover:not(:disabled) {
    transform: translateX(0);
}

.discover-carousel-arrows .discover-arrow-prev:hover:not(:disabled) { transform: translateX(-2px); }
.discover-carousel-arrows .discover-arrow-next:hover:not(:disabled) { transform: translateX(2px); }

.discover-carousel-arrows .discover-arrow:disabled,
.discover-carousel-arrows .discover-arrow[aria-disabled="true"] {
    opacity: 0.3;
    cursor: not-allowed;
}

.discover-carousel-arrows .discover-arrow svg {
    display: block;
    width: 32px !important;
    height: 32px !important;
}

/* Explicit stroke color — bypasses currentColor inheritance edge cases.
   Light: dark icon. Dark: white icon. Hover: pink accent. */
.discover-carousel-arrows .discover-arrow svg path {
    stroke: #1a1a2e !important;
    stroke-width: 2.5 !important;
    transition: stroke 0.18s ease;
}

[data-op-theme="dark"] .discover-carousel-arrows .discover-arrow svg path {
    stroke: #ffffff !important;
}

.discover-carousel-arrows .discover-arrow:hover:not(:disabled) svg path {
    stroke: #f857a6 !important;
}

@media (max-width: 768px) {
    /* Arrows hidden on mobile — touch-scroll only */
    .discover-carousel-arrows { display: none; }
    .discover-carousel-header { gap: 10px; margin-bottom: 10px; }
    .discover-carousel-title { font-size: 1rem; letter-spacing: -0.01em; }
    .discover-carousel-viewall { font-size: 0.72rem; }
}/* =================================================================
   6. RAIL — scroll-snap horizontal, contained inside .discover-carousel
   ═════════════════════════════════════════════════════════════════
   The rail is a horizontally-scrolling flex container. It lives inside
   .discover-carousel which is centered at max-width: 1440px with 24px
   side padding (16px on tablet, 14px on small mobile).

   When the rail's content is wider than the container, users can scroll
   horizontally — via touch swipe, scrollbar drag, mouse wheel
   (shift+wheel), or arrow buttons (Phase 3 JS).

   UX affordances:
   - Always-visible scrollbar on desktop (8px height, opaque thumb).
   - Right-edge gradient fade signals "more content scrollable →".
   - Left-edge fade appears once user scrolls past start (JS adds
     .is-scrolled-start to wrap; without JS only the right fade shows).
   ================================================================= */

/* Rail wrapper — kept as positioning context for arrow disable state.
   No fade gradients (per design choice). */
.discover-rail-wrap {
    position: relative;
}

.discover-rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* No horizontal padding — parent .discover-carousel handles gutters.
       Cards start at the left edge of the contained 1440px box. */
    padding: 8px 0 12px;

    /* Always-visible scrollbar on desktop — UX affordance signal. */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.18) transparent;
}

[data-op-theme="dark"] .discover-rail {
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}

/* Persistent scrollbar styling on WebKit. height:8 + opaque thumb makes
   it visible, unlike the macOS auto-hide variant. */
.discover-rail::-webkit-scrollbar { height: 8px; }
.discover-rail::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
}
[data-op-theme="dark"] .discover-rail::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
}
.discover-rail::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.22);
    border-radius: 4px;
    transition: background 0.2s ease;
}
.discover-rail::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.40);
}
[data-op-theme="dark"] .discover-rail::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.22);
}
[data-op-theme="dark"] .discover-rail::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.40);
}

.discover-rail-item {
    flex: 0 0 auto;
    width: 210px;
    scroll-snap-align: start;
}

@media (max-width: 1100px) {
    .discover-rail-item { width: 190px; }
    .discover-rail { gap: 12px; }
}

@media (max-width: 768px) {
    .discover-rail-item { width: 158px; }
    .discover-rail {
        gap: 10px;
        padding-top: 6px;
        padding-bottom: 10px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .discover-rail::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
    .discover-rail-item { width: 148px; }
    .discover-rail { gap: 9px; }
}

/* =================================================================
   7. CARD — 4:5 aspect ratio, full-bleed photo
   ─────────────────────────────────────────────────────────────────
   Premium cards: NO gradient border, NO TRENDING badge.
   Differentiation comes only from the subtle shimmer sweep (desktop).
   Price pill is unified (same dark style for FREE and paid).
   ================================================================= */

.discover-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    background: var(--disc-card-bg);
    box-shadow: var(--disc-card-shadow);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    isolation: isolate;
}

.discover-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--disc-card-shadow-hover);
}

.discover-card:hover .discover-card-image img {
    transform: scale(1.06);
}

.discover-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.discover-card-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.discover-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.discover-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: 16px;
    background: linear-gradient(
        to bottom,
        rgba(11,8,30,0) 0%,
        rgba(11,8,30,0) 40%,
        rgba(11,8,30,0.5) 70%,
        rgba(11,8,30,0.92) 100%
    );
}

/* Top-right column: price pill only (no TRENDING badge anymore) */
.discover-card-top-right {
    position: absolute;
    top: 9px; right: 9px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* Unified price pill — same style for FREE and paid (matches category-page cards) */
.discover-card-price {
    background: rgba(11, 8, 30, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 10px;
    font-family: 'Special Gothic Expanded One', sans-serif;
    font-weight: 400;
    font-size: 9px;
}

/* Bottom info — username + name */
.discover-card-info {
    position: absolute;
    left: 12px; right: 12px; bottom: 11px;
    z-index: 3;
}

.discover-card-username {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    line-height: 1;
    margin-bottom: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.discover-card-username .of-icon {
    width: 13px; height: 13px; min-width: 13px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
}

.discover-card-username span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}

.discover-card-username .fa-circle-check {
    font-size: 7px;
    color: #03aff0;
    flex-shrink: 0;
}

.discover-card-name {
    margin: 0;
    font-family: 'Special Gothic Expanded One', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #ffffff;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Premium card — subtle shimmer sweep only (no border, no badge) */
.discover-card.premium::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 100%
    );
    z-index: 4;
    pointer-events: none;
    border-radius: 16px;
    animation: discoverShimmer 5.5s ease-in-out infinite;
}

@keyframes discoverShimmer {
    0%   { left: -100%; opacity: 0; }
    8%   { opacity: 1; }
    48%  { left: 150%;  opacity: 1; }
    50%  { opacity: 0; }
    100% { left: 150%;  opacity: 0; }
}

/* Mobile card — disable shimmer for perf, no hover lift */
@media (max-width: 768px) {
    .discover-card { border-radius: 12px; transition: none; }
    .discover-card-image,
    .discover-card-overlay { border-radius: 12px; }
    .discover-card.premium::after { display: none; }
    .discover-card:hover { transform: none; box-shadow: var(--disc-card-shadow); }
    .discover-card:hover .discover-card-image img { transform: none; }
    .discover-card-image img { transition: none; }
    .discover-card-name { font-size: 0.9rem; }
    .discover-card-username { font-size: 9px; }
    .discover-card-username .of-icon { width: 12px; height: 12px; min-width: 12px; }
    .discover-card-price { font-size: 8px; padding: 3px 8px; }
    .discover-card-top-right { top: 7px; right: 7px; }
    .discover-card-info { left: 10px; right: 10px; bottom: 9px; }
}

/* =================================================================
   8. LAZY LOAD
   ================================================================= */

.discover-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.discover-lazy.is-loaded {
    opacity: 1;
}

/* If JS fails / no IntersectionObserver, show images anyway */
.no-js .discover-lazy { opacity: 1; }

/* =================================================================
   9. FAQ
   ================================================================= */

.discover-faq {
    max-width: 1100px;
    margin: 30px auto 60px;
    padding: 0 24px;
}

.discover-faq-container {
    background: var(--disc-faq-bg);
    border: 1px solid var(--disc-faq-border);
    border-radius: 22px;
    padding: 44px 38px;
    box-shadow: var(--disc-faq-shadow);
}

[data-op-theme="dark"] .discover-faq-container {
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.discover-faq-title {
    font-family: 'Special Gothic Expanded One', sans-serif;
    font-weight: 400;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    text-align: center;
    margin: 0 0 30px 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--disc-faq-title);
}

[data-op-theme="dark"] .discover-faq-title {
    background: var(--disc-title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.discover-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.discover-faq-item {
    background: var(--disc-faq-bg);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--disc-faq-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

[data-op-theme="dark"] .discover-faq-item {
    background:
        linear-gradient(#1a1a28, #1a1a28) padding-box,
        linear-gradient(90deg, #b3def0, #ceb7f0, #e799e8, #f5c5da) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 3px 16px rgba(0,0,0,0.4);
}

.discover-faq-item:hover {
    box-shadow: var(--disc-faq-shadow-hover);
    transform: translateY(-2px);
}

.discover-faq-question {
    width: 100%;
    padding: 22px 26px;
    border: none;
    background: transparent;
    font-family: 'Special Gothic Expanded One', sans-serif;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--disc-faq-q-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, color 0.3s ease;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.discover-faq-question:hover {
    background: var(--disc-faq-q-hover-bg);
    color: var(--op-accent);
}

.discover-faq-question i {
    transition: transform 0.3s ease;
    color: var(--op-accent);
    font-size: 14px;
    margin-left: 16px;
    flex-shrink: 0;
}

.discover-faq-item.is-active .discover-faq-question i {
    transform: rotate(180deg);
}

.discover-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: var(--disc-faq-answer-bg);
}

.discover-faq-item.is-active .discover-faq-answer {
    max-height: 500px;
    padding: 0 26px 24px;
}

.discover-faq-answer p {
    margin: 0;
    color: var(--disc-faq-answer-color);
    line-height: 1.72;
    font-size: 0.92rem;
    padding-top: 12px;
}

@media (max-width: 768px) {
    .discover-faq { margin: 22px auto 50px; padding: 0 16px; }
    .discover-faq-container { padding: 26px 20px; border-radius: 16px; }
    .discover-faq-title { font-size: 1.2rem; margin-bottom: 22px; }
    .discover-faq-question { padding: 18px 20px; font-size: 0.9rem; }
    .discover-faq-question i { font-size: 13px; margin-left: 12px; }
    .discover-faq-item.is-active .discover-faq-answer { padding: 0 20px 20px; }
    .discover-faq-answer p { font-size: 0.86rem; padding-top: 10px; }
    .discover-faq-accordion { gap: 11px; }
}

@media (max-width: 480px) {
    .discover-faq { padding: 0 14px; margin-bottom: 40px; }
    .discover-faq-container { padding: 20px 16px; border-radius: 12px; }
    .discover-faq-title { font-size: 1.05rem; }
}

/* =================================================================
   10. ACCESSIBILITY
   ================================================================= */

.discover-page *:focus-visible {
    outline: 2px solid var(--op-accent);
    outline-offset: 2px;
    border-radius: 6px;
}

.discover-card-link:focus-visible {
    outline: 3px solid var(--op-accent);
    outline-offset: 3px;
    border-radius: 16px;
}

@media (prefers-reduced-motion: reduce) {
    .discover-card,
    .discover-card-image img,
    .discover-card.premium::after,
    .discover-faq-item,
    .discover-faq-answer,
    .discover-arrow,
    .discover-carousel-viewall,
    .discover-rail {
        animation-duration: 0s !important;
        transition-duration: 0s !important;
    }
}