/* ==========================================================
   RESPONSIVE DESIGN SYSTEM
   ========================================================== */

/* ── TABLET & LAPTOP REFINEMENTS (1024px to 1279.98px) ── */
@media (max-width: 1279.98px) and (min-width: 1024px) {
    .hdr-nav-container {
        gap: 14px !important;
    }
    .hdr-nav-link {
        font-size: 13px !important;
        padding: 5px 6px !important;
    }
    .hdr-pricing-link {
        padding: 0 10px !important;
        font-size: 12px !important;
    }
    .topbar-inner {
        gap: 10px !important;
    }
}

/* Keep laptop/tablet search clear of Search button without over-padding hidden ⌘K shortcut */
@media (max-width: 1359.98px) and (min-width: 768px) {
    .search-input {
        padding: 0 94px 0 38px !important;
    }

    .search-clear-btn {
        right: 88px !important;
    }
}

/* Tighten cleanly at 1024px-1359px so bilingual nav + credit pill + search breathe with zero overflow */
@media (max-width: 1359.98px) and (min-width: 1024px) {
    .hdr-nav-container {
        gap: 10px !important;
    }

    .hdr-nav-link {
        font-size: 12px !important;
        padding: 4px 5px !important;
    }

    .topbar-inner {
        padding: 0 12px !important;
        gap: 8px !important;
    }

    .search-box.search-box-center {
        min-width: 150px !important;
    }

    .hdr-pricing-link {
        padding: 0 9px !important;
        font-size: 11.5px !important;
    }

    .hdr-credit-badge {
        padding: 0 8px !important;
        gap: 6px !important;
    }
}

/* ── DESKTOP VIEW (1024px and wider: single-row header) ── */
@media (min-width: 1024px) {
    .mobile-logo-menu-bar {
        display: none !important;
    }

    .hdr-left-zone,
    .header-actions-right {
        display: flex !important;
    }

    .topbar-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
}

/* ── MOBILE & TABLET VIEW (Under 1024px: 2-row header) ── */
@media (max-width: 1023.98px) {
    .section {
        padding: 0px 10px !important;
    }

    .header {
        padding: 6px 4px 10px 4px !important;
    }

    .filters {
        display: none !important;
    }

    footer {
        padding: 0px 5px !important;
    }

    .content {
        margin-left: 0px !important;
    }

    .topbar-filters {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .topbar-filters::-webkit-scrollbar {
        display: none;
    }

    /* Row 1: Mobile Logo & Quick Controls Bar */
    .mobile-logo-menu-bar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 14px 6px 14px !important;
        width: 100% !important;
    }

    /* Completely hide desktop header zones on mobile/tablet to eliminate duplicate logos & jammed nav */
    .hdr-left-zone,
    .header-brand-logo,
    .hdr-nav-row,
    .header-actions-right,
    .header-desktop-only,
    .pricing,
    .sign-in,
    .logo {
        display: none !important;
    }

    /* Row 2: Search Bar takes 100% full width */
    .topbar-inner {
        padding: 4px 12px 8px 12px !important;
        height: auto !important;
        gap: 0px !important;
        width: 100% !important;
        display: flex !important;
        box-sizing: border-box !important;
    }

    .search-box,
    .search-box-center,
    .search-form,
    .search-wrap,
    .search-inner-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .search-input {
        width: 100% !important;
    }
}

/* ── SMALL MOBILE PHONES (Under 768px) ── */
@media (max-width: 767.98px) {
    .topbar-inner {
        padding: 4px 8px 8px 8px !important;
        gap: 0px !important;
    }

    .search-form {
        padding: 0px;
        width: 100% !important;
    }

    .topbar-filters {
        margin: 5px !important;
        padding: 0px !important;
    }

    .search-text {
        display: none;
    }

    .search-button {
        padding: 0px !important;
        width: 32px !important;
        height: 32px !important;
        justify-content: center;
        border-radius: 9999px !important;
    }

    .search-input {
        padding: 0 46px 0 34px !important;
        height: 36px !important;
        font-size: 12.5px !important;
    }

    .search-clear-btn {
        right: 44px !important;
    }

    .masonry .card {
        width: 50% !important;
    }

    .mobile-logo-menu-bar {
        padding: 8px 10px 4px 10px !important;
    }

    .coin {
        font-size: 20px !important;
    }
}
