/* ==========================================================================
   Selection Notes — Responsive overrides
   ========================================================================== */

/* Always — header background needs to beat Astra customizer's inline CSS */
header.sn-header { background: #fff !important; }
body.sn-body .sn-header-inner { padding-left: 20px; padding-right: 20px; }
body.sn-body .sn-container { padding-left: 20px; padding-right: 20px; }

@media (max-width: 1100px) {
    .sn-hero-inner { gap: 30px; }
    .sn-exam-grid { grid-template-columns: repeat(3, 1fr); }
    .sn-stats-card { grid-template-columns: repeat(5, 1fr); padding: 16px; }
    .sn-stat { gap: 8px; }
    .sn-stat strong { font-size: 16px; }
    .sn-footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

@media (max-width: 960px) {
    .sn-menu { display: none; }
    .sn-mobile-toggle { display: inline-flex; }
    .sn-btn.sn-btn-outline,
    .sn-btn.sn-btn-primary { display: none; }
    .sn-header-actions .sn-mobile-toggle { display: inline-flex; }

    .sn-hero { padding: 40px 0 30px; }
    .sn-hero-inner { grid-template-columns: 1fr; }
    .sn-hero-art { order: -1; max-width: 360px; margin: 0 auto; }
    .sn-hero-title { font-size: 2rem; }

    .sn-stats-card { grid-template-columns: repeat(2, 1fr); }
    .sn-stat { border-right: 0; border-bottom: 1px solid var(--sn-border-soft); padding: 10px 8px; }
    .sn-stat:nth-last-child(-n+2) { border-bottom: 0; }

    .sn-exam-grid { grid-template-columns: repeat(2, 1fr); padding: 18px; }
    .sn-why-topper-grid { grid-template-columns: 1fr; }
    .sn-topper-copy { max-width: 100%; }
    .sn-topper-art { display: none; }
    .sn-topper-bottom { grid-template-columns: repeat(2, 1fr); }

    .sn-archive-grid { grid-template-columns: repeat(2, 1fr); }

    .sn-newsletter-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .sn-newsletter-art { display: none; }
    .sn-newsletter-form { flex-direction: column; padding: 8px; }
    .sn-newsletter-form input { min-width: 0; width: 100%; }
    .sn-newsletter-form button { width: 100%; }
    .sn-newsletter-note { position: static; margin-top: 8px; }

    .sn-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
    .sn-footer-brand { grid-column: 1 / -1; }

    .sn-section { padding: 36px 0; }
    .sn-section-header h2 { font-size: 22px; }

    .sn-page-hero { padding: 36px 0; }
    .sn-page-hero h1 { font-size: 28px; }
}

@media (max-width: 600px) {
    /* Announcement bar — compact + wrap-safe */
    .sn-announce { padding: 6px 0; font-size: 12px; }
    .sn-announce-inner {
        gap: 6px;
        flex-wrap: wrap;
        padding-right: 30px;
        padding-left: 12px;
        text-align: left;
    }
    .sn-announce-emoji { font-size: 14px; }
    .sn-announce-text  { flex: 1 1 100%; line-height: 1.3; }
    .sn-announce-cta   { padding: 3px 10px; font-size: 11px; }
    .sn-announce-close { right: 6px; font-size: 18px; }

    /* Header — keep logo readable, kill empty space */
    .sn-header-inner { padding: 10px 14px; gap: 8px; }
    .sn-logo .sn-logo-svg, .sn-logo svg { height: 38px; }
    .sn-logo img.custom-logo { max-height: 38px; }
    .sn-header-actions { gap: 4px; }
    .sn-icon-btn { width: 36px; height: 36px; }
    .sn-icon-btn svg { width: 20px; height: 20px; }
    .sn-cart-count { top: 0; right: 0; }

    /* Hero */
    .sn-hero { padding: 24px 0 20px; }
    .sn-hero-title { font-size: 1.6rem; }
    .sn-hero-sub { font-size: 14px; }
    .sn-hero-features { gap: 10px 16px; }
    .sn-hero-features li { font-size: 12px; }
    .sn-hero-features .sn-feat-icon { width: 22px; height: 22px; }
    .sn-hero-features .sn-feat-icon svg { width: 14px; height: 14px; }

    .sn-hero-search { padding: 4px; }
    .sn-hero-search input { padding: 10px 12px; font-size: 14px; }
    .sn-hero-search .sn-btn { padding: 10px 14px; font-size: 13px; }

    /* Page hero — small + readable */
    .sn-page-hero { padding: 22px 0; }
    .sn-page-hero h1 { font-size: 22px; margin-bottom: 4px; }
    .sn-page-hero p  { font-size: 13px; margin: 0; }

    /* Exam cards: 2 per row on tiny screens */
    .sn-exam-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
    .sn-exam-icon svg { width: 48px; height: 48px; margin-bottom: 8px; }
    .sn-exam-name { font-size: 16px; }
    .sn-exam-desc { font-size: 11px; min-height: 0; }

    /* Stats — single column */
    .sn-stats-card { grid-template-columns: 1fr; padding: 12px; }
    .sn-stat { border-bottom: 1px solid var(--sn-border-soft); padding: 10px 6px; }
    .sn-stat:last-child { border-bottom: 0; }

    .sn-why-card, .sn-topper-card { padding: 20px; }
    .sn-section-header h2 { font-size: 20px; }

    /* Carousels — wider snap target on mobile */
    .sn-product-card { flex: 0 0 78vw; }
    .sn-note-card    { flex: 0 0 78vw; }
    .sn-testimonial  { flex: 0 0 82vw; }
    .sn-carousel-prev,
    .sn-carousel-next { display: none; }

    /* Archive grid — single column, full width */
    .sn-archive-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 20px 0 30px;
    }
    .sn-archive-grid .sn-product-card { flex-basis: auto; width: 100%; }

    /* Product card — full width, cleaner internal layout */
    .sn-product-card .sn-note-body { padding: 14px; gap: 12px; }
    .sn-product-card .sn-note-title { font-size: 16px; }
    .sn-product-card .sn-note-meta {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .sn-product-price { font-size: 18px; }
    .sn-product-price del { font-size: 13px; }

    .sn-product-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
    .sn-product-actions .sn-btn { padding: 11px 6px; font-size: 13px; }

    /* Free / sale badges */
    .sn-free-badge, .sn-sale-badge { top: 8px; right: 8px; font-size: 10px; padding: 3px 8px; }

    /* Filters — stack vertically */
    .sn-archive-filters {
        flex-direction: column;
        padding: 10px;
        gap: 8px;
    }
    .sn-archive-filters input[type="search"],
    .sn-archive-filters select,
    .sn-archive-filters button {
        width: 100%;
        min-width: 0;
    }

    /* Pagination */
    .sn-pagination a,
    .sn-pagination span,
    .navigation.pagination a,
    .navigation.pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }

    /* Newsletter band — tighter spacing on phone */
    .sn-newsletter { margin: 30px 0 0; padding: 0 14px; }
    .sn-newsletter-inner { padding: 18px 16px; }
    .sn-newsletter-copy h3 { font-size: 18px; }

    /* Footer */
    .sn-footer { padding: 32px 0 0; }
    .sn-footer-inner { grid-template-columns: 1fr; gap: 22px; padding-bottom: 24px; }
    .sn-footer-bottom-inner { flex-direction: column; gap: 6px; text-align: center; font-size: 11px; }
    .sn-footer-logo svg { height: 44px; }

    /* Back to top */
    .sn-back-to-top { right: 14px; bottom: 14px; width: 38px; height: 38px; }

    /* Empty state */
    .sn-empty-state { padding: 40px 20px; margin: 24px auto; }
    .sn-empty-icon svg { width: 48px; }
    .sn-empty-state h3 { font-size: 18px; }
}

@media (max-width: 380px) {
    .sn-exam-grid { grid-template-columns: 1fr; }
    .sn-hero-title { font-size: 1.5rem; }
    .sn-page-hero h1 { font-size: 20px; }
}
