/* =================================================================
   MOBILE ENHANCEMENTS - Raitly.com
   All mobile-specific UI improvements in one place
   ================================================================= */

/* ========== 1. LOGO & HEADER (Mobile) ========== */
@media (max-width: 768px) {
    .logo-text {
        font-size: 22px !important;
        letter-spacing: -0.5px !important;
    }

    .logo-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
        padding-left: 16px !important;
        padding-right: 12px !important;
    }
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--text-muted, #94A3B8);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
    margin-top: -2px;
    line-height: 1;
}

html.dark .logo-tagline {
    color: #64748B;
}

/* ========== 2. HERO SECTION (Mobile) ========== */
@media (max-width: 768px) {
    .hero-section-new {
        padding: 2.5rem 1rem 2rem !important;
        min-height: auto !important;
        border-radius: 16px !important;
        margin-top: 0.5rem !important;
    }

    .hero-title {
        font-size: 28px !important;
        line-height: 1.15 !important;
        margin-bottom: 0.75rem !important;
        letter-spacing: -0.01em !important;
    }

    .hero-subtitle {
        font-size: 1.05rem !important;
        color: #e2e8f0 !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.5 !important;
    }

    .hero-subtitle .stat-highlight {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        color: #fbbf24 !important;
    }
}

/* ========== 3. SEARCH BOX (Mobile) ========== */
@media (max-width: 768px) {
    .hero-search-wrapper {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .hero-search {
        width: 100% !important;
        padding: 0.7rem 1rem !important;
    }

    /* Hide keyboard shortcut "K" on mobile */
    .hero-search .search-shortcut,
    .hero-search-trigger .search-shortcut {
        display: none !important;
    }

    /* Compact search button with icon */
    .search-btn {
        width: 100% !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        border-radius: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .hero-search-placeholder {
        font-size: 0.9rem !important;
    }

    /* Also hide K on header search trigger */
    .search-container .search-shortcut {
        display: none !important;
    }
}

/* ========== 4. CATEGORY CHIPS (Mobile) ========== */
@media (max-width: 768px) {
    .category-chips {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-bottom: 1.5rem !important;
        overflow-x: visible !important;
    }

    .category-chips .chip {
        padding: 0.65rem 1.2rem !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        border-radius: 50px !important;
        white-space: nowrap !important;
    }
}

/* Chip color variants */
.chip-video {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fecaca !important;
}

.chip-video:hover {
    background: rgba(239, 68, 68, 0.35) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
}

.chip-image {
    background: rgba(139, 92, 246, 0.2) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #ddd6fe !important;
}

.chip-image:hover {
    background: rgba(139, 92, 246, 0.35) !important;
    border-color: rgba(139, 92, 246, 0.6) !important;
}

.chip-audio {
    background: rgba(20, 184, 166, 0.2) !important;
    border-color: rgba(20, 184, 166, 0.4) !important;
    color: #99f6e4 !important;
}

.chip-audio:hover {
    background: rgba(20, 184, 166, 0.35) !important;
    border-color: rgba(20, 184, 166, 0.6) !important;
}

/* ========== 5. AS SEEN ON (Mobile) - HIDDEN ========== */
@media (max-width: 768px) {
    .seen-on-section {
        display: none !important;
    }
}

/* ========== 6. SPOTLIGHT TEXT ========== */
.hero-spotlight {
    color: #cbd5e1 !important;
}

.spotlight-box {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero-spotlight {
        font-size: 0.85rem !important;
    }
}

/* ========== 7. TOOL CARDS IMPROVEMENTS ========== */

/* Pricing badge colors */
.tool-card-minimal .meta-item.pricing.free,
.pricing-badge-free {
    background: rgba(22, 163, 74, 0.12) !important;
    color: #16a34a !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

.tool-card-minimal .meta-item.pricing.freemium,
.pricing-badge-freemium {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #3b82f6 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

.tool-card-minimal .meta-item.pricing.paid,
.pricing-badge-paid {
    background: rgba(217, 119, 6, 0.12) !important;
    color: #d97706 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

html.dark .tool-card-minimal .meta-item.pricing.free {
    color: #4ade80 !important;
    background: rgba(74, 222, 128, 0.15) !important;
}

html.dark .tool-card-minimal .meta-item.pricing.freemium {
    color: #60a5fa !important;
    background: rgba(96, 165, 250, 0.15) !important;
}

html.dark .tool-card-minimal .meta-item.pricing.paid {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.15) !important;
}

/* Mobile card enhancements */
@media (max-width: 768px) {
    .tool-card-minimal {
        height: auto !important;
        margin-bottom: 20px !important;
    }

    .tool-card-minimal .card-content {
        padding: 14px !important;
    }

    /* Smaller tool card image on mobile so it shows fully */
    .tool-card .tool-image-wrapper {
        min-height: 150px !important;
        height: 150px !important;
        max-height: 150px !important;
    }

    .tool-card .tool-image,
    .tool-card .tool-image-wrapper img {
        object-fit: cover !important;
    }

    /* More spacing between cards */
    .tool-card {
        margin-bottom: 24px !important;
    }

    /* Larger mobile rating */
    .tool-card-minimal .mobile-rating {
        font-size: 0.85rem !important;
        padding: 5px 10px !important;
        border-radius: 8px !important;
    }

    .tool-card-minimal .mobile-rating .text-warning {
        font-size: 0.8rem !important;
    }

    .tool-card-minimal .mobile-rating .rating-count {
        font-size: 0.75rem !important;
    }

    /* Hover actions always visible on mobile */
    .tool-card-minimal .hover-actions {
        opacity: 1 !important;
        transform: none !important;
    }

    .tool-card-minimal .action-btn {
        width: 30px !important;
        height: 30px !important;
    }

    .tool-card-minimal .action-btn.qv-btn {
        display: none !important;
    }
}

/* ========== 9. BOTTOM NAVIGATION ========== */
@media (max-width: 576px) {
    .mobile-bottom-nav {
        height: 64px !important;
    }

    .bottom-nav-item {
        font-size: 11px !important;
        gap: 4px !important;
        position: relative !important;
    }

    .bottom-nav-item i {
        font-size: 24px !important;
    }

    /* More prominent active state */
    .bottom-nav-item.active {
        color: #8b5cf6 !important;
        font-weight: 700 !important;
    }

    .bottom-nav-item.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 3px;
        background: linear-gradient(135deg, #8b5cf6, #06b6d4);
        border-radius: 0 0 4px 4px;
    }

    html.dark .bottom-nav-item.active {
        color: #a78bfa !important;
    }

    html.dark .bottom-nav-item.active::after {
        background: linear-gradient(135deg, #a78bfa, #2dd4bf);
    }

    /* Tap animation */
    .bottom-nav-item:active {
        transform: scale(0.9) !important;
        transition: transform 0.1s ease !important;
    }

    .bottom-nav-item i {
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }

    .bottom-nav-item.active i {
        transform: scale(1.15) !important;
    }
}

/* ========== 11. SPACING & MARGINS ========== */
@media (max-width: 768px) {
    .tools-grid {
        gap: 0 !important;
        padding: 0 8px !important;
    }

    .section-block {
        margin-bottom: 2.5rem !important;
    }

    .section-header {
        margin-bottom: 1.25rem !important;
        padding: 0 0.25rem !important;
    }

    /* Consistent section dividers */
    .section-block+.section-block {
        padding-top: 0.5rem !important;
        border-top: 1px solid var(--border-color, #e5e7eb) !important;
    }

    html.dark .section-block+.section-block {
        border-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Curated collections */
    .collections-grid {
        gap: 0.75rem !important;
    }

    .collection-card-v2 {
        padding: 1rem !important;
    }
}

/* ========== 12. CONTRAST IMPROVEMENTS ========== */
.tool-card-minimal .meta-info {
    color: #4b5563 !important;
}

html.dark .tool-card-minimal .meta-info {
    color: #9ca3af !important;
}

.tool-card-minimal .meta-separator {
    color: #9ca3af !important;
}

/* ========== 13. UNIFIED TYPOGRAPHY SCALE (Mobile) ========== */
@media (max-width: 768px) {

    /* Unified heading scale */
    h1,
    .h1 {
        font-size: 32px !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
    }

    h2,
    .h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        font-weight: 700 !important;
    }

    h3,
    .h3 {
        font-size: 18px !important;
        line-height: 1.4 !important;
        font-weight: 600 !important;
    }

    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    .text-sm {
        font-size: 14px !important;
    }

    .text-xs {
        font-size: 12px !important;
    }

    .section-title {
        font-size: 1.25rem !important;
        font-weight: 800 !important;
    }

    .section-badge {
        font-size: 0.7rem !important;
    }

    .widget-title {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
    }

    /* Tool card title on mobile */
    .tool-card .tool-name {
        font-size: 1rem !important;
        font-weight: 700 !important;
    }

    /* Tool card description on mobile */
    .tool-card .tool-description {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
}

/* ========== 14. TRY NOW BUTTON ========== */
.tool-card-minimal .btn-visit {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
}

.tool-card-minimal .btn-visit:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35) !important;
}

html.dark .tool-card-minimal .btn-visit {
    background: linear-gradient(135deg, #10b981, #14b8a6) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

html.dark .tool-card-minimal .btn-visit:hover {
    background: linear-gradient(135deg, #059669, #0d9488) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
}

@media (max-width: 768px) {
    .tool-card-minimal .btn-visit {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
        height: 30px !important;
    }

    .tool-card-minimal .btn-details {
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
        height: 30px !important;
    }
}

/* ========== 15. LOADING STATES ========== */

/* Skeleton loader for cards */
.skeleton-card {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    overflow: hidden;
    height: 380px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .skeleton-card {
        height: 180px;
        flex-direction: row;
    }

    .skeleton-image {
        width: 120px !important;
        height: 100% !important;
        order: 2;
    }

    .skeleton-content {
        flex: 1;
        order: 1;
    }
}

.skeleton-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

.skeleton-line.full {
    width: 100%;
}

html.dark .skeleton-image,
html.dark .skeleton-line {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

html.dark .skeleton-card {
    background: #1f2937;
    border-color: #374151;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Infinite scroll loading indicator */
.scroll-loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.75rem;
    color: var(--text-muted, #94a3b8);
    font-size: 0.9rem;
}

.scroll-loading-dots {
    display: flex;
    gap: 4px;
}

.scroll-loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary, #8b5cf6);
    animation: dot-bounce 1.2s ease-in-out infinite;
}

.scroll-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========== 16. ANIMATIONS ========== */

/* Fade in on scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button micro-animation */
.btn-visit:active,
.btn-details:active,
.chip:active,
.cta-featured:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

/* Card entrance animation */
@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card-minimal.animate-in {
    animation: card-enter 0.4s ease forwards;
}

/* ========== 17. EMPTY STATES ========== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary, #6b7280);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.empty-state .btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--color-primary, #8b5cf6);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.empty-state .btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.3);
}

/* ========== 18. ERROR STATES ========== */
.error-state {
    text-align: center;
    padding: 3rem 1.5rem;
    grid-column: 1 / -1;
}

.error-state i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.7;
}

.error-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.5rem;
}

.error-state p {
    color: var(--text-secondary, #6b7280);
    margin-bottom: 1.25rem;
}

.error-state .btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.error-state .btn-retry:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ========== 19. CTA & SUBMIT ========== */
.hero-cta-submit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.hero-cta-value {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ========== 20. SOCIAL PROOF ========== */
.social-proof-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.proof-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    color: #e2e8f0;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.proof-badge i {
    color: #fbbf24;
}

.proof-badge .proof-count {
    color: #fbbf24;
    font-weight: 700;
}

@media (max-width: 768px) {
    .social-proof-bar {
        gap: 0.75rem;
    }

    .proof-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }
}

/* ========== 21. FEATURED BADGE ========== */
.tool-card-minimal .primary-badge.badge-featured {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: #78350f !important;
    border-left: none !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.tool-card-minimal .primary-badge.badge-featured::before {
    content: '⭐ ';
}

html.dark .tool-card-minimal .primary-badge.badge-featured {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.5) !important;
}

/* ========== 23. DARK MODE TOGGLE ========== */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-glass, rgba(0, 0, 0, 0.1));
    background: var(--bg-glass, rgba(255, 255, 255, 0.7));
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    background: var(--color-primary, #8b5cf6);
    color: #fff;
    border-color: var(--color-primary, #8b5cf6);
    transform: rotate(20deg);
}

html.dark .dark-mode-toggle {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fbbf24;
}

html.dark .dark-mode-toggle:hover {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* Dark mode toggle icon swap */
html.light .dark-mode-toggle .icon-light {
    display: none;
}

html.light .dark-mode-toggle .icon-dark {
    display: inline;
}

html.dark .dark-mode-toggle .icon-light {
    display: inline;
}

html.dark .dark-mode-toggle .icon-dark {
    display: none;
}

/* ========== 24. ONBOARDING TOOLTIPS ========== */
.onboarding-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10001;
    max-width: 250px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    animation: tooltip-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1.4;
}

.onboarding-tooltip::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #7c3aed;
    transform: rotate(45deg);
}

.onboarding-tooltip.arrow-bottom::after {
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
}

.onboarding-tooltip.arrow-top::after {
    top: -6px;
    left: 50%;
    margin-left: -6px;
}

.onboarding-tooltip .tooltip-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 0.9rem;
    min-height: auto;
}

.onboarding-tooltip .tooltip-close:hover {
    color: #fff;
}

@keyframes tooltip-pop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(5px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

/* ========== SEARCH MODAL ENHANCEMENTS ========== */

/* Suggested searches section */
.search-modal-suggestions {
    margin-top: 1.5rem;
}

.suggestions-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: #6d28d9;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.suggestion-chip:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

.suggestion-chip i {
    font-size: 0.75rem;
}

html.dark .suggestion-chip {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.25);
    color: #a78bfa;
}

html.dark .suggestion-chip:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.4);
}

html.dark .suggestions-title {
    color: #64748b;
}

/* Category quick filters in search modal */
.search-categories {
    margin-top: 1.25rem;
}

.search-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: var(--bg-tertiary, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary, #475569);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.search-cat-chip:hover {
    background: var(--color-primary, #8b5cf6);
    color: #fff;
    border-color: var(--color-primary, #8b5cf6);
}

html.dark .search-cat-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

html.dark .search-cat-chip:hover {
    background: var(--color-primary, #a78bfa);
    color: #fff;
}

/* ========== TOOL DETAILS MOBILE ========== */
@media (max-width: 768px) {
    .tool-details-page {
        padding-top: 100px !important;
    }

    .tool-hero {
        padding: 1.5rem 0 !important;
    }

    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .tool-header {
        gap: 0.75rem !important;
    }

    .tool-logo {
        width: 60px !important;
        height: 60px !important;
        border-radius: 14px !important;
    }

    .tool-title-block h1 {
        font-size: 1.5rem !important;
    }

    .tool-tagline {
        font-size: 0.95rem !important;
    }

    .meta-tags {
        gap: 0.5rem !important;
    }

    .meta-tag {
        font-size: 0.8rem !important;
    }

    .action-buttons {
        flex-direction: row !important;
        gap: 0.75rem !important;
    }

    .btn-visit-site {
        flex: 1 !important;
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
        justify-content: center !important;
    }

    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .content-card {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }

    .specs-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .feature-badge {
        font-size: 0.8rem !important;
        padding: 0.6rem !important;
    }

    .pros-cons-section {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .hero-media-card {
        border-radius: 14px !important;
    }

    /* Sidebar on mobile */
    .sidebar-column {
        order: 10;
    }

    .sidebar-card {
        border-radius: 12px !important;
        padding: 1.25rem !important;
    }

    .pulse-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .related-tool-item {
        padding: 0.75rem 0 !important;
    }

    /* Fix mobile sticky bar conflict with bottom nav */
    .mobile-sticky-actions {
        bottom: 64px !important;
    }
}

/* ========== BADGE IMPROVEMENTS (Mobile) ========== */
@media (max-width: 768px) {

    /* Verified badge - make it larger and more visible */
    .tool-card .verified-check,
    .tool-card .verified-badge,
    .tool-name .verified-check {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
    }

    .tool-card .verified-check svg,
    .tool-name .verified-check svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* Featured crown badge - larger and more prominent */
    .featured-crown-badge {
        width: 36px !important;
        height: 36px !important;
        top: 8px !important;
        left: 8px !important;
        z-index: 35 !important;
        filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.6)) !important;
    }

    .featured-crown-badge img {
        width: 100% !important;
        height: 100% !important;
    }

    /* Free badge */
    .tool-card .badge.free {
        font-size: 0.7rem !important;
        padding: 3px 10px !important;
        font-weight: 700 !important;
        border-radius: 6px !important;
    }

    /* Tool badges container */
    .tool-card .tool-badges {
        gap: 4px !important;
    }

    /* Rating badge in cards - more visible */
    .tool-card [style*="rgba(251, 191, 36, 0.15)"] {
        padding: 4px 10px !important;
        border-radius: 8px !important;
    }

    .tool-card [style*="rgba(251, 191, 36, 0.15)"] span {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
    }
}

/* ========== FEATURED BADGE - PROMINENT GOLDEN STYLE ========== */
.featured-crown-badge {
    position: absolute;
    z-index: 35;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
    transition: transform 0.2s ease;
}

.tool-card:hover .featured-crown-badge {
    transform: scale(1.1);
}

/* Top Rated badge - distinct styling */
.badge-top-rated,
.badge.top-rated {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3) !important;
}

html.dark .badge-top-rated,
html.dark .badge.top-rated {
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4) !important;
}

/* ========== DESKTOP BOOKMARK/HEART BUTTON FIX ========== */
/* The bookmark button has white heart icon + dark overlay background.
   On light backgrounds this looks invisible. Fix: use a visible background. */
.tool-card .bookmark-btn {
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease !important;
}

/* Show on hover */
.tool-card:hover .bookmark-btn {
    opacity: 1;
}

/* Always visible on mobile */
@media (max-width: 768px) {
    .tool-card .bookmark-btn {
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        width: 36px !important;
        height: 36px !important;
    }

    .tool-card .bookmark-btn i {
        font-size: 16px !important;
    }
}

/* Heart icon color - ensure visibility */
.tool-card .bookmark-btn i {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Hover effect */
.tool-card .bookmark-btn:hover {
    background: rgba(239, 68, 68, 0.85) !important;
    transform: scale(1.1) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Active/bookmarked state */
.tool-card .bookmark-btn.active i,
.tool-card .bookmark-btn.bookmarked i {
    color: #ef4444 !important;
}

.tool-card .bookmark-btn.active,
.tool-card .bookmark-btn.bookmarked {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    opacity: 1;
}