/*
 * BizCart Mobile Fix — drop-in CSS patch
 * Add this as a <link rel="stylesheet"> AFTER your existing <style> tags,
 * or append this content to your existing style block.
 *
 * Fixes:
 *   - Mobile hamburger nav (works with bizcart-mobile-nav.js)
 *   - Phone-sized breakpoints (480px, 375px)
 *   - Touch targets minimum 44px
 *   - Search box on small screens
 *   - Hero padding and font scale on mobile
 *   - Footer grid on mobile
 */

/* ─── HAMBURGER BUTTON ───────────────────────────────────────────────────── */
/* This is hidden on desktop, shown on mobile via media query below */
.navtoggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
}

.navtoggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink, #1a1a2e);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Animated X state when open */
.navtoggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navtoggle.open span:nth-child(2) { opacity: 0; }
.navtoggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE NAV DRAWER ──────────────────────────────────────────────────── */
/* .navlinks wraps the <nav> + .bc-right on mobile into a collapsible panel */
.navdrawer {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--line, #e2e8f0);
  padding: 8px 0 16px;
  width: 100%;
}

.navdrawer.open {
  display: flex;
}

.navdrawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink, #1a1a2e);
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.navdrawer a:last-child {
  border-bottom: none;
}

.navdrawer a:hover {
  background: var(--bg-soft, #f5f7fa);
}

.navdrawer .drawer-divider {
  height: 1px;
  background: var(--line, #e2e8f0);
  margin: 8px 0;
}

/* ─── IMPROVED TOUCH TARGETS (all viewports) ─────────────────────────────── */
#bc-canon-hd .bc-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
}

#bc-canon-hd .bc-right a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
}

/* ─── 900px — Tablet / Large Phone ──────────────────────────────────────── */
@media (max-width: 900px) {
  /* Show hamburger, rearrange header */
  #bc-canon-hd .bc-hd-in {
    flex-wrap: wrap;
    gap: 0;
  }

  .navtoggle {
    display: flex;
  }

  /* Hide desktop nav and account links in the header bar */
  #bc-canon-hd .bc-nav,
  #bc-canon-hd .bc-right {
    display: none;
  }

  /* Hero adjustments */
  .hero {
    padding: 48px 0 40px;
  }

  h1 {
    font-size: 40px;
    letter-spacing: -1px;
  }

  /* Pillar cards → single column */
  .pillars {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Category cards → 2 columns */
  .cats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer grid → 2 columns */
  .fgrid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ─── 600px — Phone landscape / small tablet ─────────────────────────────── */
@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }

  h1 {
    font-size: 34px;
    letter-spacing: -0.5px;
  }

  h2 {
    font-size: 26px;
  }

  /* Hero */
  .hero {
    padding: 36px 0 32px;
  }

  .hero p.sub {
    font-size: 16px;
  }

  /* Search box — fully vertical stack */
  .searchbox {
    flex-direction: column;
    padding: 8px;
    gap: 0;
    border-radius: 14px;
  }

  .searchbox .fieldwrap {
    border-right: none;
    border-bottom: 1px solid var(--line, #e2e8f0);
    padding: 4px 12px;
  }

  .searchbox .fieldwrap.loc {
    border-bottom: none;
  }

  .searchbox input {
    padding: 12px 0;
  }

  .searchbox button {
    border-radius: 10px;
    padding: 14px;
    margin-top: 8px;
    width: 100%;
    font-size: 15px;
  }

  /* Quick-stat pills under hero */
  .chips {
    justify-content: flex-start;
    gap: 8px;
  }

  .chip {
    font-size: 13px;
    padding: 7px 12px;
  }

  /* Category cards → single column */
  .cats {
    grid-template-columns: 1fr;
  }

  /* Split section → stack */
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Mock storefront card */
  .mock {
    margin-top: 0;
  }

  /* Footer → single column */
  .fgrid {
    grid-template-columns: 1fr;
  }

  .fbar {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .fbar a {
    margin-left: 8px;
  }
}

/* ─── 400px — Small phones (iPhone SE, older Android) ────────────────────── */
@media (max-width: 400px) {
  .wrap {
    padding: 0 12px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .hero {
    padding: 28px 0 24px;
  }

  /* Make CTAs full-width */
  .btn {
    display: block;
    text-align: center;
    width: 100%;
  }

  /* Logo max size */
  #bc-canon-hd img.bc-logo {
    height: 28px;
  }

  /* Pillars section */
  .pillars-sec {
    padding: 40px 0 44px;
  }
}

/* ─── LOGO link area always min-height 44px ──────────────────────────────── */
#bc-canon-hd .bc-brand {
  min-height: 44px;
  display: flex;
  align-items: center;
}
