/* ============================================================
   SHOP NEAR ME — Design tokens
   A warm neighbourhood-market identity: ink + paper + marigold,
   not the generic orange-SaaS look.
   ============================================================ */
:root {
  --ink: #1B1B2F;
  --ink-soft: #2E2C49;
  --paper: #FAF6EF;
  --white: #FFFFFF;
  --marigold: #F2A93B;
  --marigold-dark: #D98F1E;
  --coral: #E85D4E;
  --coral-dark: #C94636;
  --teal: #1F7A6C;
  --text: #221F2E;
  --muted: #736C82;
  --border: #ECE3D2;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }

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

h1, h2, h3, h4, h5, .brand-text, .footer-brand, .btn-snm-primary, .btn-snm-outline, .btn-snm-dark {
  font-family: 'Space Grotesk', sans-serif;
}

h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }

a { text-decoration: none; color: inherit; }

:focus-visible {
  outline: 3px solid var(--marigold-dark);
  outline-offset: 2px;
}

::selection { background: var(--marigold); color: var(--ink); }

/* ---------- Navbar ---------- */
.snm-navbar {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--white) !important;
}
.brand-mark { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--coral); display: inline-block; flex-shrink: 0;
}
.brand-text { font-size: 1.35rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.nav-link { font-weight: 500; color: var(--text) !important; padding: 0.5rem 0.85rem !important; }
.nav-link:hover { color: var(--coral-dark) !important; }

/* ---------- Buttons ---------- */
.btn-snm-primary {
  background: var(--marigold);
  border: none;
  color: var(--ink);
  font-weight: 600;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-snm-primary:hover { background: var(--marigold-dark); color: var(--ink); transform: translateY(-1px); }

.btn-snm-outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 600;
  border-radius: 50px;
  background: transparent;
  padding: 0.55rem 1.4rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-snm-outline:hover { background: var(--ink); color: var(--white); }

.btn-snm-dark {
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
}
.btn-snm-dark:hover { background: var(--ink-soft); color: var(--white); }

/* ---------- Hero ---------- */
.snm-hero {
  background: var(--ink);
  color: var(--white);
  padding: 4.5rem 0 7rem;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  margin-bottom: -2.5rem;
}
.snm-hero .eyebrow {
  color: var(--marigold);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.snm-hero h1 {
  font-size: 2.9rem;
  font-weight: 700;
  color: var(--white);
  max-width: 760px;
  letter-spacing: -0.02em;
}
.snm-hero p.lead { color: rgba(255,255,255,0.72); font-size: 1.1rem; max-width: 540px; }

.snm-search-box {
  background: var(--white);
  border-radius: 50px;
  padding: 0.45rem;
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
  max-width: 640px;
  margin-top: 2rem;
}
.snm-search-box input {
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.3rem;
  flex: 1;
  font-size: 0.98rem;
}
.snm-search-box input:focus { outline: none; box-shadow: none; }
.snm-search-box button {
  border-radius: 50px;
  padding: 0.75rem 1.7rem;
  white-space: nowrap;
}

/* Trending ticker */
.trending-wrap { margin-top: 1.6rem; overflow: hidden; max-width: 640px; }
.trending-label { color: rgba(255,255,255,0.5); font-size: 0.82rem; margin-bottom: 0.5rem; }
.trending-track {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
}
.trending-chip {
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  font-size: 0.87rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.trending-chip:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.5); color: var(--white); }

/* ---------- Sections ---------- */
.snm-section { padding: 3.5rem 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.8rem; flex-wrap: wrap; gap: 0.75rem; }
.section-title { font-size: 1.7rem; margin-bottom: 0.25rem; }
.section-subtitle { color: var(--muted); margin-bottom: 0; font-size: 0.98rem; }
.section-link { font-weight: 600; color: var(--coral-dark); border-bottom: 1.5px solid var(--coral); padding-bottom: 2px; white-space: nowrap; }
.section-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Category Cards ---------- */
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  height: 100%;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(27,27,47,0.1); border-color: transparent; }

.category-icon {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.9rem; font-size: 1.5rem; color: var(--ink);
  overflow: hidden;
}
.category-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* Rotate accent colours so the directory reads as colourful, not one uniform badge */
.cat-tint-0 { background: #FCEBCB; }
.cat-tint-1 { background: #DCEEEA; }
.cat-tint-2 { background: #FBE1DC; }
.cat-tint-3 { background: #E7E5F3; }

.category-card h6 { margin-bottom: 0.2rem; font-weight: 600; color: var(--ink); }
.category-card small { color: var(--muted); }

/* ---------- Shop / Business Cards ---------- */
.shop-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(27,27,47,0.12); }
.shop-card .shop-img-wrap { position: relative; overflow: hidden; }
.shop-card .shop-img { width: 100%; height: 190px; object-fit: cover; background: var(--paper); display: block; }

.featured-ribbon {
  position: absolute; top: 14px; left: -6px;
  background: var(--coral); color: var(--white);
  font-size: 0.72rem; font-weight: 700;
  padding: 0.25rem 0.9rem 0.25rem 1.1rem;
  transform: rotate(-5deg);
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.status-chip {
  position: absolute; bottom: 12px; right: 12px;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.28rem 0.8rem;
  border-radius: 50px;
  color: var(--white);
  backdrop-filter: blur(2px);
}
.status-chip-open { background: rgba(31,122,108,0.92); }
.status-chip-closed { background: rgba(34,31,46,0.75); }

.status-pill {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  padding: 0.2rem 0.75rem; border-radius: 50px; margin-left: 0.5rem;
  vertical-align: middle;
}
.status-open { background: rgba(31,122,108,0.12); color: var(--teal); }
.status-closed { background: rgba(232,93,78,0.12); color: var(--coral-dark); }

.hours-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.88rem; padding: 0.25rem 0; color: var(--text);
}
.hours-list li.hours-today { font-weight: 700; color: var(--ink); }
.hours-list li.hours-today span:first-child::before { content: '● '; color: var(--marigold-dark); }

/* ---------- Icons ---------- */
.icon-pin {
  width: 15px; height: 15px;
  vertical-align: -2px;
  margin-right: 3px;
  flex-shrink: 0;
}

.js-use-location:hover, .js-clear-location:hover { text-decoration: underline; }

/* ---------- Star Ratings ---------- */
.star-rating-display { display: inline-flex; gap: 1px; letter-spacing: -1px; }
.star-rating-display .star-filled { color: var(--marigold); }
.star-rating-display .star-empty { color: #E0DACB; }
.star-rating-display.star-sm { font-size: 0.85rem; }

.star-rating-input {
  display: flex; flex-direction: row-reverse; justify-content: flex-end;
  gap: 0.15rem; width: fit-content;
}
.star-rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-rating-input label {
  font-size: 2.1rem; line-height: 1; color: #E0DACB; cursor: pointer;
  transition: color 0.12s ease; user-select: none;
}
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
  color: var(--marigold);
}

.review-list { display: flex; flex-direction: column; gap: 1.1rem; }
.review-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.1rem;
}
.review-item:last-child { border-bottom: none; padding-bottom: 0; }
.review-item .star-rating-display { margin: 0.15rem 0; }

/* ---------- Festive Offers ---------- */
@keyframes offer-glow-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.offer-card {
  position: relative;
  background: linear-gradient(155deg, #2E2C49 0%, var(--ink) 60%);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.1rem;
  height: 100%;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(242,169,59,0.35);
}
.offer-card .offer-glow {
  position: absolute; top: -30%; right: -20%; width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(242,169,59,0.55) 0%, rgba(242,169,59,0) 70%);
  border-radius: 50%;
  animation: offer-glow-pulse 2.6s ease-in-out infinite;
  pointer-events: none;
}
.offer-card .offer-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  background: var(--marigold); color: var(--ink);
  padding: 0.2rem 0.65rem; border-radius: 50px; letter-spacing: 0.03em;
  position: relative; z-index: 1;
}
.offer-card h6 { color: #fff; position: relative; z-index: 1; margin-top: 0.5rem; }
.offer-card .offer-shop-name { color: rgba(255,255,255,0.7); position: relative; z-index: 1; }
.offer-card .offer-countdown { color: var(--marigold); font-weight: 600; position: relative; z-index: 1; }

.shop-offer-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #2E2C49 0%, var(--ink) 60%);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  color: #fff;
  border: 1px solid rgba(242,169,59,0.35);
}
.shop-offer-banner .offer-glow {
  position: absolute; top: -40%; right: -10%; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(242,169,59,0.5) 0%, rgba(242,169,59,0) 70%);
  border-radius: 50%;
  animation: offer-glow-pulse 2.6s ease-in-out infinite;
  pointer-events: none;
}
.shop-offer-banner .offer-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  background: var(--marigold); color: var(--ink);
  padding: 0.25rem 0.75rem; border-radius: 50px; letter-spacing: 0.03em;
  position: relative; z-index: 1;
}
.shop-offer-banner h5, .shop-offer-banner p { position: relative; z-index: 1; }
.shop-offer-banner .offer-countdown { color: var(--marigold); font-weight: 600; }

