/*
Theme Name: Highbridge Custom
Theme URI: https://highbridgephotography.com
Author: High Bridge Photography
Author URI: https://highbridgephotography.com
Description: Custom "Charming Cottage" theme for High Bridge Photography — a warm, watercolor-inspired WordPress + WooCommerce theme built to support the Reverse Trust Funnel strategy (persistent gallery/shop CTA, hidden private galleries, and trust-building program pages).
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: highbridge-custom
*/


/* =========================================================
   1. DESIGN TOKENS — "Charming Cottage" palette & type
   Derived from Reference Materials/Architectural Art/Sample House Art
   ========================================================= */
:root {
  /* Warm parchment / cream backgrounds */
  --hb-cream: #FBF7EE;
  --hb-parchment: #F3ECDA;
  --hb-parchment-dark: #E8DEC4;

  /* Earthy / cottage accents pulled from the watercolor art */
  --hb-forest: #4E6350;       /* deep foliage green */
  --hb-sage: #8CA588;         /* soft leaf green */
  --hb-terracotta: #A9583F;   /* chimney brick / warm accent */
  --hb-dusty-blue: #93A9C4;   /* watercolor sky */
  --hb-lavender: #B6A6CE;     /* sunset cloud accent */
  --hb-gold: #C9A15A;         /* gilded accent, shared with Church Directory sub-style */

  /* Text & neutrals */
  --hb-charcoal: #3B362F;
  --hb-charcoal-soft: #5B5548;
  --hb-white: #FFFFFF;

  /* Typography */
  --hb-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --hb-font-script: 'Dancing Script', 'Segoe Script', cursive;
  --hb-font-body: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --hb-max-width: 1180px;
  --hb-radius: 14px;
  --hb-radius-lg: 28px;
  --hb-shadow: 0 10px 30px rgba(59, 54, 47, 0.12);
  --hb-shadow-soft: 0 4px 14px rgba(59, 54, 47, 0.08);
  --hb-header-height: 84px;
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--hb-cream);
  color: var(--hb-charcoal);
  font-family: var(--hb-font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--hb-terracotta); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--hb-forest); }

h1, h2, h3, h4, h5 {
  font-family: var(--hb-font-heading);
  color: var(--hb-charcoal);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.4rem; }

.hb-script {
  font-family: var(--hb-font-script);
  font-weight: 600;
  color: var(--hb-terracotta);
}

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }

.hb-container {
  max-width: var(--hb-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hb-section { padding: 72px 0; }
.hb-section--tight { padding: 40px 0; }
.hb-section--parchment { background: var(--hb-parchment); }

.hb-center { text-align: center; }

/* =========================================================
   3. BUTTONS / CTA
   ========================================================= */
.hb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--hb-font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 13px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.hb-btn:hover { transform: translateY(-1px); }

.hb-btn--primary {
  background: var(--hb-terracotta);
  color: var(--hb-white);
  box-shadow: var(--hb-shadow-soft);
}
.hb-btn--primary:hover { background: #8f4630; color: var(--hb-white); }

.hb-btn--outline {
  background: transparent;
  border-color: var(--hb-charcoal);
  color: var(--hb-charcoal);
}
.hb-btn--outline:hover { border-color: var(--hb-forest); color: var(--hb-forest); }

.hb-btn--gold {
  background: var(--hb-gold);
  color: var(--hb-white);
}
.hb-btn--gold:hover { background: #b18b45; color: var(--hb-white); }

/* =========================================================
   4. HEADER (sticky, persistent Reverse-Trust-Funnel CTA)
   ========================================================= */
.hb-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(251, 247, 238, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hb-parchment-dark);
  height: var(--hb-header-height);
  display: flex;
  align-items: center;
}

.hb-header__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  width: 100%;
}


.hb-logo {
  font-family: var(--hb-font-script);
  font-size: 1.9rem;
  color: var(--hb-terracotta);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.hb-logo span {
  display: block;
  font-family: var(--hb-font-body);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hb-charcoal-soft);
  font-weight: 700;
  margin-top: 7px;
}

.hb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 28px;
}

.hb-nav ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hb-nav a {
  color: var(--hb-charcoal);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.hb-nav a:hover { color: var(--hb-terracotta); }

/* Dropdown submenu (e.g. Home Art > Church Directory Program) */
.hb-nav ul li { position: relative; }

.hb-nav ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: var(--hb-white);
  box-shadow: var(--hb-shadow);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 240px;
  flex-direction: column;
  gap: 0;
  z-index: 20;
}
.hb-nav ul.sub-menu li { width: 100%; }
.hb-nav ul.sub-menu a {
  display: block;
  padding: 10px 20px;
  white-space: nowrap;
  font-weight: 600;
}
.hb-nav li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 2px;
  opacity: 0.6;
}
.hb-nav li.menu-item-has-children:hover > ul.sub-menu,
.hb-nav li.menu-item-has-children:focus-within > ul.sub-menu {
  display: flex;
}

.hb-header__cta { flex-shrink: 0; }


.hb-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.hb-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hamburger icon drawn with CSS (no image/icon-font dependency) */
.hb-nav-toggle__icon,
.hb-nav-toggle__icon::before,
.hb-nav-toggle__icon::after {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--hb-charcoal);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hb-nav-toggle__icon {
  position: relative;
}
.hb-nav-toggle__icon::before,
.hb-nav-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.hb-nav-toggle__icon::before { top: -8px; }
.hb-nav-toggle__icon::after { top: 8px; }

