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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #2c1810;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* === Nautical Chart Background === */
.chart-bg {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #ede0c8;
  background-image:
    /* Parchment color variation */
    radial-gradient(ellipse at 15% 30%, rgba(210, 185, 145, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 15%, rgba(220, 195, 155, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 85%, rgba(200, 175, 135, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(215, 190, 150, 0.2) 0%, transparent 40%),
    /* Major grid lines */
    linear-gradient(rgba(120, 100, 70, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 100, 70, 0.12) 1px, transparent 1px),
    /* Minor grid lines */
    linear-gradient(rgba(120, 100, 70, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 100, 70, 0.05) 1px, transparent 1px);
  background-size:
    100% 100%, 100% 100%, 100% 100%, 100% 100%,
    180px 180px, 180px 180px,
    36px 36px, 36px 36px;
  position: relative;
}

/* Vignette */
.chart-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(50, 35, 15, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Edge darkening (like aged paper) */
.chart-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 120px 40px rgba(80, 55, 25, 0.15);
  pointer-events: none;
  z-index: 1;
}

/* === Island Chart Map === */
.chart-map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.chart-map img,
.chart-map object {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.6;
}

/* === Content Container === */
.content {
  position: relative;
  z-index: 2;
  max-width: 460px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* === Header === */
header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Title */
h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 9vw, 3.2rem);
  letter-spacing: 0.04em;
  color: #1a2030;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

/* Tagline */
.tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  color: #5a4a3a;
  letter-spacing: 0.02em;
}

/* Decorative Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem 0 0;
  color: #8a7a6a;
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  width: 56px;
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, #a09080 50%, transparent);
}

.divider::before { --dir: right; }
.divider::after { --dir: left; }

/* === Search Card === */
.search-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: clamp(1.25rem, 5vw, 2rem);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Fields */
.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  color: #5a5550;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input,
.field select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid #d4cfc7;
  border-radius: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  color: #2c1810;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #2c4a6e;
  box-shadow: 0 0 0 3px rgba(44, 74, 110, 0.12);
}

.field input::placeholder {
  color: #a8a098;
}

/* Custom select arrow */
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a6a5a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Submit Button */
button[type="submit"] {
  width: 100%;
  padding: 1rem 1.5rem;
  background: #1a2744;
  color: #d4b96a;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.25rem;
}

button[type="submit"]:hover {
  background: #243a5e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 39, 68, 0.3);
}

button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(26, 39, 68, 0.2);
}

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* === Footer === */
footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-bottom: 1rem;
}

footer p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.85rem;
  color: #8a7a6a;
  letter-spacing: 0.03em;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  animation: fadeInUp 0.7s ease both;
  animation-delay: 0.1s;
}

.tagline {
  animation: fadeInUp 0.7s ease both;
  animation-delay: 0.2s;
}

.divider {
  animation: fadeInUp 0.7s ease both;
  animation-delay: 0.25s;
}

.search-card {
  animation: fadeInUp 0.7s ease both;
  animation-delay: 0.35s;
}

footer {
  animation: fadeInUp 0.7s ease both;
  animation-delay: 0.5s;
}

/* === Results Page === */
.results-page {
  justify-content: flex-start;
  padding-top: 1.5rem;
}

.results-page .content {
  min-height: auto;
}

/* Compact search card on results page */
.search-card--compact {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  animation-delay: 0s;
}

.search-card--compact .field {
  margin-bottom: 0.6rem;
}

.search-card--compact input,
.search-card--compact select {
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
}

.search-card--compact label {
  display: none;
}

.compact-label {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5a4a3a;
  margin-bottom: 0.4rem;
}

