/* ============================================================
   Fan Installation Guides — styles
   Upload to: /wp-content/themes/woodmart-child/instructions/instructions_style.css
   ============================================================ */

#fw-hub {
  --fw-accent: #d61f26;
  --fw-text: #16181a;
  --fw-muted: #6b7280;
  --fw-border: #e5e7eb;
  --fw-bg-soft: #f7f7f8;

  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  color: var(--fw-text);
  box-sizing: border-box;
}
#fw-hub *,
#fw-hub *::before,
#fw-hub *::after { box-sizing: border-box; }

/* ---------- header ---------- */
#fw-hub .fw-header { text-align: center; margin-bottom: 24px; }
#fw-hub .fw-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
#fw-hub .fw-header p {
  color: var(--fw-muted);
  font-size: 16px;
  margin: 0 !important;
}

/* ---------- search bar ----------
   Icon is a background-image, not a child <svg>, because WoodMart
   applies its own sizing rules to svg elements. */
#fw-hub #fw-search {
  /* iOS Safari applies native inset shadow + its own rounding to inputs,
     which hides the background icon and squashes the box. Reset it. */
  -webkit-appearance: none !important;
  appearance: none !important;

  display: block !important;
  width: 100% !important;
  max-width: 480px;
  height: 46px !important;
  min-height: 0 !important;
  margin: 0 auto 32px !important;
  padding: 0 16px 0 42px !important;
  border: 1px solid var(--fw-border) !important;
  border-radius: 8px !important;
  /* 16px minimum — anything smaller makes iOS auto-zoom the page on focus */
  font-size: 16px !important;
  line-height: 44px !important;
  color: var(--fw-text) !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20L16.65 16.65'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 14px center !important;
  background-size: 17px 17px !important;
  box-shadow: none !important;
}
#fw-hub #fw-search:focus {
  outline: none !important;
  border-color: var(--fw-accent) !important;
  box-shadow: 0 0 0 3px rgba(214, 31, 38, 0.12) !important;
}

/* ---------- grid ---------- */
#fw-hub .fw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 980px) {
  #fw-hub .fw-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  #fw-hub .fw-grid { grid-template-columns: 1fr; }
  #fw-hub .fw-header h1 { font-size: 26px; }
  #fw-hub { padding: 32px 16px 48px; }
}

/* ---------- cards ---------- */
#fw-hub .fw-card {
  background: #fff;
  border: 1px solid var(--fw-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
#fw-hub .fw-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
/* Fallback first: iOS Safari below 15 ignores aspect-ratio and would
   collapse these to zero height, making cards look blank. */
#fw-hub .fw-card-img {
  width: 100%;
  height: 0;
  padding-top: 75%; /* 4:3 */
  background: #f0f1f2 center / cover no-repeat;
}
@supports (aspect-ratio: 4 / 3) {
  #fw-hub .fw-card-img {
    height: auto;
    padding-top: 0;
    aspect-ratio: 4 / 3;
  }
}
#fw-hub .fw-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
#fw-hub .fw-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fw-accent);
  background: rgba(214, 31, 38, 0.08);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}
#fw-hub .fw-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 !important;
  line-height: 1.3;
}
#fw-hub .fw-card-sku {
  font-size: 12px;
  font-weight: 600;
  color: var(--fw-text);
  margin: 0 !important;
  letter-spacing: 0.02em;
}
#fw-hub .fw-card-bike {
  font-size: 13px;
  color: var(--fw-muted);
  margin: 0 !important;
}
#fw-hub .fw-card-spec {
  font-size: 12px;
  color: var(--fw-muted);
  margin: 0 0 8px !important;
}

/* ---------- buttons ---------- */
#fw-hub .fw-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  transition: opacity .15s ease;
}
#fw-hub .fw-btn:hover { opacity: .9; }
#fw-hub .fw-btn-primary {
  background: var(--fw-accent) !important;
  color: #fff !important;
}
#fw-hub .fw-btn-outline {
  background: transparent !important;
  color: var(--fw-accent) !important;
  border-color: var(--fw-accent) !important;
}


/* ---------- prompt state (before any search) ---------- */
#fw-hub .fw-prompt {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--fw-border);
  border-radius: 12px;
  background: var(--fw-bg-soft);
}
#fw-hub .fw-prompt-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  opacity: .55;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20L16.65 16.65'/%3E%3C/svg%3E");
}
#fw-hub .fw-prompt h3 {
  margin: 0 0 8px !important;
  font-size: 18px;
  font-weight: 700;
}
#fw-hub .fw-prompt p {
  margin: 0 !important;
  color: var(--fw-muted);
  font-size: 14px;
}
#fw-hub .fw-prompt-hint {
  margin-top: 6px !important;
  font-size: 13px;
  opacity: .8;
}

/* ---------- empty state + footer ---------- */
#fw-hub .fw-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--fw-muted);
}
#fw-hub .fw-empty p { margin: 4px 0 !important; }
#fw-hub .fw-empty strong { color: var(--fw-text); }
#fw-hub .fw-empty-sub { font-size: 13px; }

#fw-hub .fw-footer {
  margin-top: 48px;
  text-align: center;
  padding: 32px 20px;
  background: var(--fw-bg-soft);
  border-radius: 12px;
}
#fw-hub .fw-footer h3 { margin: 0 0 6px !important; font-size: 18px; }
#fw-hub .fw-footer p { margin: 0 0 16px !important; color: var(--fw-muted); font-size: 14px; }