.hb-nav-toggle--open .hb-nav-toggle__icon { background: transparent; }
.hb-nav-toggle--open .hb-nav-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}
.hb-nav-toggle--open .hb-nav-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 780px) {
  .hb-header__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .hb-nav {
    justify-content: flex-end;
  }
  .hb-nav ul { display: none; }
  .hb-nav-toggle {
    display: inline-flex;
  }

  /* Mobile dropdown panel — shown when JS toggles .hb-nav--open */
  .hb-nav.hb-nav--open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--hb-white);
    box-shadow: var(--hb-shadow);
    z-index: 998;
    padding: 8px 0;
  }
  .hb-nav.hb-nav--open ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .hb-nav.hb-nav--open ul li { width: 100%; }
  .hb-nav.hb-nav--open ul a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid var(--hb-parchment-dark);
  }
  .hb-nav.hb-nav--open ul.sub-menu {
    display: flex;
    position: static;
    box-shadow: none;
    background: var(--hb-parchment);
    padding: 0;
    margin-top: 0;
  }
  .hb-nav.hb-nav--open ul.sub-menu a { padding-left: 40px; }
}


/* =========================================================
   5. HERO
   ========================================================= */
.hb-hero {
  position: relative;
  overflow: hidden;
  /* Rotated watercolor meadow image (same asset used for the footer)
     sits at the very bottom of the stack, washed out ~50% with a flat
     white overlay (CSS background layers don't support true per-layer
     opacity, so a semi-transparent white wash simulates it) — then the
     original blue-to-cream hero gradient is painted on top of it via
     ::before below, now with partial transparency so it reads as a
     tinted overlay rather than fully hiding the image beneath it. */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)),
    url('assets/images/hero-bg.png');
  background-repeat: no-repeat, no-repeat;
  background-position: center, center -70px;
  background-size: cover, cover;
}
.hb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(147, 169, 196, 0.78) 0%, rgba(251, 247, 238, 0.92) 100%);
}
/* Soft fade at the very bottom of the hero into the page's cream
   background, instead of a hard cutoff line where the section ends.
   Fade zone widened (starts at 30% instead of 78%) so the image's own
   bottom edge/border is fully obscured well before the section ends. */
.hb-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, transparent 30%, var(--hb-cream) 100%);
  pointer-events: none;
}
.hb-hero__grid {
  position: relative;
  z-index: 2;
}

/* Generic content-layer helper for any .hb-hero section whose content
   isn't using the 2-column .hb-hero__grid layout (e.g. a single
   centered text block, like the Home & Architectural Art gallery
   hero) — ensures the text still sits above the ::before/::after
   tint + fade pseudo-elements instead of being obscured by them. */
.hb-hero__content-layer {
  position: relative;
  z-index: 2;
}

.hb-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 64px 0;
}

@media (max-width: 900px) {
  .hb-hero__grid { grid-template-columns: 1fr; padding: 40px 0; text-align: center; }
}

.hb-hero__eyebrow {
  font-family: var(--hb-font-script);
  font-size: 1.5rem;
  color: var(--hb-forest);
  margin-bottom: 4px;
  display: block;
}

.hb-hero__tagline {
  font-size: 1.15rem;
  color: var(--hb-charcoal-soft);
  max-width: 480px;
}

.hb-hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .hb-hero__tagline { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hb-hero__actions { justify-content: center; }
}

.hb-hero__image-wrap {
  position: relative;
  border-radius: var(--hb-radius-lg);
  overflow: hidden;
  box-shadow: var(--hb-shadow);
  border: 10px solid var(--hb-white);
  transform: rotate(1.2deg);
}

.hb-hero__image-wrap img { width: 100%; }

/* =========================================================
   6. FLOURISH DIVIDER (SVG, lightweight — no raster scans)
   ========================================================= */
.hb-flourish {
  display: flex;
  justify-content: center;
  margin: 0 auto 28px;
  opacity: 0.8;
}
.hb-flourish svg { width: 220px; height: 22px; }


/* =========================================================
   7. FEATURED PRODUCTS GRID
   ========================================================= */
.hb-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .hb-products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hb-products-grid { grid-template-columns: 1fr; }
}

.hb-product-card {
  background: var(--hb-white);
  border-radius: var(--hb-radius);
  overflow: hidden;
  box-shadow: var(--hb-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.hb-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hb-shadow);
}

.hb-product-card__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--hb-parchment);
}
.hb-product-card__image img { width: 100%; height: 100%; object-fit: cover; }

.hb-product-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.hb-product-card__title {
  font-family: var(--hb-font-heading);
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.hb-product-card__title a { color: var(--hb-charcoal); }
.hb-product-card__title a:hover { color: var(--hb-terracotta); }

.hb-product-card__price {
  color: var(--hb-forest);
  font-weight: 700;
  margin-bottom: 14px;
}

.hb-product-card__cta { margin-top: auto; }

/* =========================================================
   8. TRUST-BUILDING TEASER STRIP
   ========================================================= */
.hb-trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 780px) {
  .hb-trust-strip { grid-template-columns: 1fr; }
}

.hb-trust-card {
  background: var(--hb-white);
  border-radius: var(--hb-radius);
  padding: 32px;
  box-shadow: var(--hb-shadow-soft);
  border-top: 4px solid var(--hb-gold);
}
.hb-trust-card--church { border-top-color: var(--hb-gold); }
.hb-trust-card--family { border-top-color: var(--hb-dusty-blue); }

