/* Jerry's Jars — antique fruit jar collection site */

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

:root {
  --green-dark:   #1e3d1a;
  --green-mid:    #2d5c26;
  --aqua:         #3a8c78;
  --aqua-light:   #e8f5f2;
  --amber:        #b87a20;
  --cream:        #f7f3eb;
  --white:        #ffffff;
  --text:         #2c2c2c;
  --text-light:   #5a5a5a;
  --border:       #d8d0c0;
  --shadow:       0 2px 8px rgba(0,0,0,0.10);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.18);
  --radius:       8px;
}

html { scroll-behavior: smooth; }

h1, h2, h3 { font-family: 'Lora', Georgia, serif; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: var(--green-dark);
  color: var(--white);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title span {
  color: #a8d4a0;
}

nav {
  display: flex;
  gap: 0.25rem;
}

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}

nav a:hover, nav a.active {
  background: var(--green-mid);
  color: #fff;
}

/* ── Main ── */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Hero (home page) ── */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero h1 {
  font-size: 2.6rem;
  color: var(--green-dark);
  font-weight: normal;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding: 0.5rem 1.1rem 0.5rem 0.75rem;
  background: #c00;
  color: #fff;
  border-radius: 2rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(192,0,0,0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.doc-badge:hover {
  background: #a00;
  box-shadow: 0 4px 16px rgba(192,0,0,0.45);
  transform: translateY(-1px);
}

.doc-badge em {
  font-style: italic;
}

.doc-badge-play {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.22);
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding-left: 0.1rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.btn-primary {
  background: var(--green-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--white);
  color: var(--green-dark);
  border: 2px solid var(--green-dark);
}

/* ── Hero two-column layout ── */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-photo-wrap {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-photo {
  width: 100%;
  height: auto;
  display: block;
}

.hero {
  text-align: left;
  padding: 0;
}

.hero h1 { margin-bottom: 0.5rem; }
.hero .subtitle { margin-bottom: 2rem; }

.hero-actions { justify-content: flex-start; }

@media (max-width: 700px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }
  .hero { text-align: center; }
  .hero-actions { justify-content: center; }
}

/* ── Home feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.feature-card h2 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.feature-card p { color: var(--text-light); font-size: 0.95rem; }

.feature-card a { color: var(--aqua); }

/* ── Collection page ── */
main.collection-main {
  padding-top: 2rem;
}

.collection-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.collection-header-img {
  max-width: 640px;
  width: 100%;
  height: auto;
}

.collection-search-row {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.search-wrap {
  position: relative;
}

#search {
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
  width: 360px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

#search:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(58,140,120,0.15);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  font-size: 0.9rem;
}

.jar-count {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.jar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.jar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}

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

.jar-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--aqua-light);
}

.jar-card-body {
  padding: 0.75rem;
  flex: 1;
}

.jar-card-name {
  font-size: 0.88rem;
  color: var(--green-dark);
  font-weight: bold;
  line-height: 1.3;
}

.no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

/* ── Modal ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
}

.modal-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.modal-img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: var(--aqua-light);
  padding: 1.5rem;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.38);
  border: none;
  color: #fff;
  font-size: 2.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  z-index: 10;
  transition: background 0.15s;
}

.modal-nav:hover:not(:disabled) {
  background: rgba(0,0,0,0.62);
}

.modal-nav:disabled {
  opacity: 0.2;
  cursor: default;
}

.modal-prev { left: 0.6rem; }
.modal-next { right: 0.6rem; }

.modal-body {
  padding: 1.5rem;
}

.modal-name {
  font-size: 1.5rem;
  color: var(--green-dark);
  font-weight: normal;
  margin-bottom: 0.75rem;
}

.modal-desc {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.modal-close {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem 0;
}

.modal-close button {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.modal-close button:hover {
  background: var(--cream);
  color: var(--text);
}

/* ── About page ── */
.about-title {
  font-size: 2rem;
  color: var(--green-dark);
  font-weight: normal;
  margin-bottom: 1.5rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.about-content p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-content a { color: var(--aqua); }

.about-signature {
  margin-top: 2rem;
  font-style: italic;
  color: var(--text-light);
}

@media (max-width: 700px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Wanted page ── */
.wanted-v2 { max-width: 780px; }
.wanted-v2 h1 { font-size: 2rem; color: var(--green-dark); font-weight: normal; margin-bottom: 0.5rem; }
.wanted-v2-intro { color: var(--text-light); margin-bottom: 2.5rem; }
.wanted-v2-intro a { color: var(--aqua); }
.wanted-v2-block { margin-bottom: 2rem; }
.wanted-v2-block h2 {
  font-size: 1rem;
  font-weight: bold;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--green-dark);
}
.wanted-v2-table { display: flex; flex-direction: column; }
.wanted-v2-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  align-items: center;
}
.wanted-v2-row:nth-child(odd) { background: var(--aqua-light); border-radius: var(--radius); }
.wanted-v2-item { font-weight: bold; color: var(--green-dark); font-size: 0.95rem; }
.wanted-v2-desc { color: var(--text-light); font-size: 0.95rem; }
.wanted-v2-contact { margin-top: 2rem; }

/* ── For Sale / Wanted listing pages ── */
.listing-page { max-width: 900px; }

.listing-page-header {
  margin-bottom: 2rem;
}

.listing-page-header h1 {
  font-size: 2rem;
  color: var(--green-dark);
  font-weight: normal;
  margin-bottom: 0.5rem;
}

.listing-page-header p { color: var(--text-light); font-size: 1rem; }
.listing-page-header a { color: var(--aqua); }

.listing-section-title {
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 2rem 0 1rem;
}

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

.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.listing-card--sold {
  opacity: 0.6;
}

.listing-badge {
  display: inline-block;
  background: var(--aqua);
  color: #fff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 0 0 var(--radius) 0;
  position: absolute;
  top: 0;
  left: 0;
}

.listing-badge--sold {
  background: var(--text-light);
}

.listing-card-body {
  padding: 1.25rem 1.25rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
}

.listing-name {
  font-size: 1.05rem;
  color: var(--green-dark);
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.listing-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  font-style: italic;
}

.listing-desc {
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

.listing-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--amber);
}

.listing-price--sold {
  color: var(--text-light);
  font-style: italic;
  font-weight: normal;
  font-size: 0.9rem;
}

.listing-contact {
  display: inline-block;
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  transition: background 0.15s;
}

.listing-contact:hover { background: var(--green-mid); }

.listing-empty-note {
  margin-top: 1.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
  font-style: italic;
}

.listing-empty-note a { color: var(--aqua); }

/* ── Footer ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 1.25rem;
  font-size: 0.85rem;
  margin-top: auto;
}

footer a { color: rgba(255,255,255,0.75); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .header-inner { height: auto; padding: 0.75rem 0; flex-direction: column; gap: 0.5rem; }
  nav a { padding: 0.3rem 0.6rem; font-size: 0.88rem; }
  .hero h1 { font-size: 1.8rem; }
  .collection-header { align-items: center; }
  .collection-header-img { max-width: 100%; }
  .collection-search-row { justify-content: center; }
  #search { width: 100%; }
  .jar-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
  .modal-img { max-height: 240px; }
}
