@import url('https://fonts.googleapis.com/css2?family=Domine:wght@600;700&family=Arimo:wght@400;600&display=swap');

:root {
  --navy: #103948;
  --navy-soft: rgba(16, 57, 72, 0.75);
  --navy-faint: rgba(16, 57, 72, 0.08);
  --bg: #fcfcfc;
  --bg-2: #ebeced;
  --border: rgba(16, 57, 72, 0.15);
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy-soft);
  font-family: Arimo, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--navy); }

h1, h2, h3 {
  font-family: Domine, Georgia, serif;
  color: var(--navy);
  margin: 0 0 0.5em;
}

.site-header {
  background: var(--navy);
  color: #fff;
  padding: 22px 24px;
}

.site-header a { color: #fff; text-decoration: none; }
.site-header h1 { color: #fff; font-size: 26px; margin: 0; }
.site-header p { margin: 4px 0 0; opacity: 0.85; font-size: 14px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filters { display: flex; gap: 10px; flex-wrap: wrap; }

select, input[type=text], input[type=email], input[type=tel], textarea {
  font-family: Arimo, Arial, sans-serif;
  font-size: 15px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
}

textarea { width: 100%; resize: vertical; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 41px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
}

.btn:hover { background: #0b2833; }
.btn.secondary { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn.danger { background: #8a2f2f; }

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}

.card:hover { box-shadow: 0 6px 18px rgba(16,57,72,0.12); transform: translateY(-2px); }

.card .thumb {
  aspect-ratio: 4/3;
  background: var(--bg-2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-soft); font-size: 13px;
}

.card .body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.card .title { font-weight: 600; font-size: 16px; }
.card .price { font-weight: 700; color: var(--navy); }
.card .meta { font-size: 13px; opacity: 0.7; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  background: var(--navy-faint);
  color: var(--navy);
  border-radius: 41px;
  padding: 3px 10px;
  width: fit-content;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--navy-soft);
}

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.detail img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.detail .no-photo {
  aspect-ratio: 4/3; background: var(--bg-2); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: var(--navy-soft);
}

.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 16px 0; }
.detail dt { font-weight: 600; }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-field .hint { font-size: 13px; opacity: 0.7; margin-top: 4px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; }

form.stacked { max-width: 640px; }

.flash {
  background: var(--navy-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.flash.error { background: #fbeaea; border-color: #d98c8c; color: #8a2f2f; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px;
}
table.admin-table th { background: var(--bg-2); }

.pill-row { display: flex; gap: 8px; }

footer.site-footer {
  text-align: center; padding: 24px; font-size: 13px; color: var(--navy-soft);
}

@media (max-width: 720px) {
  .detail { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Header with BWCAA logo (security/logo update)
   ------------------------------------------------------------------ */
.site-header {
  background: #fff;
  color: var(--navy);
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(16, 57, 72, 0.06);
}
.site-header a { color: var(--navy); text-decoration: none; }
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-header .brand { display: block; line-height: 0; flex-shrink: 0; }
.site-header .logo { height: 72px; width: auto; }
.brand-text {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  padding-left: 20px;
}
.site-header .site-title {
  font-family: Domine, Georgia, serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
}
.site-header .tagline { font-size: 14px; color: var(--navy-soft); margin-top: 2px; }
.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 15px;
}
.header-nav a:not(.btn):hover { text-decoration: underline; }
.header-nav .btn { color: #fff; }
.header-nav .who { font-size: 13px; color: var(--navy-soft); }

@media (max-width: 720px) {
  .site-header { padding: 12px 16px; }
  .site-header .logo { height: 56px; }
  .brand-text { padding-left: 14px; }
  .site-header .site-title { font-size: 21px; }
  .site-header .tagline { display: none; }
  .header-nav { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* Spam trap: hidden from people, visible to bots. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.hint { font-size: 13px; opacity: 0.75; }
.detail .badge + .badge { margin-left: 6px; }
table.admin-table td small a { color: inherit; }
@media (max-width: 720px) {
  table.admin-table { display: block; overflow-x: auto; }
}

/* Intro block on the Post page */
.post-intro { max-width: 640px; margin-bottom: 28px; }
.post-intro h2 { font-size: 30px; margin-bottom: 6px; }
.post-intro-sub { font-weight: 600; color: var(--navy); font-size: 17px; margin: 0 0 14px; }

/* ------------------------------------------------------------------
   Member accounts update
   ------------------------------------------------------------------ */
input[type=password] {
  font-family: Arimo, Arial, sans-serif;
  font-size: 15px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
}
input:disabled { background: var(--bg-2); color: var(--navy-soft); }
.form-field.checkbox label, label.inline { font-weight: normal; display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.form-field.checkbox input, label.inline input { width: auto; margin-top: 4px; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.secondary.small { background: #fff; }
form.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.live { background: #e3f1e6; color: #1f5d2e; }
.header-nav .count {
  display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 10px;
  background: #8a2f2f; color: #fff; font-size: 12px; text-align: center; margin-left: 2px;
}
.flash form { margin: 0; }

/* ------------------------------------------------------------------
   Rotating breeder banner ads (above the footer)
   ------------------------------------------------------------------ */
.sponsors {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 28px 20px 18px;
  text-align: center;
}
.sponsors-title {
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy-soft);
  margin: 0 0 14px;
}
.sponsor-rotator {
  display: grid;
  max-width: 613px;
  margin: 0 auto;
  aspect-ratio: 613 / 123;
}
.sponsor-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.sponsor-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .8s ease;
}
.sponsor-slide a, .sponsor-slide img { display: block; width: 100%; height: auto; }
.sponsor-slide img { border-radius: 4px; }
.sponsors-cta { margin: 12px 0 0; font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .sponsor-slide, .sponsor-slide.is-active { transition: none; }
}

/* ------------------------------------------------------------------
   Multiple photos per ad (photo gallery update)
   ------------------------------------------------------------------ */
.gallery-main { position: relative; }
.gallery-main .gallery-link { display: block; }
.detail .gallery-main img {
  display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain;
  background: var(--bg-2);
}
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.9); color: var(--navy);
  font-size: 28px; line-height: 38px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.gallery-nav:hover, .gallery-nav:focus-visible { background: #fff; }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-count {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(16,57,72,0.8); color: #fff; font-size: 12px;
  padding: 2px 8px; border-radius: 41px;
}
.gallery-thumbs {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px;
}
.gallery-thumb {
  padding: 0; border: 2px solid transparent; border-radius: 6px;
  background: none; cursor: pointer; overflow: hidden;
}
.gallery-thumb.is-active { border-color: var(--navy); }
.detail .gallery-thumb img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 0; border-radius: 4px;
}

.photo-manage, .photo-preview {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 8px 0 14px;
}
.photo-preview:empty { display: none; }
.photo-tile img {
  display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
}
.photo-tile label.inline { margin-top: 4px; font-size: 14px; }
.photo-msg:empty { display: none; }

.terms-note { font-size: 14px; margin: 18px 0 12px; }

@media (max-width: 720px) {
  .gallery-thumbs { grid-template-columns: repeat(6, 1fr); gap: 6px; }
}