.hb-trust-card h3 { margin-bottom: 8px; }
.hb-trust-card p { color: var(--hb-charcoal-soft); margin-bottom: 18px; }

/* =========================================================
   9. FOOTER
   ========================================================= */
.hb-footer {
  background-color: #998ECD;
  background-image:
    linear-gradient(rgba(153, 142, 205, 0.75), rgba(153, 142, 205, 0.75)),
    url('assets/images/footer-bg.png');
  background-repeat: no-repeat, no-repeat;
  background-position: bottom center, bottom center;
  background-size: cover, cover;
  border-top: 4px double var(--hb-charcoal);
  color: #000000;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.85), 0 0 2px rgba(255, 255, 255, 0.9);
  padding: 56px 0 28px;
}

.hb-footer a { color: #000000; font-weight: 700; }
.hb-footer a:hover { color: var(--hb-charcoal-soft); }

.hb-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

@media (max-width: 780px) {
  .hb-footer__grid { grid-template-columns: 1fr; text-align: center; }
}

.hb-footer__logo {
  font-family: var(--hb-font-script);
  font-size: 1.6rem;
  color: var(--hb-charcoal);
  margin-bottom: 8px;
  display: block;
}

.hb-footer h4 {
  font-family: var(--hb-font-body);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hb-charcoal);
  margin-bottom: 14px;
}

.hb-footer ul { list-style: none; padding: 0; margin: 0; }
.hb-footer li { margin-bottom: 8px; }

.hb-footer__bottom {
  border-top: 1px solid rgba(59, 54, 47, 0.25);
  padding-top: 20px;
  font-size: 0.85rem;
  text-align: center;
  color: var(--hb-charcoal-soft);
}

/* =========================================================
   10. WOOCOMMERCE LIGHT OVERRIDES
   ========================================================= */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price { color: var(--hb-forest); }

.woocommerce a.button, .woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce input.button {
  background: #4CAF50 !important;
  color: var(--hb-white) !important;
  border-radius: 999px !important;
  border: none !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: #43A047 !important;
}

/* Space out the "View cart" link that WooCommerce inserts next to the
   Add to Cart button after a successful AJAX add. */
.woocommerce a.added_to_cart.wc-forward {
  margin-left: 12px;
  display: inline-block;
}

