:root {
  --green: #355e3b;
  --green-dark: #244129;
  --green-light: #a8c9ac;
  --green-deep: #2c4a32;
  --green-darkest: #16281c;
  --white: #ffffff;
  --white-dark: #eef3ee;
  --radius: 10px;
  --shadow: 0 4px 14px rgba(22, 40, 28, 0.12);
  --max-width: 1180px;

  /* Theme tokens (light) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef3ee;
  --heading: #16281c;
  --text: #1c2b1f;
  --muted: #4d5b50;
  --muted-2: #6f7d72;
  --border: #d8e2da;
}

/* Theme tokens (dark) */
:root[data-theme="dark"] {
  --bg: #121b16;
  --surface: #1e2b23;
  --surface-2: #18241d;
  --heading: #eef4ef;
  --text: #e5ece7;
  --muted: #aebbb1;
  --muted-2: #93a198;
  --border: #2e3c33;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height, 90px);
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  margin: 0 0 0.4em;
  color: var(--heading);
}

section {
  padding: 20px 0 40px;
}

.section-title {
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--green-dark);
  box-shadow: var(--shadow);
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--green-light);
  color: var(--white);
}

.btn-block {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

/* ---------- Header / Nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--green-darkest);
  color: var(--white);
  box-shadow: var(--shadow);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--green-light);
  text-decoration: none;
}

#business-name {
  text-align: center;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--green-light);
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--green-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: none;
  border: 2px solid var(--white);
  color: var(--green-light);
  padding: 3px 7px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}

#cart-count {
  background: var(--green);
  color: var(--green-darkest);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Dark mode toggle */
.theme-toggle {
  position: relative;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
  border: 2px solid var(--green-light);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle .theme-icon {
  font-size: 11px;
  line-height: 1;
  width: 22px;
  text-align: center;
  pointer-events: none;
}

.theme-toggle .theme-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-light);
  transition: left 0.22s ease;
  pointer-events: none;
}

:root[data-theme="dark"] .theme-toggle .theme-toggle-thumb {
  left: calc(100% - 22px);
}

/* Clickable copy email */
#contact-email {
  cursor: pointer;
}

#contact-email:hover {
  text-decoration: underline;
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(22, 40, 28, 0.82), rgba(44, 74, 50, 0.78)),
    url("../images/hero.jpg");
  background-size: cover;
  background-position: center 68%;
  color: var(--white);
  padding: 90px 0 70px;
  text-align: center;
}

.hero h1 {
  color: var(--green-light);
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero p {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  color: var(--white-dark);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  text-align: center;
}

.about-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: var(--shadow);
}

.about-card .icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* ---------- Team ---------- */
.team {
  background: var(--surface-2);
}

.team-intro {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}

