/**
 * MyHometownVermont.com — mhv-town-style.css
 * Place in your child theme folder alongside single-towns.php
 *
 * OceanWP child theme: wp-content/themes/oceanwp-child/mhv-town-style.css
 */

/* ── RESET & BASE ─────────────────────────────────────────────────────────── */

:root {
  --mhv-forest:       #2B4A2B;
  --mhv-forest-light: #3a6b3a;
  --mhv-sage:         #708F70;
  --mhv-sage-light:   #a0b8a0;
  --mhv-cream:        #F2C98A;
  --mhv-cream-light:  #faf3e8;
  --mhv-cream-dark:   #e8b86d;
  --mhv-white:        #ffffff;
  --mhv-text:         #2a2a2a;
  --mhv-border:       #d4c4a0;
  --mhv-card-bg:      #f8f5ef;
}

.mhv-town-page {
  font-family: 'Lato', sans-serif;
  color: var(--mhv-text);
  background: var(--mhv-white);
}

/* Override OceanWP default content padding on town pages */
.mhv-town-page #content,
.mhv-town-page .site-content,
.mhv-town-page .content-area,
.mhv-town-page article.towns {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ── HEADER ───────────────────────────────────────────────────────────────── */

.mhv-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--mhv-forest);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 82px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.mhv-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mhv-header-logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.mhv-logo-img {
  height: 64px;
  width: auto;
}

.mhv-site-name {
  font-family: 'Playfair Display', serif;
  color: var(--mhv-cream);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}

.mhv-site-name span {
  display: block;
  font-size: 0.62rem;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--mhv-sage-light);
  text-transform: uppercase;
}

.mhv-back-home {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--mhv-sage-light);
  font-size: 0.78rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.mhv-back-home:hover { color: var(--mhv-cream); }

.mhv-header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mhv-header-select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--mhv-white);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 210px;
}

.mhv-header-select option { color: #222; background: white; }

.mhv-header-btn {
  background: var(--mhv-cream);
  color: var(--mhv-forest);
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.mhv-header-btn:hover { background: var(--mhv-cream-dark); }

/* ── TOWN HERO ────────────────────────────────────────────────────────────── */

.mhv-town-hero {
  background: linear-gradient(135deg, #1a3020 0%, #2B4A2B 50%, #3a5c2a 100%);
  padding: 2.5rem 2rem 2rem;
  border-bottom: 3px solid var(--mhv-cream-dark);
}

.mhv-town-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.mhv-town-breadcrumb {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mhv-sage-light);
  margin-bottom: 0.6rem;
}

.mhv-town-breadcrumb a {
  color: var(--mhv-sage-light);
  text-decoration: none;
}

.mhv-town-breadcrumb a:hover { color: var(--mhv-cream); }

.mhv-town-name {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--mhv-white);
  line-height: 1.05;
  margin-bottom: 0.3rem;
}

.mhv-town-state {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--mhv-cream);
}

.mhv-town-meta {
  font-size: 0.8rem;
  color: var(--mhv-sage-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.mhv-town-meta a {
  color: var(--mhv-cream);
  text-decoration: none;
}

.mhv-town-meta a:hover { text-decoration: underline; }

/* Product type navigation pills */
.mhv-section-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mhv-nav-pill {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.8);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.2s;
  cursor: pointer;
}

.mhv-nav-pill:hover {
  background: var(--mhv-cream);
  color: var(--mhv-forest);
  border-color: var(--mhv-cream);
}

/* ── LOADING & ERROR STATES ───────────────────────────────────────────────── */

.mhv-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--mhv-sage);
}

.mhv-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--mhv-border);
  border-top-color: var(--mhv-forest);
  border-radius: 50%;
  animation: mhv-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes mhv-spin { to { transform: rotate(360deg); } }

.mhv-load-error {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--mhv-sage);
}

.mhv-fallback-btn {
  display: inline-block;
  margin-top: 1rem;
  color: var(--mhv-forest);
  font-weight: 700;
  text-decoration: underline;
}

/* ── PRODUCT SECTIONS ─────────────────────────────────────────────────────── */

.mhv-product-section {
  padding: 3rem 2rem;
}

.mhv-product-section:nth-child(even) { background: var(--mhv-cream-light); }
.mhv-product-section:nth-child(odd)  { background: var(--mhv-white); }

.mhv-section-header {
  max-width: 1100px;
  margin: 0 auto 1.75rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.mhv-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mhv-forest);
}

.mhv-section-count {
  font-size: 0.75rem;
  color: var(--mhv-sage);
  font-weight: 400;
}

.mhv-section-rule {
  flex: 1;
  height: 1px;
  background: var(--mhv-border);
  margin-left: 0.5rem;
}

/* ── PRODUCT GRID ─────────────────────────────────────────────────────────── */