.woocommerce-page main,
.woocommerce main {
  padding: 48px 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* Shop loop (custom product gallery) — force sane responsive columns
   regardless of the WooCommerce "columns" setting, so the gallery never
   overflows or squeezes products unreadably small on phones. */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 28px !important;
  margin: 0 0 24px !important;
}
.woocommerce ul.products::before,
.woocommerce-page ul.products::before {
  display: none !important;
  content: none !important;
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
}
@media (max-width: 780px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Single product page — stack image + summary on tablets/phones */
.woocommerce div.product div.images,
.woocommerce div.product div.summary {
  width: 100%;
  float: none;
}
@media (max-width: 780px) {
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce div.product div.summary {
    margin-top: 24px;
  }
}

/* Quantity input + Add to Cart — comfortable, full-width tap targets on mobile */
.woocommerce div.product form.cart .quantity {
  margin-right: 10px;
}
.woocommerce div.product form.cart .quantity input.qty {
  width: 64px;
  padding: 10px;
  font-size: 1rem;
}
@media (max-width: 600px) {
  .woocommerce div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .woocommerce div.product form.cart .quantity {
    margin-right: 0;
  }
  .woocommerce div.product form.cart .button {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* Cart page — allow the cart table to scroll horizontally instead of
   overflowing/breaking the page layout on narrow screens. */
.woocommerce-cart table.cart,
.woocommerce-cart .shop_table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.woocommerce-cart table.cart thead,
.woocommerce-cart table.cart tbody,
.woocommerce-cart table.cart tr {
  min-width: 560px;
}
.woocommerce-cart table.cart td.product-thumbnail img {
  width: 64px;
}
.woocommerce-cart .cart-collaterals .cart_totals {
  width: 100% !important;
  float: none !important;
}

/* Checkout — stack billing/order-review columns on narrow screens */
@media (max-width: 900px) {
  .woocommerce-checkout .col2-set,
  .woocommerce-checkout #customer_details {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce-checkout .col-1,
  .woocommerce-checkout .col-2 {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce-checkout #order_review,
  .woocommerce-checkout #order_review_heading {
    width: 100% !important;
    float: none !important;
    margin-top: 24px;
  }
}

/* Prevent long product titles / prices from forcing horizontal scroll */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price {
  word-wrap: break-word;
}


/* =========================================================
   11. CHURCH DIRECTORY PROGRAM — classical, cream & gold, script
   Recreates the legacy program's damask/cross-on-hill motifs with
   lightweight CSS + SVG only (no heavy raster scans). See SITE-PLAN.md §3B.
   ========================================================= */
.hb-church-damask {
  background-color: var(--hb-parchment);
  background-image:
    radial-gradient(circle at 20px 20px, rgba(201,161,90,0.14) 2px, transparent 2.5px),
    radial-gradient(circle at 60px 60px, rgba(201,161,90,0.14) 2px, transparent 2.5px);
  background-size: 80px 80px;
}

.hb-church-hero {
  position: relative;
  text-align: center;
  padding: 90px 0 70px;
  border-bottom: 1px solid var(--hb-parchment-dark);
}

/* Photo hero variant — full-bleed legacy marketing photo with a
   transparent color gradient over it. Compact padding keeps the hero
   tight (less blank space) while the gradient (rather than a flat/heavy
   overlay) lets the photo read through clearly at the top and settle
   into a warm, legible tint behind the script headline lower down. */
.hb-church-hero--photo {
  padding: 56px 0 46px;
  background-size: cover;
  background-position: center 30%;
  border-bottom: none;
  color: var(--hb-white);
}
.hb-church-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(59,54,47,0.28) 0%, rgba(59,54,47,0.55) 55%, rgba(59,54,47,0.78) 100%);
}

.hb-church-hero__content {
  position: relative;
  z-index: 2;
}
.hb-church-hero--photo h1 { color: var(--hb-white); }
.hb-church-hero--photo .hb-church-hero__tagline { color: rgba(255,255,255,0.92); }
.hb-church-hero--photo .hb-church-hero__trustline { color: rgba(255,255,255,0.8); }
.hb-btn--outline-light {
  border-color: var(--hb-white);
  color: var(--hb-white);
}
.hb-btn--outline-light:hover {
  background: var(--hb-white);
  color: var(--hb-charcoal);
  border-color: var(--hb-white);
}

.hb-church-hero__eyebrow {
  display: block;
  font-family: var(--hb-font-script);
  font-size: 1.6rem;
  color: var(--hb-gold);
  margin-bottom: 6px;
}
.hb-church-hero--photo .hb-church-hero__eyebrow { color: #F6E9C9; }


.hb-church-hero h1 {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* Round 12: casual, larger title treatment for the Program Overview hub
   hero — swaps the formal serif heading font for the friendlier body
   sans-serif, at a larger size, so "Church Directory Program" reads as
   a warm, approachable headline rather than a stiff formal title. */
.hb-church-hero__title--casual {
  font-family: var(--hb-font-body);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4rem);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* Round 13: elegant script treatment for the main Church Directory
   Program hero — used with the .hb-church-hero--photo background-image
   variant so the flowing script reads beautifully over the photo +
   transparent gradient rather than the flat parchment background. */
.hb-church-hero__title--script {
  font-family: var(--hb-font-script);
  font-weight: 700;
  font-size: clamp(3.2rem, 8vw, 5.6rem);
  line-height: 1.1;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  /* Round 16: true offset drop-shadow (rather than just a soft blur) so
     the script headline visibly lifts off the photo background, layered
     with the original soft blur underneath for legibility at all sizes. */
  text-shadow: 3px 4px 6px rgba(0, 0, 0, 0.55), 0 2px 18px rgba(0, 0, 0, 0.35);
}

/* Round 16: shared script-font treatment for all section-level H2
   headings on the Church Directory Program page — matches the
   "Let's Get Started" eyebrow script styling, at a much larger size
   than the theme's default h2. */
.hb-church-section-heading {
  font-family: var(--hb-font-script);
  font-weight: 700;
  color: var(--hb-terracotta);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.15;
}



/* Round 12: relocated "request info" section at the bottom of the
   Church Directory Program page — reuses the hero photo/actions/
   trustline classes so no separate photo/button styling is needed. */
.hb-church-hero__request-info {
  padding: 64px 0 80px;
  text-align: center;
  border-top: 1px solid var(--hb-parchment-dark);
  background-color: var(--hb-parchment);
  background-image:
    radial-gradient(circle at 12% 22%, rgba(201, 161, 90, 0.18) 2px, transparent 2.5px),
    radial-gradient(circle at 82% 18%, rgba(201, 161, 90, 0.14) 2px, transparent 2.5px),
    radial-gradient(circle at 30% 82%, rgba(78, 99, 80, 0.12) 2px, transparent 2.5px),
    radial-gradient(circle at 90% 75%, rgba(201, 161, 90, 0.16) 2px, transparent 2.5px);
  background-size: 90px 90px, 110px 110px, 100px 100px, 70px 70px;
}
.hb-church-hero__request-eyebrow {
  display: block;
  font-size: 2rem;
  margin-bottom: 4px;
}
.hb-church-hero__photo--bottom {
  max-width: 760px;
}
.hb-church-hero__photo--bottom img {
  aspect-ratio: auto;
  object-fit: contain;
}


.hb-church-hero__tagline {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  color: var(--hb-charcoal-soft);
}

.hb-church-hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hb-church-hero__trustline {
  font-size: 0.9rem;
  color: var(--hb-charcoal-soft);
  letter-spacing: 0.04em;
}

/* Small, contained content photo within a (non-full-bleed) text hero —
   intentionally modest so it supports the headline instead of
   overpowering it. */
.hb-church-hero__photo {
  max-width: 420px;
  margin: 8px auto 28px;
  border-radius: var(--hb-radius);
  overflow: hidden;
  box-shadow: var(--hb-shadow-soft);
  border: 6px solid var(--hb-white);
}
.hb-church-hero__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
@media (max-width: 600px) {
  .hb-church-hero__photo { max-width: 100%; }
}

.hb-cross-icon { width: 64px; height: 64px; margin: 0 auto 20px; }

.hb-church-about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 780px) {
  .hb-church-about { grid-template-columns: 1fr; text-align: center; }
}

.hb-church-about__media img {
  border-radius: var(--hb-radius-lg);
  box-shadow: var(--hb-shadow);
  border: 10px solid var(--hb-white);
  transform: rotate(-1deg);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.hb-church-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .hb-church-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hb-church-features { grid-template-columns: 1fr; }
}

.hb-church-feature {
  display: block;
  background: var(--hb-white);
  border: 1px solid var(--hb-parchment-dark);
  border-radius: var(--hb-radius);
  overflow: hidden;
  text-align: center;
  color: inherit;
  box-shadow: var(--hb-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hb-church-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--hb-shadow);
}
.hb-church-feature__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 3px solid var(--hb-gold);
  background: var(--hb-parchment);
}
.hb-church-feature__media img { width: 100%; height: 100%; object-fit: cover; }
.hb-church-feature__body { padding: 24px 24px 28px; }
.hb-church-feature h3 { font-size: 1.15rem; margin-bottom: 10px; }
.hb-church-feature p { color: var(--hb-charcoal-soft); font-size: 0.95rem; margin-bottom: 0; }

/* Great Directory Designs — image + list layout */
.hb-church-designs {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 780px) {
  .hb-church-designs { grid-template-columns: 1fr; }
}
.hb-church-designs__media img {
  border-radius: var(--hb-radius);
  box-shadow: var(--hb-shadow);
  border: 8px solid var(--hb-white);
  transform: rotate(1.2deg);
}

/* Why Choose section — image + checklist layout */
.hb-church-why-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hb-church-why-grid { grid-template-columns: 1fr; }
}
.hb-church-why-media img {
  border-radius: var(--hb-radius);
  box-shadow: var(--hb-shadow-soft);
}
.hb-church-why-section .hb-church-why {
  margin: 24px 0 0;
  max-width: none;
}