/* Inline row: dropdown + button side by side */
.search-form-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.search-form-row__select {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.search-form-row button {
  flex-shrink: 0;
  width: auto;
  padding: 0.55rem 1rem;
  margin-top: 0;
  font-size: 0.8rem;
  white-space: nowrap;
}

.search-card--compact .search-form-row .field {
  margin-bottom: 0;
}

.search-card--compact button {
  font-size: 0.8rem;
}

/* Source card header: name left, badge right */
.source-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.source-card-header__left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.source-card-header .source-type-badge {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.15rem;
}

/* Expandable details inside source cards */
.source-card-details {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.source-card-toggle {
  font-size: 0.72rem;
  font-weight: 500;
  color: #6a5a4a;
  cursor: pointer;
  padding: 0.4rem 0 0.15rem;
  list-style: none;
  user-select: none;
}

.source-card-toggle::-webkit-details-marker {
  display: none;
}

.source-card-toggle::before {
  content: '▸ ';
  font-size: 0.65rem;
}

.source-card-details[open] .source-card-toggle::before {
  content: '▾ ';
}

.source-card-expanded {
  padding-top: 0.4rem;
}

.source-card-details .source-brands {
  margin-bottom: 0.35rem;
}

.source-card-details .source-notes {
  margin-bottom: 0;
}

/* Results Header */
.results-header {
  text-align: left;
  margin-bottom: 0.75rem;
}

.home-link {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: #1a2030;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.home-link:hover {
  color: #2c4a6e;
}

/* Search Summary */
.search-summary {
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.05s;
}

.search-summary h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #1a2030;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.location-label {
  font-size: 0.85rem;
  color: #6a5a4a;
}

/* Section Label */
.results-section {
  margin-bottom: 1.5rem;
}

.section-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8a7a6a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* Results List */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Live Result Card (real scraper results) ── */
.live-card {
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: fadeInUp 0.5s ease both;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.live-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.live-card:nth-child(1) { animation-delay: 0.05s; }
.live-card:nth-child(2) { animation-delay: 0.12s; }
.live-card:nth-child(3) { animation-delay: 0.19s; }

.live-card-image {
  width: 100px;
  min-height: 100px;
  flex-shrink: 0;
  background: #f5f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.live-card-image .no-image {
  font-size: 0.65rem;
  color: #b0a090;
  text-align: center;
}

.live-card-body {
  flex: 1;
  padding: 0.75rem 0.875rem;
  min-width: 0;
}

.source-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin-bottom: 0.3rem;
}

.source-badge--budgetmarine {
  background: #1a3a5c;
  color: #fff;
}

.source-badge--islandwaterworld {
  background: #0077b6;
  color: #fff;
}

.live-card-name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a2030;
  line-height: 1.3;
  margin: 0.15rem 0 0.35rem;
}

.live-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.meta-item {
  font-size: 0.65rem;
  color: #6a5a4a;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.meta-sku {
  font-family: monospace;
  color: #9a8a7a;
}

.live-card-stores {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.store-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.store-row-name {
  font-weight: 600;
  color: #3d2b1f;
  min-width: 0;
}

.store-row-price {
  color: #1a2030;
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}

.store-row .availability {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
}

/* Result Card */
.result-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 1rem 1.125rem;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: fadeInUp 0.5s ease both;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.15s; }
.result-card:nth-child(3) { animation-delay: 0.2s; }
.result-card:nth-child(4) { animation-delay: 0.25s; }
.result-card:nth-child(5) { animation-delay: 0.3s; }
.result-card:nth-child(6) { animation-delay: 0.35s; }
.result-card:nth-child(7) { animation-delay: 0.4s; }
.result-card:nth-child(8) { animation-delay: 0.45s; }

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.part-info {
  flex: 1;
  min-width: 0;
}

.part-brand {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2c4a6e;
}

.part-name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a2030;
  line-height: 1.3;
  margin: 0.15rem 0;
}

.part-sku {
  font-size: 0.7rem;
  color: #9a8a7a;
  font-family: monospace;
}

.part-price {
  text-align: right;
  flex-shrink: 0;
}

.price {
  display: block;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1a2030;
  line-height: 1;
}

.price-currency {
  font-size: 0.65rem;
  color: #9a8a7a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
}

.store-info {
  flex: 1;
  min-width: 0;
}

.store-name {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  color: #3d2b1f;
  line-height: 1.3;
}

.store-location {
  display: block;
  font-size: 0.75rem;
  color: #8a7a6a;
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Availability Badge */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}

