/* ============================================================
   TapVent — Shop directory (shared stylesheet)
   File: /public_html/shop/directory.css

   ONE stylesheet for the client's producer directory, used by:
     /entities/web_integration/styling/      (desktop preview)
     /entities/web_integration/producers/edit.php (card preview)
     /shop/                                  (public page — later step)
   so the preview is exactly what buyers see.
   .sd-soon = the "coming soon" panel shown when no producers are listed yet.

   Colours: the --vb-* tokens from vbt_vars() (_vb_theme.php), set on
   .sd-page by wi_directory_style() / the live preview JS.
   Colour roles (solid fills, no gradients):
     Primary  → header bar
     Accent   → card buttons, search focus glow, hover glows (faded)
     Accent 2 → headings, producer names, input borders, soft panels
     Tone     → page background
   Text on every fill is picked automatically for readability.
   Fonts: --sd-font-head (headings, producer names, client name) and
   --sd-font-body (everything else); unset = the system font.
   Everything is .sd- prefixed so it never clashes with tapvent.css.
   ============================================================ */

.sd-page {
  background: var(--vb-tone, #f5f4f9);
  color: var(--vb-a2-body, #4a4a55);
  font-family: var(--sd-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  font-size: 16px; line-height: 1.5;
  min-height: 100%;
}
.sd-page *, .sd-page *::before, .sd-page *::after { box-sizing: border-box; }
.sd-page > * { width: 100%; }   /* full-width rows even when the page is a flex column (public page) */
.sd-title, .sd-card-name, .sd-head-name, .sd-soon h2 { font-family: var(--sd-font-head, inherit); }
.sd-page [hidden] { display: none !important; }

/* ── Header bar (Primary) — sticky: the page scrolls underneath it ── */
.sd-head {
  background: var(--vb-p, #782ac5); color: var(--vb-on-p, #ffffff);
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.sd-head-in {
  max-width: 1180px; margin: 0 auto; padding: 8px 28px;
  display: flex; align-items: center; gap: 18px; min-height: 80px;
}
.sd-head-logo {
  height: 64px; min-width: 64px; max-width: 340px; padding: 3px 8px; border-radius: 10px; background: #ffffff;
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
  font-weight: 800; font-size: 1.6rem; color: var(--vb-p, #782ac5);
}
.sd-head-logo img { max-height: 58px; max-width: 324px; object-fit: contain; display: block; }   /* logo fills the tile: only a thin white edge */
.sd-head-name { font-weight: 700; font-size: 1.25rem; letter-spacing: .01em; line-height: 1.25; }

/* "Back to website" — same tab, right of the header */
.sd-back {
  margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none;
  color: var(--vb-on-p, #ffffff); background: var(--on-head-soft, rgba(255,255,255,.15));
  border: 1.5px solid var(--sd-back-line, rgba(255,255,255,.55));
  transition: background .14s;
}
a.sd-back:hover { background: var(--sd-back-line, rgba(255,255,255,.55)); }

/* ── Header image: artwork (whole, centred, never cropped) ── */
.sd-art { max-width: 1180px; margin: 0 auto; padding: 20px 28px 0; text-align: center; }
.sd-art img { display: inline-block; max-width: min(560px, 100%); max-height: 210px; width: auto; height: auto; }
.sd-art + .sd-plain .sd-hero { padding-top: 22px; }

/* ── Hero ── */
.sd-hero { max-width: 1180px; margin: 0 auto; padding: 40px 28px 10px; }
.sd-title { margin: 0 0 8px; font-size: 2rem; line-height: 1.2; font-weight: 800; color: var(--vb-a2-txt, #2b2b38); }
.sd-intro { margin: 0; max-width: 720px; font-size: 1.02rem; color: var(--vb-a2-body, #4a4a55); white-space: pre-line; }

/* Banner variant: image behind the title, dark wash for readable white text */
.sd-banner {
  position: relative; background-size: cover; background-position: center;
  min-height: 240px; display: flex; align-items: flex-end;
}
.sd-banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.58) 100%); }
.sd-banner .sd-hero { position: relative; width: 100%; padding-bottom: 30px; }
.sd-banner-only { min-height: 280px; }
.sd-banner-only::before { display: none; }   /* no text on it, so no dark wash */
.sd-banner .sd-title { color: #ffffff; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.sd-banner .sd-intro { color: rgba(255,255,255,.92); text-shadow: 0 1px 6px rgba(0,0,0,.35); }

/* ── Search ── */
.sd-tools { max-width: 1180px; margin: 0 auto; padding: 22px 28px 6px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sd-search { position: relative; flex: 1; max-width: 420px; }
.sd-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--vb-a2-mid, #b9a3d8); }
.sd-search input {
  width: 100%; padding: 11px 14px 11px 40px; border-radius: 10px; font: inherit; font-size: .95rem;
  border: 1.5px solid var(--vb-a2-line, #ddd0ee); background: #ffffff; color: #1a1a1a; outline: none;
}
.sd-search input:focus { border-color: var(--vb-a2, #9e5fdd); box-shadow: 0 0 0 4px rgba(var(--vb-a-rgb, 42,106,197), .14); }
.sd-count { font-size: .85rem; color: var(--vb-a2-txt, #2b2b38); font-weight: 600; }

/* ── Producer cards ── */
.sd-grid {
  max-width: 1180px; margin: 0 auto; padding: 16px 28px 44px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px;
}
.sd-card {
  background: #ffffff; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 10px rgba(var(--vb-a-rgb, 42,106,197), .08);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .14s, box-shadow .14s;
}
a.sd-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(var(--vb-a-rgb, 42,106,197), .20); }
.sd-card-logo {
  height: 130px; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: var(--vb-a2-tint, #f7f2fc); border-bottom: 1px solid var(--vb-a2-soft, #f0e7fa);
}
.sd-card-logo img { max-width: 80%; max-height: 92px; object-fit: contain; display: block; }
.sd-card-initial {
  width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; background: var(--vb-p, #782ac5); color: var(--vb-on-p, #ffffff);
}
.sd-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sd-card-name { font-weight: 800; font-size: 1.06rem; line-height: 1.25; color: var(--vb-a2-txt, #2b2b38); }
.sd-card-desc {
  font-size: .88rem; color: var(--vb-a2-body, #4a4a55); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.sd-card-btn {
  margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: .9rem;
  background: var(--vb-a, #2a6ac5); color: var(--vb-on-a, #ffffff);
}
.sd-card-flag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  background: #fff4dc; color: #8a5a00; border: 1px solid #f0d27a;   /* status amber — never themed */
}
/* Member discount label on a card (accent colours from the directory styling) */
.sd-card-deal { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-bottom: 6px;
  background: var(--vb-a-soft, #f3eefb); color: var(--vb-a-txt, #6b2bbf); border: 1px solid var(--vb-a-line, #e1d4f3);
  border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 700; line-height: 1.3; }

/* Members-only page: same header + banner + heading as the directory, centred; the log-in button sits where the cards would be */
.sd-gate { flex: 1; }
.sd-gate-zone .sd-hero { text-align: center; }
.sd-gate-zone .sd-intro { margin-left: auto; margin-right: auto; }
.sd-gate-in { max-width: 1180px; margin: 0 auto; padding: 22px 28px 56px; text-align: center; }
.sd-gate-btn { display: inline-flex; align-items: center; gap: 9px; background: var(--vb-a, #6b2bbf); color: var(--vb-on-a, #fff);
  border-radius: 10px; padding: 13px 22px; font-weight: 700; font-size: 1rem; text-decoration: none; transition: filter .15s, transform .15s; }
.sd-gate-btn:hover { filter: brightness(1.08); color: var(--vb-on-a, #fff); text-decoration: none; transform: translateY(-1px); }
.sd-gate-note { margin: 16px 0 0; font-size: .86rem; color: var(--vb-a2-body, #4a4a55); opacity: .85; }
.sd-gate-note i { margin-right: 4px; }
@media (max-width: 640px) { .sd-gate-in { padding: 18px 16px 40px; } }

.sd-empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--vb-a2-body, #4a4a55); }
.sd-empty i { font-size: 2rem; color: var(--vb-a2-mid, #b9a3d8); display: block; margin-bottom: 10px; }

/* ── Coming soon (no producers listed yet) ── */
.sd-soon {
  grid-column: 1 / -1; max-width: 620px; margin: 10px auto 20px; text-align: center;
  background: #ffffff; border-radius: 18px; padding: 42px 28px 36px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 26px rgba(var(--vb-a-rgb, 42,106,197), .12);
}
.sd-soon-ico {
  position: relative; width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  background: var(--vb-a-soft, #e8f0fb); color: var(--vb-a-txt, #2a6ac5);
  animation: sdSoonPulse 2.6s ease-in-out infinite;
}
.sd-soon-spark { position: absolute; top: 6px; right: 4px; font-size: .95rem; color: var(--vb-a, #2a6ac5); animation: sdSoonTwinkle 1.8s ease-in-out infinite; }
.sd-soon-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 20px;
  background: var(--vb-a, #2a6ac5); color: var(--vb-on-a, #ffffff);
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.sd-soon h2 { margin: 16px 0 8px; font-size: 1.55rem; line-height: 1.25; color: var(--vb-a2-txt, #1f1f2b); }
.sd-soon p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--vb-a2-body, #4a4a55); }
.sd-soon-admin { margin-top: 20px; padding-top: 14px; border-top: 1px dashed rgba(0,0,0,.12); font-size: .8rem; color: #8a6d1a; }
@keyframes sdSoonPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes sdSoonTwinkle { 0%, 100% { opacity: .35; transform: scale(.85) rotate(0deg); } 50% { opacity: 1; transform: scale(1.1) rotate(15deg); } }
@media (prefers-reduced-motion: reduce) { .sd-soon-ico, .sd-soon-spark { animation: none; } }
@media (max-width: 640px) { .sd-soon { padding: 32px 18px 28px; } .sd-soon h2 { font-size: 1.3rem; } }

/* ── Footer ── */
.sd-foot { text-align: center; padding: 18px 20px 26px; font-size: .78rem; color: var(--vb-a2-body, #4a4a55); opacity: .75; }
.sd-foot a { color: inherit; }

@media (max-width: 640px) {
  .sd-head-in, .sd-hero, .sd-tools, .sd-grid, .sd-art { padding-left: 16px; padding-right: 16px; }
  .sd-head-in { min-height: 64px; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
  .sd-head-logo { height: 52px; min-width: 52px; max-width: 200px; padding: 2px 6px; }
  .sd-head-logo img { max-height: 48px; max-width: 188px; }
  .sd-head-name { font-size: 1rem; }
  .sd-back { padding: 9px 12px; }
  .sd-art { padding-top: 18px; }
  .sd-art img { max-height: 150px; }
  .sd-banner-only { min-height: 170px; }
  .sd-title { font-size: 1.55rem; }
  .sd-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sd-card-logo { height: 96px; padding: 12px; }
  .sd-card-body { padding: 12px 12px 14px; }
  .sd-card-name { font-size: .98rem; }
  .sd-card-btn { padding: 9px 8px; font-size: .84rem; text-align: center; }
  .sd-card-btn i { display: none; }   /* keeps the label on one line in narrow cards */
}
@media (max-width: 480px) {
  .sd-back-txt { display: none; }      /* icon-only back button on small phones */
  .sd-back { padding: 10px 13px; }
}