.hb-church-lists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 32px;
}
@media (max-width: 780px) {
  .hb-church-lists { grid-template-columns: 1fr; }
}
.hb-church-lists h4 {
  font-family: var(--hb-font-heading);
  font-size: 1.1rem;
  color: var(--hb-gold);
  margin-bottom: 12px;
}
.hb-church-lists ul { padding-left: 1.2em; margin-bottom: 0; }
.hb-church-lists li { margin-bottom: 8px; color: var(--hb-charcoal-soft); }

.hb-church-why {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
  max-width: 880px;
  margin: 40px auto 0;
}
@media (max-width: 700px) {
  .hb-church-why { grid-template-columns: 1fr; }
}
.hb-church-why__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.hb-church-why__item .hb-check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hb-gold);
  color: var(--hb-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
}
.hb-church-why__item p { margin-bottom: 0; color: var(--hb-charcoal-soft); }

.hb-church-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .hb-church-testimonials { grid-template-columns: 1fr; }
}

.hb-testimonial {
  background: var(--hb-white);
  border-radius: var(--hb-radius);
  padding: 30px 26px;
  box-shadow: var(--hb-shadow-soft);
  position: relative;
}
.hb-testimonial::before {
  content: '\201C';
  font-family: var(--hb-font-heading);
  font-size: 3.2rem;
  color: var(--hb-gold);
  opacity: 0.5;
  line-height: 1;
  display: block;
  margin-bottom: -6px;
}
.hb-testimonial p {
  font-style: italic;
  color: var(--hb-charcoal-soft);
  margin-bottom: 16px;
}
.hb-testimonial cite {
  font-style: normal;
  font-weight: 700;
  font-family: var(--hb-font-body);
  font-size: 0.9rem;
  color: var(--hb-forest);
}

.hb-church-cta {
  background: var(--hb-gold);
  color: var(--hb-white);
  text-align: center;
  padding: 64px 0;
}
.hb-church-cta h2 { color: var(--hb-white); }
.hb-church-cta p { color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto 28px; }
.hb-church-cta .hb-btn--outline {
  border-color: var(--hb-white);
  color: var(--hb-white);
}
.hb-church-cta .hb-btn--outline:hover {
  background: var(--hb-white);
  color: var(--hb-gold);
  border-color: var(--hb-white);
}
.hb-church-cta__phone {
  margin-top: 8px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
}
.hb-church-cta__phone a { color: var(--hb-white); font-weight: 700; }

/* Back-to-top text link (inline, non-floating) styling — used within
   colored sections such as the Church Directory CTA band. */
.hb-back-to-top-link {
  color: var(--hb-white);
  font-weight: 700;
  text-decoration: underline;
}
.hb-back-to-top-link:hover { color: rgba(255,255,255,0.8); }

/* Floating "View Your Custom Home Art Gallery" CTA — visible on every
   page except the visitor's own gallery destination (see footer.php). */
.hb-floating-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 600;
  box-shadow: var(--hb-shadow);
  background: #4CAF50 !important;
  border-color: #4CAF50 !important;
  color: #111111 !important;
}
.hb-floating-cta:hover {
  background: #43A047 !important;
  border-color: #43A047 !important;
  color: #111111 !important;
}

@media (max-width: 600px) {
  .hb-floating-cta {
    right: 16px;
    bottom: 16px;
    padding: 11px 20px;
    font-size: 0.85rem;
  }
}


/* Church Directory detail sub-pages */
.hb-church-hero--sub {
  padding: 100px 0 70px;
}
.hb-church-hero--sub .hb-church-hero__trustline a {
  color: rgba(255,255,255,0.85);
}
.hb-church-hero--sub .hb-church-hero__trustline a:hover {
  color: var(--hb-white);
}

.hb-church-detail-body {
  max-width: 760px;
  margin: 0 auto;
}
.hb-church-detail-body h2 { margin-top: 1.4em; }
.hb-church-detail-body ul { margin-bottom: 1.4em; }