.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.availability--in_stock {
  background: rgba(34, 139, 34, 0.1);
  color: #1a7a1a;
}
.availability--in_stock .avail-dot { background: #22a822; }

.availability--low_stock {
  background: rgba(200, 150, 0, 0.1);
  color: #8a6d00;
}
.availability--low_stock .avail-dot { background: #c89600; }

.availability--order {
  background: rgba(100, 100, 100, 0.08);
  color: #6a6a6a;
}
.availability--order .avail-dot { background: #999; }

/* Call Button */
.call-btn {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: #1a2744;
  color: #d4b96a;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: all 0.15s ease;
}

.call-btn:hover {
  background: #243a5e;
}

.action-buttons {
  display: flex;
  gap: 0.4rem;
}

.wa-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #25d366;
  color: #fff;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: all 0.15s ease;
}

.wa-btn:hover {
  background: #1fb855;
}

/* Search Again */
.search-again {
  margin-top: 1.5rem;
  text-align: center;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.4s;
}

.back-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: #2c4a6e;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Footer link */
.footer-link {
  display: inline-block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  color: #5a4a3a;
  text-decoration: none;
  margin-bottom: 0.5rem;
  margin-right: 1rem;
  border-bottom: 1px solid rgba(90, 74, 58, 0.3);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-link:hover {
  color: #2c4a6e;
  border-color: #2c4a6e;
}

/* Footer Brands (legacy — kept for backwards compat) */
.footer-brands {
  margin: 1.25rem 0 1rem;
}

.footer-brands-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
}

.footer-brand {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  color: #5a4a3a;
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: rgba(26, 39, 68, 0.05);
  border: 1px solid rgba(26, 39, 68, 0.08);
  transition: all 0.15s ease;
}

.footer-brand:hover {
  background: rgba(26, 39, 68, 0.1);
  color: #2c4a6e;
  border-color: rgba(44, 74, 110, 0.2);
}

/* Results footer */
.results-page footer {
  margin-top: 1.5rem;
}

/* === Directory Page === */
.directory-page {
  justify-content: flex-start;
  padding-top: 1.5rem;
  max-width: 520px;
}

.directory-intro {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.05s;
}

.directory-intro h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #1a2030;
  margin-bottom: 0.2rem;
}

/* Island Section */
.island-section {
  margin-bottom: 2rem;
  animation: fadeInUp 0.5s ease both;
}

.island-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid rgba(26, 32, 48, 0.12);
}

.island-flag {
  font-size: 1.4rem;
  line-height: 1;
}

.island-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a2030;
}

/* Area Group */
.area-group {
  margin-bottom: 1rem;
}

.area-name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7a6a5a;
  margin-bottom: 0.5rem;
  padding-left: 0.125rem;
}

/* Source Card */
.source-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.source-card--online {
  background: rgba(255, 255, 255, 0.7);
}

.source-top {
  margin-bottom: 0.5rem;
}

.source-identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Type Badge */
.source-type-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  width: fit-content;
}