.mhv-product-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Hats: 2-up left-aligned */
.mhv-product-grid.mhv-hat-grid {
  grid-template-columns: repeat(2, 280px);
  justify-content: start;
}

/* ── PRODUCT CARD ─────────────────────────────────────────────────────────── */

.mhv-product-card {
  background: var(--mhv-white);
  border-radius: 6px;
  border: 1px solid var(--mhv-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.mhv-product-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.mhv-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f0ece4;
}

.mhv-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.3s;
}

.mhv-product-card:hover .mhv-card-img-wrap img {
  transform: scale(1.03);
}

.mhv-vt-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--mhv-forest);
  color: var(--mhv-cream);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
}

.mhv-card-body {
  padding: 0.75rem 0.85rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mhv-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mhv-forest);
  line-height: 1.3;
}

.mhv-card-type {
  font-size: 0.72rem;
  color: var(--mhv-sage);
  font-weight: 400;
}

.mhv-card-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mhv-text);
}

.mhv-card-spacer { flex: 1; }

.mhv-card-shop {
  display: block;
  text-align: center;
  margin-top: 0.6rem;
  background: var(--mhv-forest);
  color: var(--mhv-cream);
  padding: 0.5rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}

.mhv-card-shop:hover { background: var(--mhv-forest-light); }

/* ── SHOP ALL BUTTON ──────────────────────────────────────────────────────── */

.mhv-shop-all-wrap {
  text-align: center;
  padding: 2rem;
  background: var(--mhv-cream-light);
  border-top: 1px solid var(--mhv-border);
}

.mhv-shop-all-btn {
  display: inline-block;
  background: var(--mhv-forest);
  color: var(--mhv-cream);
  padding: 0.75rem 2.5rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.mhv-shop-all-btn:hover { background: var(--mhv-forest-light); }

/* ── COMMUNITY STRIP ──────────────────────────────────────────────────────── */

.mhv-community-strip {
  background: var(--mhv-forest);
  text-align: center;
  padding: 2.5rem 2rem;
}

.mhv-strip-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mhv-sage-light);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.mhv-community-strip h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--mhv-cream);
  margin-bottom: 0.75rem;
}

.mhv-community-strip p {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  max-width: 580px;
  margin: 0 auto 1.25rem;
  line-height: 1.7;
  font-weight: 300;
}

.mhv-strip-cta {
  display: inline-block;
  background: var(--mhv-cream);
  color: var(--mhv-forest);
  padding: 0.6rem 1.75rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.mhv-strip-cta:hover { background: var(--mhv-cream-dark); }

/* ── FIND ANOTHER TOWN ────────────────────────────────────────────────────── */

.mhv-find-another {
  background: var(--mhv-cream-light);
  border-top: 1px solid var(--mhv-border);
  padding: 2.5rem 2rem;
  text-align: center;
}

.mhv-find-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mhv-sage);
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
}

.mhv-find-another h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--mhv-forest);
  margin-bottom: 1rem;
}

.mhv-find-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}

.mhv-find-select {
  flex: 1;
  min-width: 260px;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--mhv-border);
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  background: white;
  color: var(--mhv-text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23708F70'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.mhv-find-btn {
  background: var(--mhv-forest);
  color: var(--mhv-cream);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.mhv-find-btn:hover { background: var(--mhv-forest-light); }

.mhv-find-note {
  font-size: 0.76rem;
  color: var(--mhv-sage);
  margin-top: 0.7rem;
  font-style: italic;
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */

.mhv-footer {
  background: #191919;
  padding: 2.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.mhv-footer-logo {
  height: 48px;
  width: auto;
}

.mhv-footer-name {
  font-family: 'Playfair Display', serif;
  color: var(--mhv-cream);
  font-size: 1rem;
  margin-top: 0.4rem;
}

.mhv-footer-sub {
  font-size: 0.72rem;
  color: var(--mhv-sage);
  font-weight: 300;
  margin-top: 0.2rem;
  letter-spacing: 0.08em;
}

.mhv-footer-policy {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.38);
  max-width: 400px;
  line-height: 1.65;
}

.mhv-footer-policy strong { color: rgba(255,255,255,0.62); }

.mhv-footer-policy a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.mhv-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mhv-footer-links a {
  color: var(--mhv-sage-light);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.mhv-footer-links a:hover { color: var(--mhv-cream); }

.mhv-footer-bottom {
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.1rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.22);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .mhv-product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .mhv-product-grid { grid-template-columns: repeat(2, 1fr); }
  .mhv-product-grid.mhv-hat-grid { grid-template-columns: repeat(2, 1fr); }
  .mhv-town-name { font-size: 2.2rem; }
  .mhv-site-name { display: none; }
  .mhv-back-home span { display: none; }
  .mhv-header { height: 70px; }
  .mhv-logo-img { height: 52px; }
}

@media (max-width: 420px) {
  .mhv-product-grid { grid-template-columns: 1fr; }
}