.hb-church-detail-media {
  margin: 0 auto 32px;
  max-width: 560px;
}
.hb-church-detail-media img {
  border-radius: var(--hb-radius-lg);
  box-shadow: var(--hb-shadow);
  border: 10px solid var(--hb-white);
}

.hb-church-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .hb-church-detail-nav { flex-direction: column; }
}

/* Persistent header CTA — green with black text, visible on every page */
.hb-btn.hb-header__cta {
  background: #4CAF50;
  color: #111111;
  box-shadow: var(--hb-shadow-soft);
}
.hb-btn.hb-header__cta:hover {
  background: #43A047;
  color: #111111;
}

/* =========================================================
   12. CONTACT US FORM
   ========================================================= */
.hb-contact-form {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hb-contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hb-contact-form__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hb-contact-form__row label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--hb-charcoal);
}

.hb-contact-form__row input,
.hb-contact-form__row textarea {
  font-family: var(--hb-font-body);
  font-size: 1rem;
  color: var(--hb-charcoal);
  background: var(--hb-white);
  border: 1px solid var(--hb-parchment-dark);
  border-radius: 10px;
  padding: 12px 16px;
  resize: vertical;
}

.hb-contact-form__row input:focus,
.hb-contact-form__row textarea:focus {
  outline: none;
  border-color: var(--hb-gold);
  box-shadow: 0 0 0 3px rgba(201, 161, 90, 0.2);
}

.hb-contact-form .hb-btn {
  align-self: flex-start;
}

.hb-contact-notice {
  max-width: 620px;
  margin: 0 auto 28px;
  padding: 18px 22px;
  border-radius: var(--hb-radius);
  font-weight: 600;
}

.hb-contact-notice ul {
  margin: 0;
  padding-left: 1.2em;
}

.hb-contact-notice--success {
  background: rgba(140, 165, 136, 0.18);
  color: var(--hb-forest);
  border: 1px solid var(--hb-sage);
}

.hb-contact-notice--error {
  background: rgba(169, 88, 63, 0.1);
  color: var(--hb-terracotta);
  border: 1px solid var(--hb-terracotta);
}

/* =========================================================
   13. FAMILY PHOTOGRAPHY — masonry-style populated gallery
   ========================================================= */
.hb-family-hero {
  padding: 64px 0 16px;
}
.hb-family-hero__tagline {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--hb-charcoal-soft);
}
.hb-family-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .hb-family-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
}
@media (max-width: 600px) {
  .hb-family-gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
}
.hb-family-gallery__item {
  border-radius: var(--hb-radius);
  overflow: hidden;
  box-shadow: var(--hb-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hb-family-gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--hb-shadow);
}
.hb-family-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Featured items span two columns and two rows for a livelier,
   genuinely "populated" gallery feel rather than a flat uniform grid. */
.hb-family-gallery__item--featured {
  grid-column: span 2;
  grid-row: span 2;
}
@media (max-width: 600px) {
  .hb-family-gallery__item--featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* =========================================================
   14. HOME & ARCHITECTURAL ART — custom photo-collage gallery
   (page-home-art-gallery.php). Desktop shows a playful, slightly
   rotated overlapping-photo collage; on tablets/phones the rotation
   is flattened and the grid collapses to fewer columns so nothing
   overlaps, clips, or requires horizontal scrolling.
   ========================================================= */
.hb-art-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  margin-top: 16px;
}
@media (max-width: 900px) {
  .hb-art-gallery { grid-template-columns: repeat(2, 1fr); gap: 24px 20px; }
}
@media (max-width: 480px) {
  .hb-art-gallery { grid-template-columns: 1fr; gap: 20px; }
}

