/* Vendor Stall brand skin for Directory Plus (loaded via head-custom.php).
   Keep tokens in sync with themes/vendorstall/assets/css/vendorstall-overrides.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  --vs-red: #c41e3a;
  --vs-red-hover: #9b1730;
  --vs-black: #111111;
  --vs-white: #ffffff;
  --vs-green: #198754;
  --vs-brand-green: #245a42;
  --vs-brown: #8a5a35;
  --vs-blue: #2563eb;
  --vs-text: #111111;
  --vs-muted: #5c5c5c;
  --vs-line: #e4e4e4;
  --vs-bg: #f4f1ee;
}

body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--vs-text);
  background: var(--vs-white);
}

h1, h2, h3, h4, h5, .headline {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--vs-black);
}

a { color: var(--vs-red); }
a:hover { color: var(--vs-brand-green); }

.bg-primary,
.btn-primary {
  background-color: var(--vs-red) !important;
  border-color: var(--vs-red) !important;
  color: var(--vs-white) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--vs-green) !important;
  border-color: var(--vs-green) !important;
}
.text-primary { color: var(--vs-red) !important; }

/* Match live shop: canopy + black header; logo centered with top padding */
.vs-dir-header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  width: 100%;
}
.vs-dir-canopy {
  /* Full-width Directory look; seamless red/white (no red|red tile seam) */
  height: 28px;
  width: 100%;
  background-color: var(--vs-red);
  background-image: repeating-linear-gradient(
    90deg,
    var(--vs-red) 0px,
    var(--vs-red) 88px,
    #ffffff 88px,
    #ffffff 176px
  );
  background-size: auto 100%;
  background-repeat: repeat-x;
  background-position: left top;
}
#header-nav {
  background: var(--vs-black) !important;
  border-bottom: none;
  color: var(--vs-white);
  /* Match Stall main-navbar: ~12px pad, logo not mid-tall-nav */
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  position: relative;
  z-index: 1;
}
#header-nav .vs-dir-nav-inner {
  position: relative;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
}
@media (min-width: 768px) {
  /* Keep black bar Stall-height; don't let nav links stretch it */
  #header-nav .vs-dir-nav-inner {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
  }
  #header-nav .navbar-collapse {
    flex-grow: 0;
    align-items: center !important;
  }
  #header-nav .navbar-nav {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap;
  }
  #header-nav .nav-item .btn {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    line-height: 1.2;
  }
}
#header-nav .logo,
#header-nav .navbar-brand img {
  height: 52px;
  max-height: 52px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
  border-radius: 6px;
  display: block;
}
#header-nav .navbar-brand.vs-dir-logo-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding-top: 0;
  height: 52px;
}
#header-nav .nav-link,
#header-nav .navbar-brand,
#header-nav a { color: rgba(255,255,255,0.92) !important; }
#header-nav a:hover { color: var(--vs-white) !important; }
#header-nav .navbar-toggler { color: var(--vs-white); margin-left: auto; }
.vs-dir-marketplace-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92) !important;
  margin-right: 0.75rem;
  z-index: 3;
}
.vs-dir-marketplace-link:hover { color: var(--vs-white) !important; }

/* Spacer: stock dummy navbar should clear canopy + black bar */
#header-nav-dummy {
  min-height: 104px; /* 28 canopy + 12+52+12 Stall-like black bar */
  visibility: hidden;
  pointer-events: none;
}
.tpl-home #header-nav {
  background: var(--vs-black) !important; /* keep black even on home (no transparent overlap) */
}

/* --- Explore dropdown + Search: not clipped / not under fixed header --- */
.vs-dir-header-fixed,
.vs-dir-header-fixed #header-nav,
.vs-dir-header-fixed .navbar-collapse,
.vs-dir-header-fixed .vs-dir-nav-inner,
.vs-dir-header-fixed .navbar-nav {
  overflow: visible !important;
}
@media (max-width: 767.98px) {
  /* Stock styles.css sets nav.navbar { max-height:100vh; overflow:auto } which clips dropdowns */
  .vs-dir-header-fixed nav.navbar {
    max-height: none !important;
    overflow: visible !important;
  }
}
#header-nav .nav-item.dropdown {
  position: relative;
  z-index: 5;
}
#header-nav .dropdown-menu {
  z-index: 2200 !important;
}
/* Search panel: stock z-index 1100 sits under .vs-dir-header-fixed (2000).
   JS only margins by #header-nav height and misses the 28px canopy. */
#mainSearch,
#mainSearch.fixed-top {
  z-index: 2100 !important;
  top: 104px !important; /* match #header-nav-dummy (canopy + black bar) */
  margin-top: 0 !important;
}

