/* Harvest Bookstore — static book/category pages (app-like mobile) */
.hm-bs-static {
  background: #ffffff;
  color: #15212e;
  font-family: 'Nunito Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
.hm-bs-static *,
.hm-bs-static *::before,
.hm-bs-static *::after { box-sizing: border-box; }
.hm-bs-static a { color: inherit; text-decoration: none; }
.hm-bs-static .hm-mobile-bar a { color: #c4cdd6; text-decoration: none; }
.hm-bs-static .hm-mobile-bar a:active,
.hm-bs-static .hm-mobile-bar a.active { color: #e0673f; }

.hm-bs-static-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.hm-bs-static-crumb {
  font-size: 13px;
  color: #8a7f6a;
  margin-bottom: 20px;
  line-height: 1.5;
}
.hm-bs-static-crumb a { color: #cf4a26; font-weight: 600; }
.hm-bs-static-back-mobile {
  display: none;
  align-items: center;
  gap: 6px;
  color: #cf4a26;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  margin-bottom: 12px;
}

.hm-bs-book-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 40px;
  align-items: start;
}
.hm-bs-book-cover-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  position: sticky;
  top: 120px;
}
.hm-bs-book-cover-wrap { aspect-ratio: 3/4; position: relative; }
.hm-bs-book-cover-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
}
.hm-bs-book-cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #cf4a26;
  margin-bottom: 10px;
}
.hm-bs-book-title {
  font-family: 'Newsreader', serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 10px;
}
.hm-bs-book-author { font-size: 16px; color: #46515c; margin: 0 0 8px; }
.hm-bs-book-publisher { font-size: 14.5px; color: #5b6671; margin-bottom: 18px; }
.hm-bs-book-purchase {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hm-bs-book-price {
  font-family: 'Newsreader', serif;
  font-size: 34px;
  font-weight: 500;
}
.hm-bs-book-stock { font-size: 13px; font-weight: 600; color: #1f8a5b; }
.hm-bs-book-add {
  background: #15212e;
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 2px;
  cursor: pointer;
  min-height: 48px;
}
.hm-bs-book-add.is-added { background: #1f5c3a; }

.hm-bs-book-stack { margin-top: 28px; }
.hm-bs-impact-box {
  background: #e9f3ec;
  border: 1px solid #c5dece;
  border-radius: 3px;
  padding: 16px 18px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.6;
  color: #1f5c3a;
}
.hm-bs-section-title {
  font-family: 'Newsreader', serif;
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 14px;
}
.hm-bs-desc-teaser {
  display: none;
  font-size: 15px;
  line-height: 1.65;
  color: #3c4750;
  margin: 0 0 10px;
}
.hm-bs-desc-toggle {
  display: none;
  background: none;
  border: none;
  color: #cf4a26;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 0 0;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
}
.hm-bs-panel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(228, 220, 203, 0.85);
  box-shadow:
    0 1px 2px rgba(21, 33, 46, 0.04),
    0 6px 18px rgba(21, 33, 46, 0.06),
    0 18px 40px rgba(21, 33, 46, 0.05);
}
.hm-bs-book-desc {
  padding: 24px 26px;
  margin-bottom: 12px;
}
.hm-bs-book-desc p { margin: 0 0 14px; line-height: 1.72; color: #3c4750; }
.hm-bs-book-desc ul,
.hm-bs-book-desc ol { margin: 0 0 14px 1.2em; color: #3c4750; }
.hm-bs-book-desc li { margin-bottom: 6px; }

.hm-bs-details-panel { padding: 20px 22px; }
.hm-bs-book-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.hm-bs-meta-item {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fbf8f1;
  border: 1px solid #efe6d6;
}
.hm-bs-book-meta-grid dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a929b;
  margin-bottom: 6px;
}
.hm-bs-book-meta-grid dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #3c4750;
  word-break: break-word;
}

/* Related products — horizontal carousel */
.hm-bs-related { margin-top: 0; margin-bottom: 28px; }
.hm-bs-related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.hm-bs-related-hint {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a7f6a;
}
.hm-bs-related-carousel {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 4px 16px 12px;
}
.hm-bs-related-carousel::-webkit-scrollbar { display: none; }
.hm-bs-related-carousel::after {
  content: '';
  position: sticky;
  right: 0;
  top: 0;
  float: right;
  width: 40px;
  height: 100%;
  margin-left: -40px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #f5efe3 85%);
}
.hm-bs-related-track {
  display: flex;
  gap: 14px;
  width: max-content;
}
.hm-bs-product-card {
  flex: 0 0 min(72vw, 210px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(228, 220, 203, 0.9);
  box-shadow:
    0 1px 2px rgba(21, 33, 46, 0.05),
    0 8px 22px rgba(21, 33, 46, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hm-bs-product-card:active {
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(21, 33, 46, 0.1);
}
.hm-bs-product-cover {
  aspect-ratio: 3/4;
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #faf6ee 100%);
}
.hm-bs-product-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.hm-bs-product-body { padding: 12px 14px 16px; min-width: 0; }
.hm-bs-product-cat {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #cf4a26;
  margin-bottom: 6px;
}
.hm-bs-product-title {
  font-family: 'Newsreader', serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hm-bs-product-price {
  font-family: 'Newsreader', serif;
  font-size: 18px;
  font-weight: 500;
  color: #15212e;
}

.hm-book-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(228, 220, 203, 0.9);
  box-shadow: 0 1px 2px rgba(21, 33, 46, 0.05), 0 8px 22px rgba(21, 33, 46, 0.08);
  transition: transform 0.15s;
}
.hm-book-card:active { transform: scale(0.98); }

@media (min-width: 769px) {
  .hm-bs-related-hint { display: none; }
  .hm-bs-related-carousel { margin: 0; padding-left: 0; padding-right: 0; }
  .hm-bs-product-card { flex: 0 0 200px; }
}

.hm-bs-category-lead {
  font-size: 16px;
  line-height: 1.7;
  color: #3c4750;
  max-width: 760px;
  margin-bottom: 10px;
}
.hm-bs-category-count { font-size: 14px; color: #8a7f6a; margin-bottom: 28px; }
.hm-bs-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.hm-bs-static-footer {
  background: #0f1923;
  color: #aeb8c2;
  padding: 40px 24px;
  text-align: center;
  font-size: 13px;
}
.hm-bs-static-footer img { margin-bottom: 16px; }

.hm-bs-buy-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 95;
  background: #fbf8f1;
  border-top: 1px solid #d8cdb4;
  padding: 10px 16px;
  box-shadow: 0 -6px 20px rgba(21, 33, 46, 0.14);
}
.hm-bs-buy-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hm-bs-buy-bar-price {
  font-family: 'Newsreader', serif;
  font-size: 22px;
  font-weight: 500;
  flex-shrink: 0;
}
.hm-bs-buy-bar-meta { flex: 1; min-width: 0; }
.hm-bs-buy-bar-stock {
  font-size: 11px;
  font-weight: 600;
  color: #1f8a5b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-bs-buy-bar-btn {
  flex: 1;
  max-width: 180px;
  background: #cf4a26;
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 3px;
  cursor: pointer;
  min-height: 48px;
  white-space: nowrap;
}
.hm-bs-buy-bar-btn.is-added { background: #1f5c3a; }

body.hm-bs-static-page:has(.hm-bs-buy-bar) .hm-bs-floating-cart { display: none !important; }
/* Keep the WhatsApp button on the right; only lift it above the mobile buy bar. */
@media (max-width: 768px) {
  body.hm-bs-static-page:has(.hm-bs-buy-bar) .hm-whatsapp {
    right: max(16px, env(safe-area-inset-right));
    left: auto;
    bottom: calc(160px + env(safe-area-inset-bottom)) !important;
  }
}

/* Desktop: full description, no teaser; product sections before related */
@media (min-width: 769px) {
  .hm-bs-desc-teaser,
  .hm-bs-desc-toggle { display: none !important; }
  .hm-bs-desc-full { display: block !important; }

  /* Two-column PDP: cover sticky on the left, all content (price, impact,
     about, details, policies) flows in the right column. */
  .hm-bs-static-main:has(.hm-bs-book-grid) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 56px;
    align-items: start;
  }
  .hm-bs-book-grid { display: contents; }
  .hm-bs-static-main:has(.hm-bs-book-grid) .hm-bs-static-crumb {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .hm-bs-book-cover-card {
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: start;
  }
  .hm-bs-book-summary {
    grid-column: 2;
    grid-row: 2;
  }
  .hm-bs-book-stack {
    grid-column: 2;
    grid-row: 3;
  }

  .hm-bs-book-stack {
    display: flex;
    flex-direction: column;
  }
  .hm-bs-impact-box { order: 1; }
  .hm-bs-about-section { order: 2; }
  .hm-bs-details-section { order: 3; }
  .hm-bs-policies-section { order: 4; }
  .hm-bs-related { order: 5; margin-top: 12px; margin-bottom: 0; }
}

@media (max-width: 768px) {
  body.hm-bs-static-page {
    padding-bottom: calc(148px + env(safe-area-inset-bottom));
  }
  .hm-bs-static-crumb { display: none; }
  /* Full-bleed product hero — book detail pages only */
  .hm-bs-static-main:has(.hm-bs-book-grid) {
    padding: 0 0 24px;
  }
  .hm-bs-static-main:not(:has(.hm-bs-book-grid)) {
    padding: 12px 16px 24px;
  }
  .hm-bs-static-back-mobile {
    display: inline-flex;
    margin: 10px 16px 0;
  }
  .hm-bs-book-grid {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
  }
  .hm-bs-book-cover-card {
    position: static;
    max-width: none;
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    border-bottom: none;
    background: #fff;
  }
  .hm-bs-book-cover-wrap {
    aspect-ratio: 3 / 4;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
  }
  .hm-bs-book-cover-wrap img {
    padding: 0;
    object-fit: contain;
    object-position: center center;
  }
  .hm-bs-book-summary {
    min-width: 0;
    padding: 16px 16px 0;
  }
  .hm-bs-book-price-mobile {
    display: block;
    font-family: 'Newsreader', serif;
    font-size: 26px;
    font-weight: 500;
    margin: 10px 0 4px;
    color: #15212e;
  }
  .hm-bs-book-title {
    font-size: clamp(22px, 5.8vw, 28px);
    margin-bottom: 8px;
    line-height: 1.15;
  }
  .hm-bs-book-author { font-size: 14px; margin-bottom: 4px; }
  .hm-bs-book-publisher { font-size: 13px; margin-bottom: 0; }
  .hm-bs-book-cat { font-size: 10px; margin-bottom: 8px; }
  .hm-bs-book-purchase.hm-bs-book-purchase-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 16px;
  }
  .hm-bs-book-purchase-inline .hm-bs-book-price { font-size: 30px; }
  .hm-bs-book-purchase-inline .hm-bs-book-add {
    flex: 1 1 100%;
    margin-top: 6px;
  }
  .hm-bs-buy-bar { display: block; }

  .hm-bs-book-stack {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .hm-bs-impact-box {
    order: 1;
    display: block;
    padding: 12px 14px;
    font-size: 13px;
    margin: 16px 16px 20px;
  }
  .hm-bs-about-section { order: 2; margin: 0 16px 20px; }
  .hm-bs-details-section { order: 3; margin: 0 16px 20px; }
  .hm-bs-policies-section { order: 3.5; margin: 0 16px 20px; }
  .hm-bs-related {
    order: 4;
    margin: 4px 0 0;
    padding: 0 16px;
  }
  .hm-bs-related-hint::before {
    content: '← ';
    opacity: 0.65;
  }
  .hm-bs-product-card { flex: 0 0 min(44vw, 158px); }
  .hm-bs-details-panel { padding: 16px; }
  .hm-bs-book-meta-grid { grid-template-columns: 1fr; }

  .hm-bs-desc-teaser { display: none; }
  .hm-bs-desc-toggle { display: none; }
  .hm-bs-desc-full { display: block; margin-bottom: 0; padding: 16px; }
  .hm-bs-section-title { font-size: 20px; }

  .hm-bs-category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .hm-bs-category-grid .hm-bs-product-title { font-size: 14px; }
  .hm-bs-category-grid .hm-bs-product-price { font-size: 17px; }
  .hm-bs-static-footer { padding: 28px 16px 20px; }
}

.hm-bs-book-price-mobile { display: none; }

/* Policy accordions — standard ecommerce PDP */
.hm-bs-policies {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(228, 220, 203, 0.85);
  overflow: hidden;
}
.hm-bs-policy {
  border-bottom: 1px solid #e8e0d0;
}
.hm-bs-policy:last-child { border-bottom: none; }
.hm-bs-policy summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #15212e;
  cursor: pointer;
  list-style: none;
  min-height: 52px;
}
.hm-bs-policy summary::-webkit-details-marker { display: none; }
.hm-bs-policy summary::after {
  content: '';
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid #8a7f6a;
  border-bottom: 2px solid #8a7f6a;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -4px;
}
.hm-bs-policy[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.hm-bs-policy-body {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #3c4750;
}
.hm-bs-policy-body p { margin: 0 0 12px; }
.hm-bs-policy-body p:last-child { margin-bottom: 0; }
.hm-bs-policy-body ul { margin: 0 0 12px 1.1em; }
.hm-bs-policy-body li { margin-bottom: 6px; }
.hm-bs-policy-body a { color: #cf4a26; font-weight: 600; }

@media (min-width: 769px) {
  .hm-bs-policies-section { margin-top: 8px; }
}