.hb-art-photo {
  border-radius: var(--hb-radius);
  overflow: hidden;
  box-shadow: var(--hb-shadow-soft);
  background: var(--hb-white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hb-art-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.hb-art-photo:hover {
  transform: translateY(-4px) rotate(0deg) !important;
  box-shadow: var(--hb-shadow);
  z-index: 2;
}

/* Slight alternating rotation for a hand-placed, collage feel — desktop only. */
.hb-art-photo--r1 { transform: rotate(-2deg); }
.hb-art-photo--r2 { transform: rotate(1.5deg); }
.hb-art-photo--r3 { transform: rotate(-1deg); }
.hb-art-photo--r4 { transform: rotate(2deg); }
.hb-art-photo--r5 { transform: rotate(-1.5deg); }
.hb-art-photo--r6 { transform: rotate(1deg); }

/* Flatten rotation on touch/narrow screens — avoids overlapping edges
   and makes the gallery easy to scan in a single column. */
@media (max-width: 900px) {
  .hb-art-photo--r1,
  .hb-art-photo--r2,
  .hb-art-photo--r3,
  .hb-art-photo--r4,
  .hb-art-photo--r5,
  .hb-art-photo--r6 {
    transform: none;
  }
}

/* =========================================================
   15. WOOCOMMERCE — PRODUCT/CART REFINEMENTS (round 2 feedback)
   ========================================================= */

/* Simpler, smaller product titles (shop loop + single product) —
   sans-serif body font instead of the decorative heading serif. */
.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce div.product .product_title {
  font-family: var(--hb-font-body) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.35 !important;
}

/* Hide the "Category: ..." (posted_in) line on single product pages —
   PHP already swaps in a category-free meta block, this is a safety-net
   in case any other template still renders it. */
.woocommerce div.product p.posted_in,
.woocommerce div.product span.posted_in {
  display: none !important;
}

/* Larger product thumbnail images in the Cart block (both the desktop
   table layout and the stacked mobile/tablet grid layout). */
.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image,
table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image {
  width: 140px !important;
}
.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row,
.is-medium table.wc-block-cart-items .wc-block-cart-items__row,
.is-mobile table.wc-block-cart-items .wc-block-cart-items__row,
.is-small table.wc-block-cart-items .wc-block-cart-items__row {
  grid-template-columns: 140px 1fr !important;
}
.wc-block-cart-item__image img {
  width: 100% !important;
  max-width: 140px;
  border-radius: 8px;
}
/* Checkout order-summary line item thumbnails — match the larger size. */
.wc-block-components-order-summary-item__image img {
  width: 100% !important;
  max-width: 96px;
  border-radius: 8px;
}

/* -----------------------------------------------------------
   NOTE: The "High Bridge Photo" watermark is now baked directly into
   the actual image files themselves (server-side PHP/GD processing in
   functions.php — see the "EMBEDDED (BAKED-IN) IMAGE WATERMARKING"
   section), so even a directly downloaded/right-clicked image carries
   the watermark. The previous CSS-only ::after overlay (visual-only,
   easily bypassed by opening the raw image URL) has been removed to
   avoid a doubled/redundant watermark appearance.
   ----------------------------------------------------------- */


/* -----------------------------------------------------------
   "Item added to cart" popup toast (shown on single product pages
   right before returning to the shop/gallery page).
   ----------------------------------------------------------- */
.hb-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--hb-white);
  color: var(--hb-charcoal);
  border-radius: 999px;
  padding: 14px 26px;
  box-shadow: var(--hb-shadow);
  border: 1px solid var(--hb-parchment-dark);
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.hb-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.hb-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4CAF50;
  color: var(--hb-white);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* -----------------------------------------------------------
   Round 4 feedback: simplify the single-product Add to Cart form —
   hide the visible quantity number box entirely (a hidden quantity=1
   input still exists in the markup and still submits normally), so
   customers just see the button on its own.
   ----------------------------------------------------------- */
.woocommerce div.product form.cart .quantity {
  display: none !important;
}
.woocommerce div.product form.cart .single_add_to_cart_button {
  margin-left: 0;
}

/* -----------------------------------------------------------
   Round 4 feedback: plain product description (no tab-panel chrome) —
   printed directly below the product summary via
   hb_wc_plain_description() in functions.php, replacing the removed
   WooCommerce "Description" tab.
   ----------------------------------------------------------- */
.hb-plain-description {
  max-width: 760px;
  margin: 8px auto 0;
  padding: 0 24px;
  color: var(--hb-charcoal-soft);
  font-size: 1rem;
  line-height: 1.7;
}
.hb-plain-description p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   16. GALLERY PAGE (page-gallery.php) — customer-facing private
   gallery: photo + per-photo priced product tiles.

   NOTE: this section intentionally defines its OWN grid/tile classes
   (.hb-gallery-grid / .hb-gallery-item) rather than reusing the
   unrelated Home & Architectural Art gallery's .hb-art-gallery /
   .hb-art-photo classes (section 14). Those classes set
   `overflow: hidden` and a fixed `aspect-ratio: 4/3` on the image,
   which was visually clipping/hiding the product+price+"Add this to
   my order" button block rendered below each photo on this page even
   though the markup was present in the HTML.
   ========================================================= */
.hb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 20px 16px;
  margin-top: 16px;
}
@media (max-width: 480px) {
  .hb-gallery-grid { gap: 12px 10px; }
}

.hb-gallery-item {
  border-radius: var(--hb-radius);
  overflow: visible;
  box-shadow: var(--hb-shadow-soft);
  background: var(--hb-white);
}
/* Round 28 fix: previously forced a 1:1 aspect-ratio + object-fit:cover
   crop here, which chopped off parts of these commissioned house-
   portrait artworks. The photo tile now shows the FULL uncropped image
   at its natural aspect ratio, simply scaled down to fit the grid
   column's width (the .hb-gallery-item container grows/shrinks in
   height to match, since no fixed aspect-ratio is imposed) - clicking
   it still opens the full-size image in the .hb-lightbox popup below,
   via assets/js/gallery.js. */
.hb-gallery-item > img.hb-gallery-photo {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  border-radius: var(--hb-radius) var(--hb-radius) 0 0;
}



.hb-gallery-item__products {

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px;
  background: var(--hb-white);
}

.hb-gallery-product {
  border: 1px solid var(--hb-parchment-dark);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hb-gallery-product__mockup {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hb-parchment);
  border-radius: 8px;
  overflow: hidden;
}
.hb-gallery-product__mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb-gallery-product__pending {
  font-size: 0.75rem;
  color: var(--hb-charcoal-soft);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Round 25: small loading spinner shown alongside the "Loading Image"
   text while a product tile's mockup is still being generated
   on-demand (assets/js/gallery.js's regenerateMockup()). Reused by
   .hb-gallery-product__pending and .hb-product-modal__pending. */
.hb-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--hb-parchment-dark);
  border-top-color: var(--hb-terracotta);
  border-radius: 50%;
  animation: hb-spin 0.8s linear infinite;
}
@keyframes hb-spin {
  to {
    transform: rotate(360deg);
  }
}

.hb-gallery-product__label {
  font-weight: 700;
  font-size: 0.85rem;
}
.hb-gallery-product__price {
  color: var(--hb-forest);
  font-weight: 700;
  font-size: 0.9rem;
}
.hb-gallery-product .hb-btn {
  padding: 8px 14px;
  font-size: 0.8rem;
  justify-content: center;
}

