/* ============================================================
   dispensary.fyi – Public site styles
   Colors derived from logo.png
   ============================================================ */

:root {
  --green-900: #1B5E20;
  --green-800: #2E7D32;
  --green-600: #43A047;
  --green-400: #7CB342;
  --green-200: #DCEDC8;
  --green-50:  #F1F8E9;
  --gray-900:  #212121;
  --gray-700:  #424242;
  --gray-500:  #9E9E9E;
  --gray-300:  #E0E0E0;
  --gray-100:  #F5F5F5;
  --white:     #FFFFFF;
  --star-gold: #FFC107;
  --warning:   #FF8F00;
  --danger:    #C62828;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.10);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --transition: .18s ease;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--gray-100);
  line-height: 1.6;
}

a { color: var(--green-800); text-decoration: none; }
a:hover { color: var(--green-600); }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding-block: 2.5rem; }

/* ── Site Header ─────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-900);
  text-decoration: none;
}

.logo img { height: 44px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.site-nav a {
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: background var(--transition), color var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--green-50);
  color: var(--green-800);
}

.site-nav .btn-submit {
  background: var(--green-800);
  color: var(--white) !important;
  margin-left: .5rem;
}

.site-nav .btn-submit:hover { background: var(--green-900); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--gray-700);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 60%, var(--green-600) 100%);
  color: var(--white);
  padding-block: 3.5rem 2.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .75rem;
}

.hero p {
  font-size: 1.1rem;
  opacity: .9;
  max-width: 540px;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.hero-search {
  display: flex;
  max-width: 480px;
  margin-inline: auto;
  background: var(--white);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-search input {
  flex: 1;
  padding: .75rem 1.25rem;
  border: none;
  font-size: 1rem;
  outline: none;
  color: var(--gray-900);
  background: transparent;
}

.hero-search button {
  padding: .75rem 1.5rem;
  background: var(--green-400);
  color: var(--white);
  border: none;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.hero-search button:hover { background: var(--green-600); }

/* ── Category Filter Bar ─────────────────────────────────── */
.category-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding-block: .75rem;
  overflow-x: auto;
}

.category-bar .container {
  display: flex;
  gap: .5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--green-800);
  color: var(--white);
  border-color: var(--green-800);
}

/* ── Section Headings ────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.section-heading h2 {
  font-size: 1.35rem;
  color: var(--gray-900);
}

.section-heading h2 .badge {
  font-size: .75rem;
  background: var(--green-200);
  color: var(--green-900);
  padding: .15rem .5rem;
  border-radius: 50px;
  margin-left: .5rem;
  vertical-align: middle;
}

.see-all {
  font-size: .85rem;
  color: var(--green-600);
  white-space: nowrap;
}

/* ── Card Grid ───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ── Listing Card ────────────────────────────────────────── */
.listing-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.listing-card.featured {
  border: 2px solid var(--green-400);
}

.card-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--green-200);
}

.card-photo-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--green-200) 0%, var(--green-50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-600);
  font-size: 3rem;
}

.card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.card-category {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green-600);
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.card-address {
  font-size: .82rem;
  color: var(--gray-500);
  display: flex;
  align-items: flex-start;
  gap: .3rem;
}

.card-address svg { flex-shrink: 0; margin-top: .2rem; }

.card-rating {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: auto;
  padding-top: .5rem;
}

.stars { display: inline-flex; gap: 1px; }
.star  { color: var(--gray-300); font-size: 1rem; }
.star.filled { color: var(--star-gold); }

.rating-count { font-size: .8rem; color: var(--gray-500); }

.featured-badge {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: var(--green-800);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 50px;
}

.card-wrap { position: relative; }

/* ── Ad Unit ─────────────────────────────────────────────── */
.ad-unit {
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 90px;
  background: var(--gray-100);
  border: 1px dashed var(--gray-300);
  grid-column: 1 / -1;
}

/* ── Business Detail Page ────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.detail-hero-photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.detail-hero-placeholder {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green-200), var(--green-50));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--green-600);
  margin-bottom: 1.5rem;
}

.detail-title { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }

.detail-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.detail-category-badge {
  background: var(--green-50);
  color: var(--green-800);
  font-size: .8rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 50px;
  border: 1px solid var(--green-200);
}

.detail-description {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.info-card h3 {
  font-size: 1rem;
  color: var(--green-900);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--green-200);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .5rem 0;
  font-size: .9rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.info-row:last-child { border-bottom: none; }

.info-row svg { flex-shrink: 0; color: var(--green-600); margin-top: .1rem; }

.info-row a { color: var(--green-600); word-break: break-all; }
.info-row a:hover { color: var(--green-900); }

.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 260px;
  margin-bottom: 1.25rem;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Hours Table ─────────────────────────────────────────── */
