/* =========================================================
   Vin Socialhub — Mobile Responsiveness
   Loaded last so it overrides desktop-only rules below 900px
   ========================================================= */

/* ---------- Hamburger + mobile-only elements ---------- */
.hamburger,
.mobile-search-btn,
.mobile-drawer,
.mobile-backdrop,
.mobile-search-bar {
    display: none;
}

/* =========================================================
   TABLET AND BELOW
   ========================================================= */
@media (max-width: 900px) {

    /* ---------- Header ---------- */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 900;
    }
    .header-inner {
        height: 62px;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    /* Show hamburger + mobile search */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        cursor: pointer;
        padding: 8px;
        border-radius: 10px;
        transition: background 0.2s;
        flex-shrink: 0;
    }
    .hamburger:active { background: var(--bg); }
    .hamburger span {
        display: block;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }
    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .mobile-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        border: none;
        background: transparent;
        color: var(--text);
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
        margin-left: auto;
    }
    .mobile-search-btn:active { background: var(--bg); }

    /* Hide desktop nav + search + user menu */
    .main-nav,
    .header-search {
        display: none !important;
    }
    .header-actions {
        display: none !important;
    }
    .logo img { height: 32px; }
    .logo-text {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 130px;
    }

    /* Mobile search bar */
    .mobile-search-bar {
        display: block;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 0.75rem 1rem;
        animation: slideDown 0.25s ease;
    }
    .mobile-search-bar[hidden] { display: none !important; }
    .mobile-search-bar form {
        display: flex;
        gap: 0.5rem;
    }
    .mobile-search-bar input {
        flex: 1;
        padding: 0.7rem 0.9rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg);
        color: var(--text);
        font-size: 0.95rem;
        font-family: inherit;
    }
    .mobile-search-bar input:focus { outline: none; border-color: var(--primary); }
    .mobile-search-bar button {
        padding: 0.7rem 1.1rem;
        background: var(--grad-primary);
        color: #fff;
        border: none;
        border-radius: 10px;
        font-weight: 700;
        font-size: 0.88rem;
        cursor: pointer;
        font-family: inherit;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* ---------- Mobile drawer ---------- */
    .mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,0.55);
        backdrop-filter: blur(2px);
        z-index: 950;
        animation: fadeIn 0.25s ease;
    }
    .mobile-backdrop[hidden] { display: none; }

    .mobile-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: min(88vw, 340px);
        height: 100vh;
        height: 100dvh;
        background: var(--surface);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        overflow-y: auto;
        box-shadow: 4px 0 32px -8px rgba(0,0,0,0.3);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mobile-drawer.open { transform: translateX(0); }

    .mobile-drawer-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.1rem 1.25rem;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        background: var(--surface);
        z-index: 1;
    }
    .mobile-drawer-head .logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
        color: var(--text);
        font-weight: 800;
        font-size: 1rem;
    }
    .mobile-drawer-close {
        width: 36px; height: 36px;
        border: none;
        background: var(--bg);
        border-radius: 10px;
        font-size: 1.5rem;
        line-height: 1;
        color: var(--text);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: inherit;
    }

    .mobile-user-card {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        padding: 1.25rem;
        background: var(--grad-soft);
        margin: 1rem 1.25rem;
        border-radius: 14px;
    }
    .mobile-user-card strong {
        display: block;
        font-size: 0.92rem;
        color: var(--text);
        margin-bottom: 0.15rem;
    }
    .mobile-user-card span {
        display: block;
        font-size: 0.75rem;
        color: var(--text-muted);
        word-break: break-all;
    }

    .mobile-auth-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 1rem 1.25rem;
    }
    .mobile-auth-row .btn {
        padding: 0.7rem 0.5rem;
        font-size: 0.85rem;
    }

    .mobile-drawer-nav {
        padding: 0.5rem 0.75rem 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    .mobile-drawer-nav a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.85rem 0.9rem;
        border-radius: 12px;
        color: var(--text);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 600;
        transition: background 0.2s, color 0.2s;
    }
    .mobile-drawer-nav a:active,
    .mobile-drawer-nav a:hover {
        background: var(--bg);
        color: var(--primary);
    }
    .mobile-drawer-nav a.logout {
        color: #dc2626;
    }
    .mobile-drawer-nav a.logout:hover {
        background: rgba(239,68,68,0.08);
        color: #b91c1c;
    }

    .mobile-drawer-divider {
        height: 1px;
        background: var(--border);
        margin: 0.85rem 0.9rem;
    }

    .mobile-drawer-foot {
        margin-top: auto;
        padding: 1rem 1.25rem 1.5rem;
        border-top: 1px solid var(--border);
    }
    .mobile-theme-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 12px;
        cursor: pointer;
        font-family: inherit;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    [data-theme="light"] .mobile-theme-btn .sun { display: none; }
    [data-theme="dark"]  .mobile-theme-btn .moon { display: none; }

    /* ---------- Containers and section padding ---------- */
    .container { padding: 0 1rem; }
    .section { padding: 3.5rem 1rem; }
    .section-tight { padding: 2.5rem 1rem; }
    .section-head { margin-bottom: 2.25rem; }
    .section-head h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
    .section-head p { font-size: 0.95rem; }

    .page-hero { padding: 2.5rem 1rem 2rem; }
    .page-hero h1 { font-size: clamp(1.6rem, 6vw, 2rem); }
    .page-hero p { font-size: 0.95rem; }

    /* ---------- Hero (homepage) ---------- */
    .hero { padding: 2.5rem 1rem 3rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-copy h1 { font-size: clamp(1.85rem, 7vw, 2.5rem); line-height: 1.1; }
    .hero-copy > p { font-size: 0.98rem; margin-bottom: 1.5rem; }
    .hero-actions { flex-direction: column; gap: 0.6rem; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-meta {
        gap: 0.75rem 1.25rem;
        font-size: 0.82rem;
    }
    .hero-ticker {
        font-size: 0.74rem;
        max-width: 100%;
        padding: 0.5rem 0.75rem 0.5rem 0.55rem;
    }
    .hero-ticker .msg { max-width: 220px; }
    .hero-orb-1, .hero-orb-2 { opacity: 0.3; }

    .hero-visual { max-width: 100%; }
    .hero-card { transform: none; }
    .hero-float-1, .hero-float-2 { display: none; }

    /* ---------- Logo marquee ---------- */
    .logo-strip { padding: 1.25rem 0; }
    .logo-strip .lead-label {
        position: static;
        display: block;
        text-align: center;
        padding: 0 0 0.75rem;
        background: none;
        font-size: 0.68rem;
    }
    .logo-marquee { gap: 2rem; }
    .logo-marquee .logo-item { font-size: 1rem; }

    /* ---------- Stats band ---------- */
    .stats-band { padding: 3rem 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .stat-block {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 1.1rem 0.5rem;
    }
    .stat-block:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.1); }
    .stat-block:nth-last-child(-n+2) { border-bottom: none; }
    .stat-block .num { font-size: 1.75rem; }
    .stat-block .lbl { font-size: 0.76rem; }

    /* ---------- Bento features ---------- */
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.span-2 { grid-column: span 1; }
    .bento-card { padding: 1.5rem; }

    /* ---------- How it works ---------- */
    .how-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .step-card { padding: 1rem 0.5rem; }
    .step-num { width: 48px; height: 48px; font-size: 1.15rem; }

    /* ---------- Categories ---------- */
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
    .category-tile { padding: 1.15rem; }
    .category-tile h3 { font-size: 0.9rem; }
    .category-tile span { font-size: 0.75rem; }
    .cat-icon { width: 42px; height: 42px; font-size: 1.2rem; margin-bottom: 0.85rem; }

    /* ---------- Product grid ---------- */
    .product-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
}
    .product-card-body { padding: 0.85rem; }
    .product-card-title { font-size: 0.92rem; }
    .product-card-desc { display: none; }
    .product-card-footer { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .product-card-footer .btn { width: 100%; }
    .product-card-price .amount { font-size: 1rem; }

    /* ---------- Testimonials ---------- */
    .testimonial-grid { grid-template-columns: 1fr; gap: 1rem; }
    .testimonial-v2 { padding: 1.35rem; }

    /* ---------- FAQ ---------- */
    .faq-grid-v2 { grid-template-columns: 1fr; }
    .faq-item summary { padding: 1rem 1.15rem; font-size: 0.92rem; }
    .faq-item p { padding: 0 1.15rem 1rem; font-size: 0.88rem; }

    /* ---------- Newsletter ---------- */
    .newsletter { padding: 2rem 1.25rem; border-radius: 20px; margin: 0 1rem; }
    .newsletter h2 { font-size: 1.4rem; }
    .newsletter p { font-size: 0.9rem; }
    .newsletter-form { flex-direction: column; gap: 0.6rem; }
    .newsletter-form input,
    .newsletter-form button { width: 100%; padding: 0.85rem; }

    /* ---------- Members-only gate ---------- */
    .members-gate { padding: 2.5rem 1.25rem; margin: 0 1rem; }
    .members-gate-icon { width: 72px; height: 72px; }
    .members-gate h2 { font-size: 1.4rem; }
    .members-gate-actions { flex-direction: column; width: 100%; }
    .members-gate-actions .btn { width: 100%; }
    .members-gate-perks { flex-direction: column; gap: 0.6rem; align-items: center; }

    /* ---------- Footer ---------- */
    .site-footer { padding: 2.5rem 1rem 1.5rem; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem 1.25rem;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand p { max-width: 100%; }
    .footer-col h4 { font-size: 0.78rem; margin-bottom: 0.85rem; }
    .footer-col a { font-size: 0.85rem; }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding-top: 1.25rem;
    }

    /* ---------- Shop page ---------- */
    .shop-wrap { padding: 1rem 1rem 3rem; }
    .shop-layout { grid-template-columns: 1fr; gap: 1.25rem; }
    .shop-sidebar {
        display: none;
        position: static;
        padding: 1.15rem;
    }
    .shop-sidebar.open { display: block; }
    .filter-toggle {
        display: inline-flex !important;
        margin-bottom: 0.85rem;
    }
    .shop-toolbar {
        padding: 0.75rem 1rem;
        gap: 0.6rem;
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }
    .shop-toolbar > div { flex-wrap: wrap; width: 100%; }
    .sort-form { width: 100%; flex-wrap: wrap; }
    .sort-form select { flex: 1; }
    .view-toggle { display: none; }

    /* ---------- Product detail ---------- */
    .pd-wrap { padding: 0.5rem 1rem 3rem; }
    .pd-layout { grid-template-columns: 1fr; gap: 1.75rem; }
    .pd-sticky { position: static; }
    .pd-title { font-size: 1.4rem; }
    .pd-price { font-size: 1.75rem; }
    .pd-features { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .pd-feat { font-size: 0.82rem; }
    .pd-actions { grid-template-columns: 1fr auto; }
    .pd-trust { grid-template-columns: 1fr; gap: 0.6rem; padding: 0.9rem; }
    .pd-trust-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.5rem;
    }
    .pd-tabs { border-radius: 16px; margin-bottom: 2rem; }
    .pd-tab-nav {
        flex-direction: column;
        overflow: visible;
    }
    .pd-tab-btn {
        text-align: left;
        padding: 0.9rem 1.15rem;
        border-bottom: 1px solid var(--border);
        border-left: 3px solid transparent;
        font-size: 0.9rem;
    }
    .pd-tab-btn.active {
        border-bottom-color: var(--border);
        border-left-color: var(--primary);
    }
    .pd-tab-panel { padding: 1.25rem; }
    .pd-spec-table th, .pd-spec-table td { padding: 0.65rem 0.85rem; font-size: 0.85rem; }
    .pd-spec-table th { width: 45%; }
    .pd-review-head { flex-wrap: wrap; }
    .pd-related .product-grid { grid-template-columns: repeat(2, 1fr); }

    /* ---------- Checkout ---------- */
    .checkout-wrap { padding: 1rem 1rem 3rem; }
    .checkout-layout { grid-template-columns: 1fr; gap: 1.25rem; }
    .checkout-side { position: static; }
    .checkout-card { padding: 1.25rem; }
    .checkout-product { grid-template-columns: 80px 1fr; gap: 0.85rem; }
    .checkout-product-info h2 { font-size: 1.05rem; }
    .checkout-desc { font-size: 0.82rem; }
    .checkout-actions-split { grid-template-columns: 1fr; }
    .checkout-row-total { font-size: 1rem; }
    .success-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.35rem;
    }

    /* ---------- Account layout ---------- */
    .account-layout {
        grid-template-columns: 1fr;
        padding: 1rem 1rem 3rem;
        gap: 1.25rem;
    }
    .account-sidebar {
        position: static;
        padding: 1rem;
    }
    .account-user {
        padding-bottom: 1rem;
        margin-bottom: 0.85rem;
    }
    .account-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.35rem;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }
    .account-nav::-webkit-scrollbar { display: none; }
    .account-nav a {
        flex-shrink: 0;
        padding: 0.55rem 0.9rem;
        white-space: nowrap;
        font-size: 0.85rem;
    }
    .account-nav a svg { width: 16px; height: 16px; }
    .account-nav a span { display: inline; }
    .account-nav .logout-link {
        margin-top: 0;
        padding-top: 0.55rem;
        border-top: none;
        border-left: 1px solid var(--border);
        padding-left: 0.9rem;
        border-radius: 12px;
    }
    .account-page-title { font-size: 1.4rem; }

    /* Dashboard cards */
    .dash-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    .balance-card { grid-column: span 1; }
    .balance-card .dash-value { font-size: 1.85rem; }
    .dash-value { font-size: 1.4rem; }
    .dash-card { padding: 1.15rem 1.25rem; }
    .balance-actions { flex-wrap: wrap; }
    .balance-actions .btn { flex: 1; min-width: 100px; }

    /* Quick actions */
    .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .qa-btn { font-size: 0.82rem; padding: 0.75rem 0.9rem; }

    /* Wallet */
    .wallet-card-v2 { padding: 1.5rem; }
    .wallet-balance-v2 .amt { font-size: 2rem; }
    .wallet-stats { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .wallet-stat { padding: 0.9rem 1rem; }
    .wallet-stat .value { font-size: 1.1rem; }
    .wallet-actions { flex-direction: column; }
    .wallet-actions .btn { width: 100%; }

    /* Deposit */
    .deposit-layout-v2 { grid-template-columns: 1fr; gap: 1rem; }
    .deposit-step { padding: 1.25rem; }
    .deposit-step-head h2 { font-size: 0.98rem; }
    .amount-input-wrap .amt-input { font-size: 1.15rem; padding: 0.75rem 0.85rem; }
    .amount-presets { gap: 0.4rem; }
    .amount-preset { padding: 0.4rem 0.75rem; font-size: 0.78rem; }
    .gateway-opt-body { padding: 0.9rem 1rem; }
    .gateway-opt-icon { width: 38px; height: 38px; font-size: 0.9rem; }

    /* Transactions */
    .filters-bar-v2 { flex-direction: column; align-items: stretch; padding: 0.85rem; }
    .filters-bar-v2 select,
    .filters-bar-v2 input { width: 100%; }
    .filters-bar-v2 .btn { width: 100%; }

    /* Order detail */
    .order-detail-head { flex-direction: column; align-items: flex-start; }
    .delivery-card-head { flex-wrap: wrap; }
    .order-actions { flex-direction: column; }
    .order-actions .btn { width: 100%; text-align: center; }

    /* Support thread */
    .ticket-thread { gap: 0.75rem; }
    .ticket-msg-avatar { width: 32px; height: 32px; font-size: 0.85rem; }
    .ticket-msg-body { padding: 0.85rem 1rem; font-size: 0.9rem; }
    .ticket-msg-head { font-size: 0.82rem; flex-wrap: wrap; }
    .ticket-msg-time { margin-left: 0; width: 100%; }

    /* ---------- Info pages (About/FAQ/Contact) ---------- */
    .info-hero { padding: 3rem 1rem 2.5rem; }
    .info-hero h1 { font-size: clamp(1.65rem, 7vw, 2.25rem); }
    .info-hero p { font-size: 0.95rem; }

    .mission-grid { grid-template-columns: 1fr; gap: 2rem; }
    .mission-visual { aspect-ratio: 16 / 10; }

    .values-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    .value-card { padding: 1.35rem; }

    .timeline { padding-left: 1.5rem; }
    .timeline-item::before { left: -1.5rem; width: 14px; height: 14px; }

    .contact-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .contact-form-card { padding: 1.35rem; }
    .contact-form-v2 .form-grid-2 { grid-template-columns: 1fr; }
    .contact-methods { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .contact-method { padding: 1.1rem; }
    .faq-cta { padding: 2rem 1.25rem; margin: 2rem 1rem 0; }
    .faq-cta h3 { font-size: 1.25rem; }
    .faq-search { margin: -1rem 1rem 2rem; }
    .faq-categories { gap: 0.4rem; padding: 0 1rem; }
    .faq-cat-btn { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
    .faq-sections { padding: 0 1rem; }

    /* ---------- Legal pages ---------- */
    .legal-wrap { padding: 0 1rem 3rem; }
    .legal-layout { grid-template-columns: 1fr; gap: 1.25rem; margin-top: -1rem; }
    .legal-toc {
        position: static;
        max-height: none;
        padding: 1.15rem;
    }
    .legal-toc ol li a { font-size: 0.82rem; padding: 0.4rem 0.6rem; }
    .legal-prose h2 {
        font-size: 1.15rem;
        padding-top: 1.35rem;
        margin-top: 2rem;
        gap: 0.5rem;
    }
    .legal-prose h2 .sec-num { width: 26px; height: 26px; font-size: 0.72rem; }
    .legal-prose { font-size: 0.92rem; }
    .legal-intro { padding: 1.1rem 1.2rem; font-size: 0.88rem; }
    .legal-footer-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .legal-acceptance { padding: 1.1rem 1.2rem; font-size: 0.85rem; flex-direction: column; }
    .legal-acceptance svg { width: 20px; height: 20px; }
    .back-to-top { right: 1rem; bottom: 1rem; width: 40px; height: 40px; }

    /* ---------- Auth pages ---------- */
    .auth-shell { grid-template-columns: 1fr; min-height: auto; }
    .auth-brand { padding: 2rem 1.25rem; }
    .auth-brand-mid { display: none; }
    .auth-brand-stats { display: none; }
    .auth-brand-foot { font-size: 0.75rem; }
    .auth-form-side { padding: 2rem 1.25rem; }
    .auth-form-wrap,
    .auth-form-wrap.wide { max-width: 100%; }
    .auth-head h1 { font-size: 1.5rem; }
    .auth-grid-2 { grid-template-columns: 1fr; gap: 0.85rem; }
    .auth-row-between { flex-wrap: wrap; gap: 0.5rem; }
    .input-group-v2 input { padding: 0.85rem 1rem 0.85rem 2.6rem; font-size: 0.92rem; }

    /* ---------- Notifications modal ---------- */
    .notif-modal { padding: 1.5rem; max-width: 100%; }
    .notif-title { font-size: 1.1rem; }
    .notif-body { font-size: 0.9rem; }
    .notif-actions { flex-direction: column; }
    .notif-actions .btn { width: 100%; }

    /* ---------- Toast ---------- */
    .toast-container { top: 74px; left: 1rem; right: 1rem; }
    .toast { min-width: 0; }

    /* ---------- Tables (data-table fallback) ---------- */
    .data-table { font-size: 0.82rem; }
    .data-table th,
    .data-table td { padding: 0.6rem 0.55rem; }
    .admin-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* ---------- Pagination ---------- */
    .pagination { gap: 0.25rem; }
    .page-btn { min-width: 34px; height: 34px; padding: 0 0.5rem; font-size: 0.82rem; }
    .page-ellipsis { padding: 0 0.2rem; }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */
@media (max-width: 480px) {

    .header-inner { height: 58px; }
    .logo-text { display: none; }
    .logo img { height: 30px; }

    .hero-copy h1 { font-size: 1.75rem; }
    .hero-ticker .msg { max-width: 180px; }

    .stats-grid { grid-template-columns: 1fr; }
    .stat-block {
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .stat-block:last-child { border-bottom: none; }

    .how-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }

    .account-nav { gap: 0.25rem; }
    .account-nav a { font-size: 0.8rem; padding: 0.5rem 0.75rem; }

    .quick-actions { grid-template-columns: 1fr; }

    .wallet-stats { grid-template-columns: 1fr; }

    .contact-methods { grid-template-columns: 1fr; }

    .pd-features { grid-template-columns: 1fr; }
    .pd-related .product-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* =========================================================
   LANDSCAPE PHONES — fix for short heights
   ========================================================= */
@media (max-height: 500px) and (max-width: 900px) {
    .mobile-drawer { padding-bottom: 0; }
    .mobile-drawer-nav a { padding: 0.65rem 0.85rem; font-size: 0.9rem; }
    .mobile-user-card { padding: 0.85rem; margin: 0.75rem 1rem; }
}

/* =========================================================
   TOUCH IMPROVEMENTS
   ========================================================= */
@media (hover: none) and (pointer: coarse) {
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }
    .qa-btn { min-height: 52px; }
    .category-tile { min-height: 100px; }
    .hamburger,
    .mobile-search-btn,
    .mobile-drawer-close { min-width: 44px; min-height: 44px; }
}

/* Prevent horizontal scroll on small screens */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
img, video, iframe { max-width: 100%; }

/* Inputs stay 16px to prevent iOS auto-zoom */
@media (max-width: 900px) {
    input, select, textarea { font-size: 16px !important; }
}

/* =========================================================
   Dashboard mobile overrides — belt-and-braces
   ========================================================= */
@media (max-width: 1024px) {
    .account-layout {
        display: block !important;
        padding: 1rem !important;
    }
    .account-sidebar {
        position: static !important;
        display: block !important;
        margin: 0 0 1.25rem !important;
        padding: 1rem !important;
        border-radius: 16px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }
    .account-nav {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.35rem !important;
        overflow-x: auto !important;
        padding-bottom: 0.35rem !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .account-nav::-webkit-scrollbar { display: none !important; }
    .account-nav a {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 0.55rem 0.9rem !important;
        font-size: 0.85rem !important;
    }
    .account-nav a svg { width: 16px !important; height: 16px !important; }
    .account-main { width: 100% !important; }

    .dash-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }
    .balance-card { grid-column: span 1 !important; }

    .wallet-stats { grid-template-columns: 1fr 1fr !important; }

    .quick-actions { grid-template-columns: 1fr 1fr !important; }

    .dash-card { padding: 1.15rem !important; }
}
@media (max-width: 640px) {
    .wallet-stats { grid-template-columns: 1fr !important; }
    .quick-actions { grid-template-columns: 1fr !important; }
    .balance-card .dash-value { font-size: 1.75rem !important; }
}

/* =========================================================
   BRAND LOCKUP — FINAL OVERRIDE
   Placed in mobile.css because it loads LAST, so it wins
   every specificity battle.
   ========================================================= */

/* ---------- SIZES — bigger on every breakpoint ---------- */
.brand-lockup {
    gap: 0.9rem !important;
}
.brand-mark {
    height: 52px !important;
    width: 52px !important;
    flex-shrink: 0 !important;
}
.brand-name {
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.022em !important;
}
.brand-tagline {
    font-size: 0.74rem !important;
    letter-spacing: 0.16em !important;
}

/* ---------- THEME COLORS — bulletproof ---------- */
/* Light mode: dark text (default) */
.brand-socialhub {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    background: none !important;
}
.brand-tagline {
    color: #64748b !important;
}

/* Dark mode: light text — supports ALL common theme conventions */
[data-theme="dark"] .brand-socialhub,
html.dark .brand-socialhub,
body.dark .brand-socialhub,
.dark .brand-socialhub {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
}

[data-theme="dark"] .brand-tagline,
html.dark .brand-tagline,
body.dark .brand-tagline,
.dark .brand-tagline {
    color: #94a3b8 !important;
}

/* ---------- VIN gradient — always shows on both themes ---------- */
.brand-vin {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 55%, #ec4899 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #a855f7 !important;
}
[data-theme="dark"] .brand-vin,
html.dark .brand-vin,
body.dark .brand-vin,
.dark .brand-vin {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 55%, #f472b6 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #c084fc !important;
}

/* ---------- RESPONSIVE — stays big ---------- */
@media (max-width: 1024px) {
    .brand-mark { height: 50px !important; width: 50px !important; }
    .brand-name { font-size: 1.4rem !important; }
}
@media (max-width: 900px) {
    .brand-mark { height: 48px !important; width: 48px !important; }
    .brand-name { font-size: 1.35rem !important; }
    .brand-tagline { font-size: 0.68rem !important; }
}
@media (max-width: 640px) {
    .brand-mark { height: 46px !important; width: 46px !important; }
    .brand-name { font-size: 1.28rem !important; }
    .brand-tagline { display: none !important; }
}
@media (max-width: 480px) {
    .brand-mark { height: 44px !important; width: 44px !important; }
    .brand-name { font-size: 1.2rem !important; }
}
@media (max-width: 400px) {
    .brand-mark { height: 42px !important; width: 42px !important; }
    .brand-name { font-size: 1.12rem !important; }
}

/* ---------- Extra fallback — if theme attribute is missing ---------- */
@media (prefers-color-scheme: dark) {
    html:not([data-theme]) .brand-socialhub,
    html:not([data-theme]) .brand-tagline {
        color: #f8fafc !important;
        -webkit-text-fill-color: #f8fafc !important;
    }
}
/* =========================================================
   ABSOLUTE FINAL — force single-column product list
   ========================================================= */
.product-grid,
.shop-main .product-grid,
.shop .product-grid,
.pd-related .product-grid,
.account-main .product-grid,
.category-products .product-grid,
.search-results .product-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
}

@media (max-width: 900px) {
    .product-grid,
    .shop-main .product-grid {
        gap: 0.75rem !important;
    }
}

/* Kill the list-view toggle entirely since everything is now a list */
.product-grid.list-view,
.product-grid.list-view .product-card,
.product-grid.list-view .product-card-media,
.product-grid.list-view .product-card-body {
    all: unset;
}