/* Add-to-cart button + "View Cart" link sit side by side (appended by
   assets/js/gallery.js right after a successful add), matching the
   existing WooCommerce .added_to_cart.wc-forward pattern used
   elsewhere on the site. */
.hb-gallery-product__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.hb-gallery-product__actions .hb-btn {
  flex-shrink: 0;
}
.hb-gallery-view-cart {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--hb-forest);
  text-decoration: underline;
  white-space: nowrap;
}
.hb-gallery-view-cart:hover {
  color: var(--hb-terracotta);
}

/* Lightbox popup — click a gallery thumbnail to see the full-size
   photo. Markup lives once in page-gallery.php (#hb-lightbox); opened/
   closed via assets/js/gallery.js. */
.hb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 18, 15, 0.88);
}
.hb-lightbox.hb-lightbox--visible {
  display: flex;
}
.hb-lightbox__img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}
.hb-lightbox__close {
  position: absolute;
  top: 20px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--hb-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hb-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* -----------------------------------------------------------
   Round 23: product tiles grouped by product_key (a product offered in
   multiple sizes/variants shows as ONE clickable "cover" tile) + the
   product detail modal (#hb-product-modal) opened on click.
   ----------------------------------------------------------- */
.hb-gallery-product-group__cover {
  border: 1px solid var(--hb-parchment-dark);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  background: var(--hb-white);
  cursor: pointer;
  font-family: inherit;
}
.hb-gallery-product-group__cover:hover {
  border-color: var(--hb-terracotta);
}
.hb-gallery-product-group__mockup {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hb-parchment);
  border-radius: 8px;
  overflow: hidden;
}
.hb-gallery-product-group__mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb-gallery-product-group__label {
  font-weight: 700;
  font-size: 0.85rem;
}
.hb-gallery-product-group__price {
  color: var(--hb-forest);
  font-weight: 700;
  font-size: 0.9rem;
}
.hb-gallery-product-group__view-details {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hb-terracotta);
  text-decoration: underline;
}

/* Product detail modal. */
.hb-product-modal {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 18, 15, 0.88);
  overflow-y: auto;
}
.hb-product-modal.hb-product-modal--visible {
  display: flex;
}
.hb-product-modal__dialog {
  position: relative;
  background: var(--hb-white);
  border-radius: var(--hb-radius);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
@media (max-width: 720px) {
  .hb-product-modal__dialog {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }
}
.hb-product-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--hb-parchment);
  color: var(--hb-charcoal);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.hb-product-modal__close:hover {
  background: var(--hb-parchment-dark);
}
.hb-product-modal__main-image {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hb-parchment);
  border-radius: var(--hb-radius);
  overflow: hidden;
}
.hb-product-modal__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb-product-modal__pending {
  font-size: 0.9rem;
  color: var(--hb-charcoal-soft);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
/* Round 25 bug fix: the browser's own UA stylesheet rule for the
   `hidden` attribute (`[hidden] { display: none }`) has LOWER CSS
   specificity than a class selector like `.hb-product-modal__pending`,
   so the `display: flex` rule above was winning and showing the
   "Loading Image" placeholder even while it carried the `hidden`
   attribute (once an image had actually finished loading). This
   explicit `[hidden]` override (attribute selector chained onto the
   same class, so its specificity is now higher) restores correct
   hide/show behavior. */
.hb-product-modal__pending[hidden] {
  display: none;
}
.hb-product-modal__thumbs-label {
  font-family: var(--hb-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hb-charcoal);
  margin: 12px 0 8px;
}
.hb-product-modal__thumbs-label[hidden] {
  display: none;
}
.hb-product-modal__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.hb-product-modal__thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 4px;
  background: var(--hb-parchment);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 76px;
  font-family: inherit;
}
.hb-product-modal__thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}
.hb-product-modal__thumb-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  font-size: 0.9rem;
  color: var(--hb-charcoal-soft);
}
.hb-product-modal__thumb-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
}
.hb-product-modal__thumb--active {
  border-color: var(--hb-terracotta);
}
.hb-product-modal__info {
  display: flex;
  flex-direction: column;
}
.hb-product-modal__title {
  margin: 0 0 4px;
}
.hb-product-modal__variant-label {
  font-weight: 700;
  color: var(--hb-charcoal-soft);
  margin: 0 0 8px;
}
.hb-product-modal__price {
  color: var(--hb-forest);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 12px;
}
.hb-product-modal__description {
  color: var(--hb-charcoal-soft);
  line-height: 1.6;
  margin: 0 0 20px;
}
.hb-product-modal__shipping {
  border-top: 1px solid var(--hb-parchment-dark);
  padding-top: 16px;
  margin-bottom: 20px;
}
.hb-product-modal__shipping h3 {
  font-size: 1rem;
  margin: 0 0 10px;
}
.hb-product-modal__shipping-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hb-product-modal__shipping-zip {
  flex: 1 1 140px;
  padding: 8px 12px;
  border: 1px solid var(--hb-parchment-dark);
  border-radius: 6px;
  font-size: 0.9rem;
}
.hb-product-modal__shipping-country {
  padding: 8px 10px;
  border: 1px solid var(--hb-parchment-dark);
  border-radius: 6px;
  font-size: 0.9rem;
}
.hb-product-modal__shipping-form .hb-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
}
.hb-product-modal__shipping-result {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--hb-charcoal);
}
.hb-product-modal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}











