/* ============================================================
   CONCEPTUM — MOBILE STYLES
   All rules scoped to max-width: 680px
   Desktop layout is untouched.
   ============================================================ */

/* ── BOTTOM NAV (hidden on desktop) ─────────────────────────── */
.mob-bottom-nav {
  display: none;
}

/* ── FILTER DRAWER (hidden on desktop) ──────────────────────── */
.mob-filter-overlay,
.mob-filter-drawer,
.mob-filter-btn,
.mob-cat-chips {
  display: none;
}

@media (max-width: 680px) {

  /* ── GLOBAL ─────────────────────────────────────────────── */
  body {
    padding-bottom: 72px;
  }

  /* ── NAVIGATION ─────────────────────────────────────────── */
  .nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 0;
    background: rgba(247, 242, 236, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,.06);
  }

  .nav.nav-ready {
    grid-template-columns: unset;
  }

  .nav-logo {
    font-size: 16px;
    flex-shrink: 0;
  }

  .nav-links {
    display: none !important;
  }

  .nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
  }

  /* Hide Sign in and Post work from top nav — they live in bottom nav */
  .nav-actions > a[href="auth.html"],
  .nav-actions > a[href="publish.html"],
  .nav-actions > .star-border-container {
    display: none;
  }

  .nav-search {
    display: none !important;
  }

  .btn-glass-sm {
    padding: 9px 14px;
    font-size: 13px;
  }

  /* ── BOTTOM NAV BAR ─────────────────────────────────────── */
  .mob-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 490;
    height: 64px;
    background: rgba(255, 250, 243, 0.97);
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -8px 28px rgba(0,0,0,.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mob-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #a09a92;
    font-size: 10px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: color .18s;
    padding: 6px 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-tab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0;
    transition: stroke .18s;
  }

  .mob-tab.active {
    color: #25221d;
  }

  .mob-tab.active svg {
    stroke: #25221d;
  }

  .mob-tab-cart {
    position: relative;
  }

  /* ── HOMEPAGE ───────────────────────────────────────────── */
  .hero-wrap {
    height: auto;
    min-height: 88vh;
  }

  .hero-content {
    padding: 88px 20px 52px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-heading {
    font-size: clamp(38px, 11vw, 56px);
    letter-spacing: -.035em;
    margin-bottom: 16px;
  }

  .hero-badge {
    margin-bottom: 20px;
    font-size: 12px;
    padding: 6px 14px;
  }

  .hero-sub {
    font-size: 15px;
    margin-bottom: 28px;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .hero-actions .star-border-container,
  .hero-actions .star-border-container .inner-content {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .hero-actions .btn-glass {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-scroll {
    display: none;
  }

  /* Stats band: 2×2 grid */
  .stats-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stat-item {
    padding: 24px 16px;
    border-right: 1px solid rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.06);
  }

  .stat-item:nth-child(2),
  .stat-item:nth-child(4) {
    border-right: none;
  }

  .stat-item:nth-child(3),
  .stat-item:nth-child(4) {
    border-bottom: none;
  }

  .stat-n {
    font-size: clamp(28px, 8vw, 36px);
  }

  /* Features */
  .features-section {
    padding: 56px 20px;
  }

  .feat-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  /* Sections */
  .section {
    padding: 48px 20px;
  }

  .section-hd {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
  }

  /* CTA & Footer */
  .cta-wrap {
    padding: 72px 20px;
  }

  .footer {
    flex-direction: column;
    gap: 16px;
    padding: 28px 20px;
    text-align: center;
  }

  .footer-nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* ── MARKETPLACE ────────────────────────────────────────── */
  .mkt-layout {
    padding-top: 62px;
    display: block;
  }

  .mkt-sidebar {
    display: none !important;
  }

  .mkt-main {
    padding: 16px 14px 20px;
  }

  .mkt-view-title {
    font-size: 22px;
    letter-spacing: -.02em;
    margin-bottom: 2px;
  }

  .mkt-view-sub {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .mkt-topbar {
    position: sticky;
    top: 62px;
    z-index: 100;
    background: var(--page-bg);
    padding: 10px 0 8px;
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
  }

  .mkt-search {
    flex: 1;
    min-width: 0;
    font-size: 16px; /* Prevents iOS zoom */
    padding: 11px 16px;
    max-width: none;
  }

  .mkt-result-count {
    display: none;
  }

  /* Filter button (shown only on mobile) */
  .mob-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(78,68,55,.14);
    background: rgba(255,250,243,.92);
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #25221d;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(54,48,39,.07);
    -webkit-tap-highlight-color: transparent;
  }

  .mob-filter-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
  }

  /* Category chips row */
  .mob-cat-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .mob-cat-chips::-webkit-scrollbar {
    display: none;
  }

  .mob-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(78,68,55,.12);
    background: rgba(255,250,243,.92);
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-chip.active {
    background: #25221d;
    border-color: #25221d;
    color: white;
  }

  /* 2-column work grid */
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .wc-preview {
    height: 140px;
  }

  .wc-body {
    padding: 10px 12px 12px;
  }

  .wc-title {
    font-size: 13px;
  }

  .wc-des {
    font-size: 11px;
  }

  .wc-price {
    font-size: 13px;
  }

  /* Show work card actions on mobile without hover */
  .wc-actions {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .wc-act-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  /* Promo banner: compact on mobile */
  .marketplace-promo-banner {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
    border-radius: 20px;
    margin-bottom: 16px;
  }

  .marketplace-promo-preview {
    min-height: 160px;
  }

  .marketplace-promo-title {
    font-size: clamp(24px, 7vw, 36px);
  }

  /* ── FILTER DRAWER ───────────────────────────────────────── */
  .mob-filter-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 590;
    background: rgba(37,34,29,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s;
  }

  .mob-filter-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mob-filter-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 600;
    height: 86vh;
    background: #fffaf4;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 60px rgba(0,0,0,.18);
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.22,1,.36,1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mob-filter-drawer.open {
    transform: translateY(0);
  }

  .mob-drawer-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0,0,0,.14);
    margin: 14px auto 0;
    flex-shrink: 0;
  }

  .mob-drawer-title {
    font-size: 17px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    color: #25221d;
    padding: 16px 20px 10px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mob-drawer-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.07);
    color: #555;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
  }

  .mob-drawer-section {
    margin-bottom: 24px;
  }

  .mob-drawer-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #bbb;
    margin-bottom: 10px;
  }

  .mob-drawer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mob-drawer-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(78,68,55,.12);
    background: rgba(255,255,255,.72);
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-drawer-chip.active {
    background: #25221d;
    border-color: #25221d;
    color: white;
  }

  .mob-price-row {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .mob-price-row input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(78,68,55,.14);
    background: rgba(255,255,255,.72);
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    color: #25221d;
    outline: none;
  }

  .mob-price-row span {
    color: #ccc;
    font-size: 14px;
  }

  .mob-sort-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(78,68,55,.14);
    background: rgba(255,255,255,.72);
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    color: #25221d;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .mob-drawer-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(0,0,0,.06);
    flex-shrink: 0;
  }

  .mob-drawer-apply {
    width: 100%;
    padding: 15px;
    border-radius: 16px;
    border: none;
    background: #25221d;
    color: white;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .18s;
  }

  .mob-drawer-apply:active {
    opacity: .82;
  }

  /* ── BROWSE PAGE ─────────────────────────────────────────── */
  .card-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── DESIGNERS PAGE ──────────────────────────────────────── */
  .designers-page {
    padding-top: 62px;
  }

  .designers-hero {
    padding: 24px 16px 28px;
  }

  .designers-title {
    font-size: clamp(34px, 10vw, 54px);
  }

  .designers-sub {
    font-size: 15px;
  }

  .designer-board {
    padding: 40px 16px 60px;
  }

  .authors-hd {
    padding: 0 16px;
  }

  .author-carousel-viewport {
    padding-left: 16px;
    padding-right: 16px;
  }

  .designer-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px 14px;
    padding: 14px 16px;
  }

  .designer-row span:not(.designer-rank),
  .designer-row em {
    grid-column: 2;
  }

  /* ── PRODUCT DETAIL ──────────────────────────────────────── */
  .concept-grid {
    gap: 16px;
    padding: 16px;
  }

  /* ── SETTINGS / PUBLISH / MESSAGES / CART ───────────────── */
  .mkt-layout,
  .designers-page,
  .settings-layout,
  .dash-layout {
    padding-top: 62px;
  }

  .profile-hero,
  .publish-wrap,
  .messages-wrap,
  .cart-wrap {
    padding-top: 80px;
  }

  .checkout-wrap {
    padding: 80px 20px 72px;
  }

  .subscriptions-page {
    padding: 80px 20px 56px;
  }

  /* Remove the awkward min(342px) width constraints — use full width */
  .publish-hero,
  .publish-grid,
  .messages-hero,
  .messages-shell,
  .cart-hero,
  .cart-grid,
  .subscriptions-hero,
  .plans-grid,
  .subscription-system,
  .enterprise-strip,
  .settings-hero,
  .settings-grid {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ── SUBSCRIPTIONS ───────────────────────────────────────── */
  .subscriptions-hero,
  .plans-grid,
  .subscription-system {
    grid-template-columns: 1fr;
  }

  .plan-card {
    min-height: auto;
  }

  .subscription-flow {
    grid-template-columns: 1fr;
  }

  .enterprise-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .enterprise-metrics {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  /* ── TOAST: lift above bottom nav ───────────────────────── */
  .conceptum-toast {
    bottom: 76px;
    right: 16px;
    left: 16px;
    border-radius: 14px;
    white-space: normal;
    font-size: 13px;
  }

  /* ── PROFILE HERO ────────────────────────────────────────── */
  .profile-hero {
    padding: 80px 20px 36px;
    gap: 24px;
  }

  .p-name {
    font-size: clamp(32px, 9vw, 52px);
  }

  .p-stats {
    gap: 20px;
  }

  /* ── AUTH ────────────────────────────────────────────────── */
  .auth-wrap {
    flex-direction: column;
  }

  .auth-form-panel {
    width: 100%;
    padding: 80px 24px 40px;
  }

  .auth-visual-panel {
    display: none;
  }

  /* ── SECTION HEADERS ─────────────────────────────────────── */
  .section-title {
    font-size: clamp(26px, 7vw, 38px);
  }
}