.featured-ribbon.offer-ribbon { background: var(--marigold); color: var(--ink); }

/* ---------- Ad Slots ---------- */
.ad-slot {
  position: relative;
  margin: 1.5rem 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
  text-align: center;
}
.ad-slot .ad-label {
  position: absolute; top: 6px; left: 10px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
  background: rgba(255,255,255,0.85);
  padding: 0.1rem 0.5rem; border-radius: 4px;
  z-index: 1;
}
.ad-slot .ad-banner-img { width: 100%; max-height: 220px; object-fit: contain; display: block; margin: 0 auto; }
.ad-slot:hover { border-color: var(--marigold-dark); }

/* ---------- Lightbox navigation ---------- */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff; border: none;
  font-size: 1.8rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  z-index: 5; cursor: pointer; transition: background 0.15s ease;
}
.lightbox-nav:hover { background: rgba(0,0,0,0.75); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-counter {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.55); color: #fff; font-size: 0.8rem;
  padding: 0.15rem 0.7rem; border-radius: 50px;
}
@media (max-width: 575px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 1.4rem; }
}

/* ---------- Trust Bar ---------- */
.trust-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.trust-bar-inner {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem;
  padding: 1.5rem 0;
}
.trust-stat { text-align: center; }
.trust-stat strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; color: var(--ink); line-height: 1.2; }
.trust-stat span { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Design polish: refined elevation & motion ---------- */
.shop-card, .category-card, .offer-card, .story-card {
  box-shadow: 0 1px 3px rgba(27,27,47,0.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.shop-card:hover, .category-card:hover {
  box-shadow: 0 20px 38px rgba(27,27,47,0.14);
  border-color: transparent;
}
.story-card:hover { box-shadow: 0 16px 32px rgba(27,27,47,0.1); transform: translateY(-3px); }

.btn-snm-primary, .btn-snm-outline, .btn-snm-dark {
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-snm-primary:hover { box-shadow: 0 8px 18px rgba(242,169,59,0.35); }
.btn-snm-outline:hover, .btn-snm-dark:hover { transform: translateY(-1px); }

.snm-navbar { box-shadow: 0 1px 2px rgba(27,27,47,0.04); }

/* ---------- Location Banner ---------- */
.location-banner {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.location-banner-active { background: rgba(31,122,108,0.08); border-color: rgba(31,122,108,0.25); color: var(--teal); }
.location-banner .btn-link { text-decoration: underline; font-size: 0.85rem; }

.distance-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.78rem; font-weight: 600; color: var(--teal);
  background: rgba(31,122,108,0.1);
  padding: 0.15rem 0.6rem; border-radius: 50px;
}

.shop-card .shop-body { padding: 1.15rem 1.25rem 1.35rem; }
.shop-card .category-pill {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  border: 1px solid var(--marigold-dark); color: var(--marigold-dark);
  padding: 0.18rem 0.75rem; border-radius: 50px; margin-bottom: 0.55rem;
}
.shop-card .card-rating { display: block; margin-bottom: 0.4rem; }
.shop-card h5 { font-size: 1.08rem; margin-bottom: 0.3rem; color: var(--ink); }
.shop-card p.desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.65rem; }
.shop-card .meta { font-size: 0.86rem; color: var(--muted); margin-bottom: 0.15rem; display: flex; align-items: center; gap: 0.4rem; }
.shop-card .meta-row { margin-bottom: 0.7rem; }
.shop-card .view-link { font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--marigold); padding-bottom: 1px; font-size: 0.9rem; }
.shop-card .view-link:hover { color: var(--coral-dark); border-color: var(--coral); }

/* ---------- Badges (status) ---------- */
.badge-active { background: var(--teal); }
.badge-inactive { background: #9ca3af; }
.badge-expired { background: var(--coral-dark); }
.badge-expiring { background: var(--marigold-dark); }

/* ---------- Shop Detail Page ---------- */
.shop-hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); background: var(--paper); }
.gallery-thumb { width: 100%; height: 110px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid var(--border); }
.shop-info-list li { margin-bottom: 0.7rem; font-size: 0.95rem; display: flex; gap: 0.5rem; align-items: flex-start; }
.shop-action-btns .btn { border-radius: 50px; font-weight: 600; }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.shop-sidebar-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); }