.team-intro-photo {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transform: scale(1) translateY(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.team-intro-photo:hover {
  transform: scale(1.06) translateY(-8px);
}

.team-intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-intro-photo.no-image::before {
  content: "🐝";
  font-size: 3rem;
}

.team-intro-text .section-title,
.team-intro-text .section-subtitle {
  text-align: left;
  margin: 0 0 8px;
}

.team-intro-text .section-subtitle {
  margin-bottom: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.team-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  text-align: center;
}

.team-photo {
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: scale(1) translateY(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.team-photo:hover {
  transform: scale(1.06) translateY(-8px);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo.no-image::before {
  content: "🐝";
  font-size: 2.4rem;
}

.team-role {
  display: block;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.team-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Shop ---------- */
.shop {
  background: var(--surface-2);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 34px;
}

.tab {
  background: var(--surface);
  border: 2px solid transparent;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.tab.active,
.tab:hover {
  border-color: var(--green);
  color: var(--white);
  background: var(--green);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Shift the crop down so the jar lid isn't cut off */
.product-image img[src*="honey1lb"],
.product-image img[src*="honey3oz"] {
  object-position: center 30%;
}

.product-image .placeholder-icon {
  display: none;
  font-size: 2.6rem;
}

.product-image.no-image .placeholder-icon {
  display: block;
}


/* Sold out */
.sold-out-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  z-index: 2;
  background: #c0392b;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 22px;
  border-radius: 6px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.product-card.sold-out .product-image img {
  filter: grayscale(0.5) brightness(0.82);
}

.btn[disabled] {
  background: #9aa39c;
  color: #fff;
  cursor: not-allowed;
}

.btn[disabled]:hover {
  background: #9aa39c;
  box-shadow: none;
}

.product-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  font-weight: 700;
}

.product-desc {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
}

.product-price small {
  color: var(--muted-2);
  font-weight: 400;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-deep), var(--green-darkest));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-light);
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transform: scale(1) translateY(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-item:hover {
  transform: scale(1.06) translateY(-8px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item.no-image::before {
  content: "🐝 Add a hive photo here";
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  text-align: center;
}

.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
footer {
  background: var(--green-darkest);
  color: var(--white-dark);
  text-align: center;
  padding: 26px 0;
  font-size: 0.9rem;
}

/* ---------- Logo Lightbox ---------- */
.logo-lightbox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.logo-lightbox.open {
  display: flex;
}

.logo-lightbox img {
  width: min(420px, 88vw);
  height: min(420px, 88vw);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* Easter-egg discount reveal under the zoomed logo */
.logo-egg {
  background: var(--surface);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 14px 18px;
  text-align: center;
  width: min(340px, 88vw);
}

.logo-egg-title {
  font-weight: 700;
  color: var(--heading);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.logo-egg-code {
  display: inline-block;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  color: var(--white);
  background: var(--green);
  border-radius: var(--radius);
  padding: 6px 18px;
  cursor: pointer;
  user-select: none;
}

.logo-egg-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--muted-2);
  margin-top: 8px;
}

/* ---------- Image Lightbox ---------- */
.image-lightbox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
  display: none;
  max-width: 92vw;
  max-height: 90vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.image-lightbox.open {
  display: block;
}

.image-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(22, 40, 28, 0.65);
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-close:hover {
  background: rgba(22, 40, 28, 0.85);
}

.image-lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
}

/* ---------- Overlay ---------- */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

#overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Cart Drawer ---------- */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: var(--surface);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--green-darkest);
  color: var(--white);
}

.drawer-header button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}

#cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-empty {
  color: var(--muted-2);
  text-align: center;
  margin-top: 40px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-line-info {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.cart-line-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-line-qty button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--green);
  background: var(--surface);
  cursor: pointer;
  font-weight: bold;
}

.cart-line-total {
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

.drawer-footer {
  padding: 18px 20px;
  border-top: 2px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---------- Checkout Modal ---------- */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: min(480px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 70;
  display: none;
  padding: 24px 26px 28px;
}

.modal.open {
  display: block;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header button {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
}

.checkout-summary {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 0.95rem;
}

.checkout-summary strong {
  color: var(--heading);
}

/* Fulfillment (pickup / delivery / mail) */
.fulfillment {
  margin: 18px 0 6px;
}

.fulfillment-title {
  font-weight: 600;
  margin: 0 0 8px;
}

.fulfillment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
}

.fulfillment-option:hover {
  border-color: var(--green);
}

.fulfillment-option input {
  accent-color: var(--green);
  flex-shrink: 0;
}

.fulfillment-label {
  flex: 1;
}

.fulfillment-fee {
  font-weight: 700;
  white-space: nowrap;
}

.fulfillment-note {
  font-size: 0.78rem;
  color: var(--muted-2);
  margin: 4px 2px 0;
}

.ship-note {
  color: var(--muted-2);
  font-size: 0.85rem;
}

/* Discount code entry */
.discount-entry {
  margin: 14px 0 6px;
}

.discount-entry > label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

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

.discount-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  text-transform: uppercase;
}

.discount-row .btn {
  flex-shrink: 0;
}

.discount-msg {
  display: block;
  font-size: 0.82rem;
  margin-top: 6px;
  min-height: 1em;
}

.discount-msg.ok {
  color: var(--green);
  font-weight: 600;
}

.discount-msg.err {
  color: #c0392b;
}

:root[data-theme="dark"] .discount-msg.ok {
  color: var(--green-light);
}

.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.pay-paypal {
  background: #ffc439;
}

.payment-followup {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
}

.customer-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 10px 0 4px;
}

.customer-form input,
.customer-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}

.field-note {
  font-weight: 400;
  font-size: 0.85em;
  color: var(--muted-2);
}

.disclaimer {
  font-size: 0.78rem;
  color: var(--muted-2);
  margin-top: 14px;
}

/* ---------- Responsive ---------- */
/* Collapse the nav into the hamburger before "Our Beekeepers" wraps */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-darkest);
    flex-direction: column;
    padding: 10px 20px 20px;
    display: none;
    gap: 14px;
  }

  .nav-links.open {
    display: flex;
  }
}

@media (max-width: 800px) {
  .team-intro {
    flex-direction: column;
    text-align: center;
  }

  .team-intro-text .section-title,
  .team-intro-text .section-subtitle {
    text-align: center;
  }
}

@media (max-width: 480px) {
  section {
    padding: 16px 0 28px;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .drawer {
    width: 100%;
  }

  .brand {
    font-size: 1rem;
  }
}