.source-type--chandlery { background: #e8f0fe; color: #2c4a6e; }
.source-type--boatyard { background: #e8f5e8; color: #2a6a2a; }
.source-type--engines { background: #fef3e0; color: #7a5a1a; }
.source-type--sails_rigging { background: #f3e8fe; color: #5a2a7a; }
.source-type--electronics { background: #e0f5fe; color: #1a5a7a; }
.source-type--general { background: #f0ece8; color: #5a4a3a; }
.source-type--facebook_group { background: #e8eefe; color: #1a3a8a; }
.source-type--leboncoin { background: #fef0e0; color: #8a5a00; }

.source-name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a2030;
  line-height: 1.3;
}

.source-address {
  font-size: 0.78rem;
  color: #7a6a5a;
  line-height: 1.4;
}

/* Brands */
.source-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  background: rgba(26, 39, 68, 0.06);
  color: #4a4a4a;
  border-radius: 3px;
}

/* Notes */
.source-notes {
  font-size: 0.78rem;
  color: #6a5a4a;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* Contact Links */
.source-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.contact-link {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.contact-link--phone {
  background: #1a2744;
  color: #d4b96a;
}
.contact-link--phone:hover { background: #243a5e; }

.contact-link--whatsapp {
  background: #128c7e;
  color: #fff;
}
.contact-link--whatsapp:hover { background: #0ea390; }

.contact-link--email {
  background: rgba(0, 0, 0, 0.06);
  color: #3d2b1f;
}
.contact-link--email:hover { background: rgba(0, 0, 0, 0.1); }

.contact-link--web {
  background: rgba(44, 74, 110, 0.1);
  color: #2c4a6e;
}
.contact-link--web:hover { background: rgba(44, 74, 110, 0.18); }

.member-count {
  font-size: 0.7rem;
  color: #8a7a6a;
  font-style: italic;
}

/* Island Subheader (in search results "further away") */
.island-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  margin-top: 0.25rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a2030;
  border-bottom: 1px solid rgba(26, 32, 48, 0.1);
}

.distance-label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.7rem;
  color: #8a7a6a;
  letter-spacing: 0.02em;
}

/* Clickable source cards (facebook, leboncoin) */
a.source-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}

a.source-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* === Brands Page === */
.brands-page {
  max-width: 540px;
}

/* ── Category Filter Pills ── */
.brand-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.1s;
}

.brand-filter-tag {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  color: #5a4a3a;
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(26, 39, 68, 0.08);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.brand-filter-tag:hover {
  background: rgba(255, 255, 255, 0.75);
  color: #1a2744;
  border-color: rgba(44, 74, 110, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.brand-filter-tag.active {
  background: #1a2744;
  color: #d4b96a;
  border-color: #1a2744;
  box-shadow: 0 2px 10px rgba(26, 39, 68, 0.2);
}

/* ── Alphabetical Index ── */
.brands-alpha-list {
  margin-bottom: 2rem;
}

.brands-letter-group {
  display: flex;
  gap: 0;
  animation: fadeInUp 0.4s ease both;
}

.brands-letter-group:nth-child(odd) { animation-delay: 0.02s; }
.brands-letter-group:nth-child(even) { animation-delay: 0.06s; }

.brands-letter {
  flex-shrink: 0;
  width: 2.2rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: rgba(26, 39, 68, 0.12);
  text-align: center;
  padding-top: 0.5rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
  z-index: 3;
  user-select: none;
}

.brands-letter-items {
  flex: 1;
  min-width: 0;
  border-left: 1px solid rgba(26, 32, 48, 0.06);
  padding-left: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}

/* ── Brand Row ── */
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: all 0.15s ease;
  position: relative;
}

.brand-row:hover {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.brand-row:active {
  background: rgba(255, 255, 255, 0.5);
}

.brand-row-name {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.84rem;
  color: #2c1810;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.brand-row:hover .brand-row-name {
  color: #2c4a6e;
}

.brand-row-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.brand-row-cat {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.7rem;
  font-style: italic;
  color: #9a8a7a;
  letter-spacing: 0.01em;
}

.brand-row-cat + .brand-row-cat::before {
  content: '\b7\a0';
}

/* Store availability pips */
.brand-store-pip {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6);
}

.brand-store-pip--svb { background: #2c4a6e; }
.brand-store-pip--budget_marine { background: #c41e3a; }
.brand-store-pip--island_water_world { background: #1a8a5e; }


/* === Islands Page === */
.island-region-header {
  margin-bottom: 0.6rem;
  margin-top: 1.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 1.5px solid rgba(26, 32, 48, 0.1);
}

.island-region-header:first-child {
  margin-top: 0;
}

.region-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a7a6a;
}

.island-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.island-link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.15s ease;
}

.island-link-card:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.island-link-flag {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.island-link-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.island-link-name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: #1a2030;
}

.island-link-card:hover .island-link-name {
  color: #2c4a6e;
}

.island-link-count {
  font-size: 0.7rem;
  color: #8a7a6a;
}

.island-link-count--empty {
  font-style: italic;
  color: #b0a090;
}

/* Sub-island list */
.sub-island-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-left: 2.8rem;
  margin-top: -0.15rem;
  margin-bottom: 0.35rem;
}

.sub-island-link {
  font-size: 0.72rem;
  font-family: 'Inter', sans-serif;
  color: #6a5a4a;
  text-decoration: none;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(26, 39, 68, 0.06);
  transition: all 0.15s ease;
}

.sub-island-link:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #2c4a6e;
  border-color: rgba(44, 74, 110, 0.15);
}

.sub-island-name {
  font-weight: 500;
}

/* === Island Detail Page === */
.island-detail-section {
  margin-bottom: 1.75rem;
}

.island-detail-section .section-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8a7a6a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  animation: fadeInUp 0.5s ease both;
}

.empty-state-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #5a4a3a;
  margin-bottom: 0.4rem;
}

.empty-state-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: #8a7a6a;
}

/* === Responsive === */
@media (max-width: 360px) {
  .content {
    padding: 2rem 1rem 1.5rem;
  }

  .search-card {
    border-radius: 12px;
  }
}

@media (min-width: 768px) {
  .content {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
}

/* Safe area insets for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .content {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}