.business-cta-banner {
  background: var(--ink); color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
}
.business-cta-banner h2 { color: #fff; }
.business-cta-banner p { color: rgba(255,255,255,0.8); }
.business-cta-banner p.fw-bold { color: var(--marigold); }

/* ---------- Footer ---------- */
.snm-footer { background: var(--ink); color: rgba(255,255,255,0.7); }
.snm-footer .footer-brand { color: var(--white); }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { color: rgba(255,255,255,0.65); }
.footer-links a:hover { color: var(--marigold); }
.social-links a { margin-right: 0.9rem; color: rgba(255,255,255,0.6); font-size: 0.88rem; }
.social-links a:hover { color: var(--marigold); }
.snm-footer hr { border-color: rgba(255,255,255,0.12); }

/* ---------- Utility ---------- */
.rounded-snm { border-radius: var(--radius-lg); }
.shadow-snm { box-shadow: 0 10px 28px rgba(27,27,47,0.08); border: 1px solid var(--border); }
.bg-soft { background: var(--paper); }
.bg-ink { background: var(--ink); color: var(--white); }
.text-teal { color: var(--teal); }
.text-coral { color: var(--coral-dark); }

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--ink); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--ink); border-color: var(--ink); }

/* ---------- Forms (contact, search filters) ---------- */
.form-control:focus, .form-select:focus {
  border-color: var(--marigold-dark);
  box-shadow: 0 0 0 3px rgba(242,169,59,0.25);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 767px) {
  .snm-hero h1 { font-size: 2.1rem; }
  .snm-hero { padding: 3rem 0 5.5rem; clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); }
  .snm-search-box { flex-direction: column; border-radius: 22px; }
  .snm-search-box input, .snm-search-box button { width: 100%; margin-bottom: 0.4rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Success Stories ---------- */
.story-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 90px;
}
.story-card .story-img { width: 100%; max-height: 320px; object-fit: contain; background: var(--paper); }
.story-card .story-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.story-card .story-title { font-size: 1.1rem; margin-bottom: 0.6rem; }
.story-card .story-text { color: var(--text); font-size: 0.95rem; }
.story-card .story-author { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; padding-top: 0.5rem; font-size: 0.9rem; line-height: 1.3; }
.story-card .story-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--marigold); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
}
.story-card .story-links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.9rem; }
.story-card .view-link { font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--marigold); padding-bottom: 1px; font-size: 0.9rem; }
.story-card .view-link:hover { color: var(--coral-dark); border-color: var(--coral); }