/* Footer — match Stall shop (wood brown, black copyright, green grass) */
footer.vs-dir-footer {
  background-color: var(--vs-brown);
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.18) 0px,
      rgba(0, 0, 0, 0.18) 2px,
      rgba(255, 255, 255, 0.05) 2px,
      rgba(255, 255, 255, 0.05) 4px,
      transparent 4px,
      transparent 84px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0px,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 3px,
      rgba(0, 0, 0, 0.035) 3px,
      rgba(0, 0, 0, 0.035) 4px,
      transparent 4px,
      transparent 7px
    );
  color: #fff;
  border-top: none !important;
  margin: 0 !important;
  padding: 28px 0 0;
  width: 100%;
  max-width: none;
  position: relative;
  font-size: 14px;
}
footer.vs-dir-footer::after {
  content: '';
  display: block;
  height: 24px;
  background: var(--vs-brand-green);
  width: 100%;
}
footer.vs-dir-footer h4,
footer.vs-dir-footer h5,
footer.vs-dir-footer p,
footer.vs-dir-footer li,
footer.vs-dir-footer strong,
footer.vs-dir-footer small {
  color: #fff !important;
}
footer.vs-dir-footer h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
}
footer.vs-dir-footer .vs-dir-footer-brand {
  font-size: 1.05rem;
}
footer.vs-dir-footer .vs-dir-footer-blurb {
  opacity: 0.9;
  font-size: 0.95rem;
}
footer.vs-dir-footer a {
  color: #fff !important;
  font-weight: 400;
}
footer.vs-dir-footer a:hover {
  color: var(--vs-brand-green) !important;
}
footer.vs-dir-footer ul {
  padding-left: 0;
  margin-bottom: 0;
}
footer.vs-dir-footer li > a {
  padding: 0.2rem 1rem 0.2rem 0;
  display: inline-block;
}
footer.vs-dir-footer .vs-dir-footer-bar,
footer.vs-dir-footer .copyright-bar {
  background: #111111;
  margin-top: 20px;
  padding: 8px 0;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
footer.vs-dir-footer .copyright-message {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
footer.vs-dir-footer .copyright-message small {
  display: block;
  text-align: center;
  color: #fff !important;
  font-size: 13px;
  line-height: 1.3;
}
/* legacy class kept harmless if old markup remains */
.vs-dir-footer-grass { display: none; }


.card, .list-item, .listing-item {
  border-color: var(--vs-line);
}
.badge-warning { background-color: var(--vs-red); }

/* Home hero: red title, black subtitle, solid white text panel (map unchanged) */
.tpl-home .jumbotron .vs-dir-hero-copy {
  display: inline-block;
  background: #ffffff;
  color: #111111;
  padding: 1.1rem 1.75rem 1.15rem;
  margin: 0 auto 1.25rem;
  max-width: 920px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.tpl-home .jumbotron .vs-dir-hero-copy h1 {
  color: var(--vs-red) !important; /* #c41e3a */
  text-shadow: none !important;
  margin-bottom: 0.4rem !important;
}
.tpl-home .jumbotron .vs-dir-hero-copy p.lead {
  color: #111111 !important;
  text-shadow: none !important;
  margin-bottom: 0 !important;
}


/* Vendor Zone newsletter — match Stall band above footer */
.vs-dir-newsletter-section {
  background: #f4f1ee;
  padding: 32px 0;
  text-align: center;
}
.vs-dir-newsletter-box .h6 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  color: var(--vs-black);
  font-weight: 600;
}
.vs-dir-newsletter-blurb {
  font-size: 0.9rem;
  color: var(--vs-muted);
}
.vs-dir-newsletter-box .form-inline {
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}
.vs-dir-newsletter-box .form-control {
  width: 100%;
  max-width: 420px;
}
.vs-dir-newsletter-box .btn-primary {
  min-width: 120px;
}
.vs-dir-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* Vendor Stall Directory — advertising slots */
.vs-dir-advert {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1rem auto;
  text-align: center;
  overflow: hidden;
}
.vs-dir-advert img,
.vs-dir-advert .vs-dir-advert-img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
.vs-dir-advert-header { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.vs-dir-advert-slider { margin: 1.25rem auto; }
.vs-dir-advert-footer { margin: 1.25rem auto 0.5rem; }
.vs-dir-advert-categories-menu { margin: 1rem auto; }

/* Marketplace banner (Directory home) — above map hero, under header, all viewports */
.vs-marketplace-below {
  background: #ffffff;
  line-height: 0;
  padding: 0;
  margin: 0;
  margin-top: 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.vs-marketplace-below-link {
  display: block;
  line-height: 0;
}
.vs-marketplace-below .vs-marketplace-banner-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(140px, 18vw, 200px);
  object-fit: contain;
  object-position: center center;
  margin: 0 auto;
  background: #ffffff;
}
@media (orientation: portrait) and (max-width: 991.98px) {
  .vs-marketplace-below .vs-marketplace-banner-img {
    max-height: clamp(140px, 22vw, 200px);
  }
}