.hours-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.hours-table th, .hours-table td { padding: .35rem .5rem; text-align: left; }
.hours-table th { color: var(--gray-700); font-weight: 600; width: 110px; }
.hours-table td { color: var(--gray-600, #555); }
.hours-table tr.today { background: var(--green-50); border-radius: 4px; }
.hours-table tr.today th { color: var(--green-800); }

/* ── Reviews ─────────────────────────────────────────────── */
.review-section { margin-top: 2.5rem; }
.review-section h2 { font-size: 1.35rem; margin-bottom: 1.25rem; }

.review-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
  gap: .5rem;
  flex-wrap: wrap;
}

.review-author { font-weight: 700; font-size: .9rem; }
.review-date   { font-size: .78rem; color: var(--gray-500); }
.review-body   { font-size: .9rem; color: var(--gray-700); line-height: 1.6; }

/* ── Review Form ─────────────────────────────────────────── */
.review-form-wrap {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

.review-form-wrap h3 { margin-bottom: 1rem; }

.star-label { cursor: pointer; font-size: 1.5rem; color: var(--gray-300); transition: color var(--transition); }
.star-label input { display: none; }
.star-label.selected,
.star-label:hover,
.stars-input:not(:checked) ~ .star-label:hover { color: var(--star-gold); }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }

.form-control {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(67,160,71,.15);
}

textarea.form-control { resize: vertical; min-height: 100px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn:active { transform: scale(.98); }
.btn-primary   { background: var(--green-800); color: var(--white); }
.btn-primary:hover { background: var(--green-900); color: var(--white); }
.btn-outline   { background: transparent; border: 2px solid var(--green-800); color: var(--green-800); }
.btn-outline:hover { background: var(--green-50); }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }

/* ── Submit Form Page ────────────────────────────────────── */
.submit-page { max-width: 680px; margin-inline: auto; }
.submit-page h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.submit-page .lead { color: var(--gray-700); margin-bottom: 2rem; }

.form-section { background: var(--white); border-radius: var(--radius-md); padding: 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; }
.form-section h3 { font-size: 1rem; color: var(--green-900); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--green-200); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.help-text { font-size: .78rem; color: var(--gray-500); margin-top: .25rem; }

.alert {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: .9rem;
}

.alert-success { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.alert-error   { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
.alert-info    { background: #E3F2FD; color: #0D47A1; border: 1px solid #90CAF9; }

/* ── Category/City Hub ───────────────────────────────────── */
.page-header {
  background: var(--green-900);
  color: var(--white);
  padding-block: 2rem;
}

.page-header h1 { font-size: 1.8rem; font-weight: 800; }
.page-header p  { opacity: .85; margin-top: .4rem; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; padding-block: 2rem; }
.pagination ul { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }

.page-btn {
  display: inline-block;
  padding: .45rem .85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover  { border-color: var(--green-600); color: var(--green-800); }
.page-btn.active { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.page-ellipsis   { display: inline-block; padding: .45rem .5rem; color: var(--gray-500); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,.8);
  padding-block: 2.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo { color: var(--white); margin-bottom: .75rem; }
.footer-brand p  { font-size: .85rem; line-height: 1.6; }

.footer-col h4 {
  color: var(--white);
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  margin-bottom: .35rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--gray-500);
  padding-block: .75rem;
}

.breadcrumb a { color: var(--green-600); }
.breadcrumb a:hover { color: var(--green-900); }
.breadcrumb span { color: var(--gray-500); }

/* ── Utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--gray-500); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
}

.empty-state svg { margin-inline: auto; margin-bottom: 1rem; opacity: .4; }
.empty-state h3  { font-size: 1.1rem; color: var(--gray-700); margin-bottom: .5rem; }
.empty-state p   { font-size: .9rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--gray-300); padding: 1rem; box-shadow: var(--shadow-md); }
  .site-nav.open { display: flex; }
  .site-header .container { position: relative; }
  .nav-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-block: 2rem; }
}
