/* ── Storefront sections ──────────────────────────────────────
 * Single source of truth for storefront CSS, used by:
 *   - staticSiteGenerator.generateStorefrontCss() (deployed sites)
 *   - landing-builder.ejs <link> tag (anonymous / route preview)
 *   - previewRenderer.js → storefrontPreviewCss() (authenticated builder iframe)
 * CSP-compliant: no inline styles, all hooks via classes / data attributes.
 */
.section-store-header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 100;
}
.section-store-header.sticky { position: sticky; top: 0; }
.store-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.store-header-logo { font-weight: 700; font-size: 1.25rem; color: var(--text-color, #1f2937); }
.store-header-logo-img { max-height: 40px; width: auto; display: block; }
.store-header-nav { display: flex; gap: 1.5rem; align-items: center; }
.store-header-link {
  color: var(--text-color, #1f2937);
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.15s;
}
.store-header-link:hover { opacity: 0.7; }
/* Bring-your-own community link — a gentle accent pill so it stands out as an
   invitation among the plain nav links without shouting. */
.store-header-community-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--primary-color, #0F766E);
  border: 1px solid color-mix(in oklab, var(--primary-color, #0F766E) 35%, transparent);
  background: color-mix(in oklab, var(--primary-color, #0F766E) 8%, transparent);
}
.store-header-community-link:hover {
  opacity: 1;
  background: color-mix(in oklab, var(--primary-color, #0F766E) 16%, transparent);
}
.store-header-community-link::before { content: "\2022"; font-size: 1.1em; line-height: 0; }
.store-header-cart {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text-color, #1f2937);
  padding: 0.5rem;
}
.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary-color, #0F766E);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.cart-count.empty { display: none; }

/* Store header mobile hamburger ---------------------------------- */
.store-nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  z-index: 101;
}
.store-nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-color, #1f2937);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.store-nav-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.store-nav-hamburger.is-active span:nth-child(2) { opacity: 0; }
.store-nav-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buyer self-service "My Account" dropdown — auto-injected into storeHeader.
   Built on <details>/<summary> so it works without JS. */
.store-header-account { position: relative; }
.store-header-account > .store-header-account-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.store-header-account > .store-header-account-toggle::-webkit-details-marker { display: none; }
.store-header-account > .store-header-account-toggle::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.25rem;
  opacity: 0.7;
  transition: transform 0.15s;
}
.store-header-account[open] > .store-header-account-toggle::after {
  transform: rotate(-135deg);
}
.store-header-account-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 12rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.35rem 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
}
html[dir="rtl"] .store-header-account-menu { right: auto; left: 0; }
.store-header-account-link {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  color: var(--text-color, #1f2937);
  white-space: nowrap;
}
.store-header-account-link:hover { background: rgba(0,0,0,0.04); }

@media (max-width: 768px) {
  .store-nav-hamburger { display: flex; }
  .store-header-inner {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    position: relative;
    flex-wrap: nowrap;
  }
  .store-header-logo-img { max-height: 32px; }
  .store-header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 0.25rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    gap: 0;
    z-index: 100;
  }
  .store-header-nav.is-open { display: flex; }
  .store-header-link {
    display: block;
    padding: 0.85rem 0.25rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  /* In the mobile hamburger menu, render the account dropdown as a
     flat expandable group so it doesn't pop out from under the panel. */
  .store-header-account { width: 100%; }
  .store-header-account > .store-header-account-toggle {
    width: 100%;
    padding: 0.85rem 0.25rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .store-header-account-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0.25rem 0.5rem;
    min-width: 0;
    background: transparent;
  }
  .store-header-account-link {
    padding: 0.65rem 0.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .store-header-account-link:last-child { border-bottom: none; }
  .store-header-nav .store-header-link:last-child { border-bottom: none; }
}

/* ── storeHeader layout variants ──────────────────────────────
 * Default `standard` (logo left, nav, cart right) is the base flex row above
 * and needs no extra rule. Sticky + showCart keep working in every variant.
 * Each desktop variant collapses back to the standard hamburger row at the
 * 768px breakpoint (handled by the mobile block above + the resets below).
 * CSP-safe — classes only. */

/* centered — logo and nav stacked and centered, cart anchored to the row top. */
@media (min-width: 769px) {
  .section-store-header.layout-centered .store-header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    position: relative;
  }
  .section-store-header.layout-centered .store-header-nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  .section-store-header.layout-centered .store-header-cart {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.5rem;
  }

  /* split — logo left, nav as a column below it, cart far right. */
  .section-store-header.layout-split .store-header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 0.5rem;
  }
  .section-store-header.layout-split .store-header-logo { order: 0; }
  .section-store-header.layout-split .store-header-cart { order: 1; margin-inline-start: auto; }
  .section-store-header.layout-split .store-header-nav {
    order: 2;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  /* minimal — logo only; nav hidden, hamburger always visible on desktop. */
  .section-store-header.layout-minimal .store-header-nav { display: none; }
  .section-store-header.layout-minimal .store-nav-hamburger { display: flex; }
  .section-store-header.layout-minimal .store-header-nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 0.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    gap: 0;
    z-index: 100;
  }
}

.section-store-hero {
  position: relative;
  padding: 5rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color, #0F766E) 0%, var(--secondary-color, #0369A1) 100%);
  color: #fff;
  overflow: hidden;
}
.section-store-hero.has-bg { background: #000; }
.store-hero-bg { position: absolute; inset: 0; }
.store-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.store-hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.store-hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.store-hero-headline { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; color: #fff; }
.store-hero-subheadline { font-size: 1.2rem; opacity: 0.95; margin-bottom: 2rem; }
.store-hero-cta {
  display: inline-block;
  background: #fff;
  color: var(--primary-color, #0F766E);
  padding: 1rem 2.5rem;
  font-weight: 700;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: transform 0.15s;
}
.store-hero-cta:hover { transform: translateY(-2px); }

.section-product-grid { padding: 4rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.product-grid-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.product-grid-subtitle { text-align: center; color: #6b7280; margin-bottom: 2.5rem; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.section-product-grid.cols-2 .product-grid { grid-template-columns: repeat(2, 1fr); }
.section-product-grid.cols-4 .product-grid { grid-template-columns: repeat(4, 1fr); }
/* Single product: one centered, width-constrained card instead of a lone item
   stranded in a multi-column track. */
.section-product-grid.cols-1 .product-grid { grid-template-columns: minmax(0, 380px); justify-content: center; }
@media (max-width: 768px) {
  .section-product-grid:not(.cols-1) .product-grid,
  .section-product-grid.cols-2 .product-grid,
  .section-product-grid.cols-4 .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (max-width: 480px) {
  .section-product-grid:not(.cols-1) .product-grid { grid-template-columns: 1fr; }
}
.product-grid-empty { text-align: center; color: #9ca3af; padding: 3rem 0; }
.product-grid-no-match {
  text-align: center;
  color: var(--text-color, #1f2937);
  opacity: 0.62;
  padding: 3rem 0 1rem;
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.product-grid-no-match[hidden] { display: none !important; }
.product-grid-empty[hidden] { display: none !important; }

/* Built-in productGrid filter row — designed to feel native to the
   storefront, not bolted on. A single quiet line above the grid:
   the collection select on the left, the search box on the right,
   joined by a hairline rule. Picks up the seller's brand color via
   `--primary-color` for focus and underline accents so the row
   re-themes per store. On narrow viewports the rule disappears
   and the two controls stack into a single column. */
.product-grid-filters {
  --pgf-fg: var(--text-color, #1f2937);
  --pgf-accent: var(--primary-color, #0F766E);
  --pgf-rule: color-mix(in srgb, var(--pgf-fg) 14%, transparent);
  --pgf-rule-strong: color-mix(in srgb, var(--pgf-fg) 32%, transparent);

  /* Flex-based two-up: collection select on the left (narrower), search
     on the right (wider). When only one child renders (no collections),
     it spans the full row. */
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  margin: 0 auto 2.5rem;
  max-width: 720px;
  padding: 0.15rem 0;
  border-top: 1px solid var(--pgf-rule);
  border-bottom: 1px solid var(--pgf-rule);
}

.product-grid-filter-label {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 0;
}
.product-grid-filter-label:has(.product-grid-filter-collection) { flex-basis: 220px; }
.product-grid-filter-label:has(.product-grid-filter-search) { flex-basis: 0; flex-grow: 1.2; }
.product-grid-filter-collection,
.product-grid-filter-search {
  width: 100%;
  font: inherit;
  font-size: 0.94rem;
  letter-spacing: 0.005em;
  padding: 0.85rem 0.5rem 0.85rem 1rem;
  border: 0;
  background: transparent;
  color: var(--pgf-fg);
  line-height: 1.3;
  appearance: none;
}
.product-grid-filter-collection {
  /* Custom caret using a CSS-only chevron so we don't ship an SVG.
     Sits flush-right; rotates 180° when the select is :focus-within. */
  padding-right: 2.4rem;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) calc(50% + 1px),
    calc(100% - 0.65rem) calc(50% + 1px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  opacity: 0.96;
  cursor: pointer;
}
.product-grid-filter-search {
  /* Leading magnifier glyph rendered as a CSS background so we don't
     have to inject an <svg> from the renderer. Inherits currentColor
     via a tinted SVG data URI; opacity dims it to feel decorative. */
  padding-left: 2.6rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 1rem center;
  background-size: 1.05rem 1.05rem;
}
.product-grid-filter-collection:focus,
.product-grid-filter-search:focus {
  outline: 0;
}
/* Focus moves a 2px accent underline behind the field — a quiet, theme-
   colored bookmark that doesn't compete with the products below. */
.product-grid-filter-label::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.35rem;
  height: 2px;
  background: var(--pgf-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.product-grid-filter-label:focus-within::after { transform: scaleX(1); }
.product-grid-filter-collection::placeholder,
.product-grid-filter-search::placeholder {
  color: var(--pgf-fg);
  opacity: 0.45;
}
/* Clear-on-X for the search input — relies on the browser-native
   widget; just gives it a subtle hover treatment. */
.product-grid-filter-search::-webkit-search-cancel-button {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 45%, currentColor 45% 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, currentColor 45% 55%, transparent 55%);
  opacity: 0.4;
  cursor: pointer;
}
.product-grid-filter-search::-webkit-search-cancel-button:hover { opacity: 0.85; }

/* The 1px column in the grid becomes the vertical hairline. */
.product-grid-filters > .product-grid-filter-label:first-child + .product-grid-filter-label {
  border-left: 1px solid var(--pgf-rule);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
@media (max-width: 540px) {
  .product-grid-filters {
    grid-template-columns: 1fr;
    border-top: 0;
    border-bottom: 0;
    margin-bottom: 2rem;
  }
  .product-grid-filter-label + .product-grid-filter-label {
    border-left: 0 !important;
    border-top: 1px solid var(--pgf-rule);
  }
  .product-grid-filter-collection,
  .product-grid-filter-search {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-top: 1px solid var(--pgf-rule);
  }
  .product-grid-filter-label:first-child .product-grid-filter-collection { border-top: 1px solid var(--pgf-rule); }
}
@media (prefers-color-scheme: dark) {
  .product-grid-filter-search {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>");
  }
}

/* ── productGrid layout variants ──────────────────────────────
 * Default `grid` (stacked cards in N columns) needs no extra rule; it is the
 * base `.product-grid` behavior above and composes with `.cols-N`.
 * Variants below compose alongside `.cols-N` (cols-N sets the column count for
 * `grid`/`masonry`/`featured-first`; `list` ignores it). CSP-safe — classes
 * only, no inline styles. */

/* list — horizontal rows: square image left, name/price/button flow right. */
.section-product-grid.layout-list .product-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.section-product-grid.layout-list .product-card {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 1.5rem;
}
.section-product-grid.layout-list .product-card-link {
  flex: 0 0 200px;
  align-self: stretch;
}
.section-product-grid.layout-list .product-card-media {
  height: 100%;
  min-height: 160px;
}
.section-product-grid.layout-list .product-card-name {
  flex: 1 1 12rem;
  align-self: center;
  padding: 1.25rem 1.25rem 0.25rem 0;
}
.section-product-grid.layout-list .product-card-price {
  flex: 1 1 100%;
  padding: 0 1.25rem 0.75rem 0;
}
.section-product-grid.layout-list .product-card-add {
  margin: 0 0 1.25rem;
  align-self: flex-start;
}
@media (max-width: 600px) {
  .section-product-grid.layout-list .product-card {
    flex-direction: column;
  }
  .section-product-grid.layout-list .product-card-link {
    flex: 1 1 auto;
    width: 100%;
  }
  .section-product-grid.layout-list .product-card-name { padding: 1rem 1rem 0.25rem; }
  .section-product-grid.layout-list .product-card-price { padding: 0 1rem 1rem; }
  .section-product-grid.layout-list .product-card-add { margin: 0 1rem 1rem; }
}

/* masonry — staggered Pinterest-style grid via offset rows. Keeps square cards
   but breaks the rigid baseline so the grid feels less uniform. */
.section-product-grid.layout-masonry .product-card:nth-child(3n + 2) { margin-top: 2rem; }
.section-product-grid.cols-2.layout-masonry .product-card:nth-child(3n + 2) { margin-top: 0; }
.section-product-grid.cols-2.layout-masonry .product-card:nth-child(2n) { margin-top: 2rem; }
.section-product-grid.cols-4.layout-masonry .product-card:nth-child(3n + 2) { margin-top: 0; }
.section-product-grid.cols-4.layout-masonry .product-card:nth-child(4n + 2),
.section-product-grid.cols-4.layout-masonry .product-card:nth-child(4n + 4) { margin-top: 2rem; }
@media (max-width: 768px) {
  .section-product-grid.layout-masonry .product-card:nth-child(3n + 2),
  .section-product-grid.cols-4.layout-masonry .product-card:nth-child(4n + 2),
  .section-product-grid.cols-4.layout-masonry .product-card:nth-child(4n + 4) { margin-top: 0; }
  .section-product-grid.layout-masonry .product-card:nth-child(2n) { margin-top: 2rem; }
}
@media (max-width: 480px) {
  .section-product-grid.layout-masonry .product-card { margin-top: 0 !important; }
}

/* featured-first — first card spans 2×2, the rest flow in the standard grid. */
.section-product-grid.layout-featured-first .product-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
@media (max-width: 768px) {
  .section-product-grid.layout-featured-first .product-card:first-child {
    grid-column: span 2;
    grid-row: auto;
  }
}
@media (max-width: 480px) {
  .section-product-grid.layout-featured-first .product-card:first-child {
    grid-column: auto;
    grid-row: auto;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: transform 0.15s, box-shadow 0.15s;
}
.product-card.is-filter-hidden,
.product-card[hidden] { display: none !important; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.product-card-link { display: block; }
.product-card-media { aspect-ratio: 1; overflow: hidden; background: #f3f4f6; }
.product-card-media img,
.product-card-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-video { pointer-events: none; }
.product-card-name { font-size: 1rem; font-weight: 600; padding: 1rem 1rem 0.25rem; color: var(--text-color, #1f2937); }
.product-card-price { display: block; padding: 0 1rem 1rem; color: var(--primary-color, #0F766E); font-weight: 700; font-size: 1.05rem; }
.product-card-add {
  margin: 0 1rem 1rem;
  padding: 0.6rem 1rem;
  background: var(--primary-color, #0F766E);
  color: #fff;
  border: none;
  border-radius: 0.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.product-card-add:hover { opacity: 0.9; }

.section-featured-product {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
/* ── featuredProduct layout variants ──────────────────────────
 * Default `split-left` (image left, text right) is the base grid above and
 * needs no extra rule. `.image-right` is the legacy class (pre-`layout`
 * migration) kept as a back-compat alias for `split-right`. CSP-safe. */
.section-featured-product.image-right,
.section-featured-product.layout-split-right { direction: rtl; }
.section-featured-product.image-right > *,
.section-featured-product.layout-split-right > * { direction: ltr; }
/* stacked — image full-width above centered text, single column. */
.section-featured-product.layout-stacked {
  grid-template-columns: 1fr;
  gap: 2rem;
}
.section-featured-product.layout-stacked .featured-info { text-align: center; }
/* minimal — compact, narrower container, smaller typography. */
.section-featured-product.layout-minimal {
  max-width: 900px;
  padding: 2.5rem 1.5rem;
  gap: 2rem;
}
.section-featured-product.layout-minimal .featured-name { font-size: 1.75rem; }
.section-featured-product.layout-minimal .featured-price { font-size: 1.25rem; }
.section-featured-product.layout-minimal .featured-description { font-size: 0.95rem; }
@media (max-width: 768px) {
  .section-featured-product { grid-template-columns: 1fr; }
  .section-featured-product.image-right,
  .section-featured-product.layout-split-right { direction: ltr; }
  .section-featured-product.layout-stacked .featured-info { text-align: left; }
}
.featured-media img,
.featured-media video { width: 100%; border-radius: 0.75rem; aspect-ratio: 1; object-fit: cover; display: block; }
.featured-eyebrow { display: inline-block; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.1em; color: var(--primary-color, #0F766E); font-weight: 700; }
.featured-name { font-size: 2.5rem; font-weight: 800; margin: 0.5rem 0 1rem; line-height: 1.1; }
.featured-price { font-size: 1.5rem; font-weight: 700; color: var(--primary-color, #0F766E); margin-bottom: 1rem; }
.featured-description { color: #4b5563; margin-bottom: 1.5rem; line-height: 1.7; }
.featured-add {
  background: var(--primary-color, #0F766E);
  color: #fff;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}

.section-product-detail {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 768px) { .section-product-detail { grid-template-columns: 1fr; } }
.section-product-detail.empty { text-align: center; color: #9ca3af; padding: 4rem 0; }
/* ── productDetail layout variants ────────────────────────────
 * Default `gallery-left` (gallery left, info right) is the base grid above and
 * needs no extra rule. CSP-safe — classes only. */
/* gallery-right — gallery on the right, info on the left. */
.section-product-detail.layout-gallery-right { direction: rtl; }
.section-product-detail.layout-gallery-right > * { direction: ltr; }
/* stacked — gallery full-width above info, single column. */
.section-product-detail.layout-stacked {
  grid-template-columns: 1fr;
  gap: 2rem;
}
.section-product-detail.layout-stacked .pd-gallery {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
/* minimal — compact, narrower container, restrained typography. */
.section-product-detail.layout-minimal {
  max-width: 960px;
  gap: 2.5rem;
}
.section-product-detail.layout-minimal .pd-name { font-size: 1.6rem; }
.section-product-detail.layout-minimal .pd-price { font-size: 1.25rem; }
.section-product-detail.layout-minimal .pd-description { font-size: 0.95rem; }
@media (max-width: 768px) {
  .section-product-detail.layout-gallery-right { direction: ltr; }
}
.pd-main { aspect-ratio: 1; border-radius: 0.75rem; overflow: hidden; background: #f3f4f6; }
.pd-main img,
.pd-main video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.pd-thumb { width: 70px; height: 70px; border: 2px solid transparent; border-radius: 0.4rem; padding: 0; background: transparent; cursor: pointer; overflow: hidden; }
.pd-thumb.active { border-color: var(--primary-color, #0F766E); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-name { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.pd-price { font-size: 1.5rem; font-weight: 700; color: var(--primary-color, #0F766E); margin-bottom: 1rem; }
.pd-description { color: #4b5563; line-height: 1.7; margin-bottom: 1.5rem; }
.pd-variant-label { display: block; font-weight: 600; margin-bottom: 1rem; }
.pd-variant-select { width: 100%; padding: 0.75rem; border: 1px solid #d1d5db; border-radius: 0.4rem; margin-top: 0.5rem; font-size: 1rem; }
.pd-quantity { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.pd-quantity button { width: 36px; height: 36px; border: 1px solid #d1d5db; background: #fff; border-radius: 0.4rem; font-size: 1.1rem; cursor: pointer; }
.pd-quantity input { width: 60px; height: 36px; text-align: center; border: 1px solid #d1d5db; border-radius: 0.4rem; font-size: 1rem; }
.pd-add {
  background: var(--primary-color, #0F766E);
  color: #fff;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
}

/* ──────────────────────────────────────────────────────────────────
   Cart drawer — refined design language matching the shadcn FAQ.
   Backdrop blur, edge-to-edge panel, header with item count subtitle,
   item rows with image/name/price/qty stepper, primary checkout CTA
   with ghost continue link below. The cart is the most consequential
   surface on a store — clarity beats flourish.
   ────────────────────────────────────────────────────────────────── */

.section-cart-drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}
.section-cart-drawer.open { pointer-events: auto; }
.cart-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.section-cart-drawer.open .cart-drawer-backdrop { opacity: 1; }
.cart-drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -32px 0 64px -32px rgba(15, 17, 21, 0.45);
}
[dir="rtl"] .cart-drawer-panel {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 32px 0 64px -32px rgba(15, 17, 21, 0.45);
}
/* "Powered by DevOpser" badge bumps the panel up so the CTAs aren't
   covered by the ~30px viewport-bottom bar (z-index 9999). */
body:has(.devopser-branding) .cart-drawer-panel { bottom: 32px; }
.section-cart-drawer.open .cart-drawer-panel { transform: translateX(0); }

/* Header */
.cart-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.cart-drawer-titlewrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.cart-drawer-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: #111827;
}
.cart-drawer-count {
  font-size: 0.78rem;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.04em;
}
.cart-drawer-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #6b7280;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.cart-drawer-close:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Empty state */
.cart-drawer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.cart-drawer-empty.hidden { display: none; }
.cart-drawer-empty-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.cart-drawer-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}
.cart-drawer-empty-body {
  font-size: 0.88rem;
  color: #6b7280;
  margin: 0;
  max-width: 240px;
  line-height: 1.5;
}

/* Item list */
.cart-drawer-items {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}
.cart-drawer-item {
  display: grid;
  grid-template-columns: 64px 1fr 28px;
  gap: 0.875rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
}
.cart-drawer-item:last-child { border-bottom: 0; }
.cart-drawer-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #f3f4f6;
}
.cart-drawer-item-info { min-width: 0; }
.cart-drawer-item-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #111827;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-drawer-item-price {
  color: #6b7280;
  font-weight: 500;
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
.cart-drawer-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.cart-drawer-qty-btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  cursor: pointer;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.cart-drawer-qty-btn:hover {
  border-color: var(--primary-color, #0F766E);
  color: var(--primary-color, #0F766E);
  background: rgba(15, 118, 110, 0.06);
}
.cart-drawer-qty-num {
  min-width: 1.5rem;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: #111827;
  font-weight: 500;
}
.cart-drawer-item-remove {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #9ca3af;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.cart-drawer-item-remove:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Footer */
.cart-drawer-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.1rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #ffffff;
}
.cart-drawer-subtotal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.cart-drawer-subtotal-label {
  font-size: 0.85rem;
  color: #6b7280;
}
.cart-drawer-subtotal-amount {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.015em;
}
.cart-drawer-shipping-note {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0 0 0.25rem;
  line-height: 1.5;
}
.cart-drawer-checkout {
  width: 100%;
  height: 48px;
  background: var(--primary-color, #0F766E);
  color: #ffffff;
  border: 0;
  border-radius: 0.5rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 8px 24px -12px var(--primary-color, #0F766E);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}
.cart-drawer-checkout:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -10px var(--primary-color, #0F766E);
}
.cart-drawer-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.cart-drawer-continue {
  width: 100%;
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  text-align: center;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}
.cart-drawer-continue:hover { color: #111827; }
/* Legacy class kept for backward compatibility with older configs */
.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}
/* ── Checkout return banner (thank-you / cancelled) ──────────── */
.checkout-banner {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}
.checkout-banner.open {
  opacity: 1;
  pointer-events: auto;
}
.checkout-banner-card {
  background: #fff;
  color: #1f2937;
  border-radius: 0.85rem;
  padding: 2rem 2rem 1.75rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  transform: translateY(12px);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.checkout-banner.open .checkout-banner-card { transform: translateY(0); }
.checkout-banner-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease;
}
.checkout-banner-close:hover { background: #f3f4f6; color: #1f2937; }
.checkout-banner-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.checkout-banner-success .checkout-banner-icon { background: #d1fae5; color: #065f46; }
.checkout-banner-cancelled .checkout-banner-icon { background: #fef3c7; color: #92400e; }
.checkout-banner-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #1f2937;
}
.checkout-banner-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4b5563;
  margin: 0 0 1.25rem;
}
.checkout-banner-cta {
  display: inline-block;
  background: var(--primary-color, #0F766E);
  color: #fff;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 120ms ease;
}
.checkout-banner-cta:hover { filter: brightness(1.1); }
.checkout-banner-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.checkout-banner-secondary {
  font-size: 0.85rem;
  color: #4b5563;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}
.checkout-banner-secondary:hover {
  color: var(--primary-color, #0F766E);
  border-bottom-color: currentColor;
}

/* Instant-download list inside the post-checkout success banner. */
.checkout-banner-downloads {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin: 0 0 1.25rem;
  text-align: left;
}
.checkout-banner-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  background: var(--surface-color, #f9fafb);
  color: var(--primary-color, #0F766E);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.checkout-banner-download:hover {
  border-color: var(--primary-color, #0F766E);
  background: #fff;
}
.checkout-banner-download-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkout-banner-download-icon {
  flex: 0 0 auto;
  font-size: 1.05rem;
  line-height: 1;
}

/* "Manage your orders" link in storeFooter (Stripe Customer Portal) */
.store-footer-portal-link {
  display: inline-block;
  font-size: 0.85rem;
  color: inherit;
  opacity: 0.85;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  margin: 0 1rem;
  transition: opacity 120ms ease, color 120ms ease;
}
.store-footer-portal-link:hover {
  opacity: 1;
  color: var(--primary-color, #0F766E);
}

.cart-drawer-checkout {
  flex: 1;
  background: var(--primary-color, #0F766E);
  color: #fff;
  border: none;
  padding: 1rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.cart-drawer-checkout:disabled { opacity: 0.5; cursor: not-allowed; }
.cart-drawer-actions {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.cart-drawer-continue {
  flex: 0 1 auto;
  background: transparent;
  color: var(--text-color, #1f2937);
  border: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 120ms ease, color 120ms ease;
}
.cart-drawer-continue:hover { border-color: var(--text-color, #1f2937); }
@media (max-width: 480px) {
  /* On narrow viewports stack the two buttons so neither is squeezed too small */
  .cart-drawer-actions { flex-direction: column; }
  .cart-drawer-continue { padding: 0.85rem 1rem; }
}

/* Preview-only override: dock the cart drawer inline so editors can see it */
.section-cart-drawer.preview-docked { position: relative; inset: auto; pointer-events: auto; max-width: 400px; margin: 2rem auto; box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-radius: 0.75rem; overflow: hidden; }
.section-cart-drawer.preview-docked .cart-drawer-panel { position: relative; transform: none; height: auto; box-shadow: none; }

.section-store-footer { background: #111827; color: #d1d5db; padding: 4rem 1.5rem 2rem; }
.store-footer-top { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid #1f2937; }
@media (max-width: 768px) { .store-footer-top { grid-template-columns: 1fr; gap: 2rem; } }
.store-footer-brand-name { color: #fff; font-size: 1.25rem; font-weight: 700; }
.store-footer-tagline { margin-top: 0.5rem; color: #9ca3af; font-size: 0.95rem; }
.store-footer-socials { display: flex; gap: 0.75rem; margin-top: 1rem; }
.store-footer-social { color: #d1d5db; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #374151; border-radius: 999px; transition: background 0.15s; }
.store-footer-social:hover { background: #1f2937; }
.store-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2rem; }
.store-footer-col h4 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.store-footer-col ul { list-style: none; padding: 0; margin: 0; }
.store-footer-col li { margin-bottom: 0.5rem; }
.store-footer-col a { color: #9ca3af; font-size: 0.9rem; transition: color 0.15s; }
.store-footer-col a:hover { color: #fff; }
.store-footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
@media (max-width: 600px) { .store-footer-bottom { flex-direction: column; text-align: center; } }
.store-payment-icons { display: flex; gap: 0.5rem; align-items: center; }
.store-payment-badge { display: inline-block; padding: 0.25rem 0.5rem; background: rgba(255,255,255,0.08); border: 1px solid #374151; border-radius: 0.25rem; font-size: 0.7rem; font-weight: 700; color: #d1d5db; letter-spacing: 0.05em; }
.store-footer-copyright { color: #6b7280; font-size: 0.85rem; }

/* ── storeFooter layout variants ──────────────────────────────
 * Default `columns` (brand left / links right, payment + copyright split) is
 * the base layout above and needs no extra rule. CSP-safe — classes only. */
/* centered — everything stacked and center-aligned. */
.section-store-footer.layout-centered { text-align: center; }
.section-store-footer.layout-centered .store-footer-top { grid-template-columns: 1fr; }
.section-store-footer.layout-centered .store-footer-socials { justify-content: center; }
.section-store-footer.layout-centered .store-footer-cols { justify-items: center; }
.section-store-footer.layout-centered .store-footer-bottom { flex-direction: column; justify-content: center; }
/* minimal — compact bar: hide brand + link columns, keep the bottom row. */
.section-store-footer.layout-minimal { padding: 1.5rem 1.5rem; }
.section-store-footer.layout-minimal .store-footer-top { display: none; }
/* split — mirror of columns: link columns left, brand/socials right. */
.section-store-footer.layout-split .store-footer-top { grid-template-columns: 2fr 1fr; }
.section-store-footer.layout-split .store-footer-brand { order: 2; }
.section-store-footer.layout-split .store-footer-cols { order: 1; }
@media (max-width: 768px) {
  .section-store-footer.layout-split .store-footer-brand,
  .section-store-footer.layout-split .store-footer-cols { order: 0; }
}

/* ── marketing footer (section-footer) layout variants ────────────
 * Default `centered` is the base look (centered links + copyright) and needs
 * no extra rule. CSP-safe — classes only. */
/* simple — left-aligned bar: links flush-start, copyright left. */
.section-footer.layout-simple { text-align: left; }
.section-footer.layout-simple .footer-links { justify-content: flex-start; }
/* minimal — compact copyright-only strip: hide logo + link list. */
.section-footer.layout-minimal { padding: 1.25rem 2rem; }
.section-footer.layout-minimal .footer-links,
.section-footer.layout-minimal .footer-logo-img { display: none; }

/* Generic fallback for unknown section types — never render blank */
.section-generic-fallback { padding: 2rem 1.5rem; max-width: 1200px; margin: 1rem auto; border: 2px dashed #d1d5db; border-radius: 0.5rem; background: #f9fafb; }
.generic-fallback-label { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #6b7280; background: #e5e7eb; padding: 0.2rem 0.5rem; border-radius: 0.25rem; margin-bottom: 0.5rem; }
.section-generic-fallback h3 { font-size: 1.25rem; font-weight: 700; color: #1f2937; margin-bottom: 0.5rem; }
.section-generic-fallback p { color: #4b5563; line-height: 1.6; }

/* ──────────────────────────────────────────────────────────────────
   Community feed (storefront-public, read-only) — slice 6.
   Hydrates client-side from /api/stores/:slug/community/posts; renders
   a loading placeholder, then a list of posts with author + body.
   Falls back to the empty-state copy when the community has no posts
   yet or the feed is gated.
   ────────────────────────────────────────────────────────────────── */

.section-community-feed {
  padding: clamp(4rem, 9vw, 5.5rem) 1.5rem;
  background: var(--bg-color, #ffffff);
}
.community-feed-container { max-width: 768px; margin: 0 auto; }
.section-community-feed h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--text-color, #1f2937);
}
.section-community-feed .subtitle {
  text-align: center;
  color: color-mix(in oklab, var(--text-color, #1f2937) 60%, transparent);
  margin: 0 auto 2rem;
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.55;
}
.community-feed-welcome {
  background: color-mix(in oklab, var(--primary-color) 5%, #ffffff);
  border: 1px solid color-mix(in oklab, var(--primary-color) 22%, #e5e7eb);
  border-radius: 0.65rem;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1rem;
  color: var(--text-color, #1f2937);
  line-height: 1.6;
  font-size: 0.95rem;
}
.community-feed-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
  font-style: italic;
}
.community-feed-state-builder {
  border: 1px dashed #e5e7eb;
  border-radius: 0.65rem;
  background: #fafafa;
}
.community-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.community-feed-post {
  position: relative;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid color-mix(in oklab, var(--primary-color) 12%, #e5e7eb);
  border-radius: 0.65rem;
  transition: border-color 180ms ease;
}
.community-feed-post:hover {
  border-color: color-mix(in oklab, var(--primary-color) 30%, #e5e7eb);
}
.community-feed-post.is-pinned {
  background: linear-gradient(180deg, color-mix(in oklab, var(--primary-color) 5%, #ffffff), #ffffff 60%);
  border-color: color-mix(in oklab, var(--primary-color) 35%, #e5e7eb);
}
.community-feed-post-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.community-feed-post-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-color, #1f2937);
}
.community-feed-post-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary-color) 12%, transparent);
  color: var(--primary-color);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.community-feed-post-time {
  margin-inline-start: auto;
  font-size: 0.72rem;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.community-feed-post-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.community-feed-cta {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--primary-color);
  color: #ffffff;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.community-feed-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -12px var(--primary-color);
}

/* Hydration JS hides this section entirely if the community is private */
.section-community-feed[hidden] { display: none; }

/* ── communityFeed layout variants ────────────────────────────
 * Default `feed` (single-column card stack) is the base layout above and
 * needs no extra rule. Client-side hydration keeps emitting
 * `.community-feed-post` items so these layout rules apply equally to the
 * deployed feed and the builder preview. CSP-safe — classes only. */

/* grid — responsive card grid, wider container, truncated bodies. */
.shadcn-community-feed.layout-grid .community-feed-container { max-width: 1100px; }
.shadcn-community-feed.layout-grid .community-feed-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.shadcn-community-feed.layout-grid .community-feed-post { padding: 1.25rem; }
.shadcn-community-feed.layout-grid .community-feed-post-body {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 600px) {
  .shadcn-community-feed.layout-grid .community-feed-list { grid-template-columns: 1fr; }
}

/* compact — tight single-column rows, smaller type, lighter chrome. */
.shadcn-community-feed.layout-compact .community-feed-list { gap: 0.35rem; }
.shadcn-community-feed.layout-compact .community-feed-post {
  padding: 0.75rem 1rem;
  background: transparent;
}
.shadcn-community-feed.layout-compact .community-feed-post-meta { margin-bottom: 0.25rem; }
.shadcn-community-feed.layout-compact .community-feed-post-author { font-size: 0.82rem; }
.shadcn-community-feed.layout-compact .community-feed-post-body {
  font-size: 0.86rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* minimal — borderless rows separated by hairline dividers. */
.shadcn-community-feed.layout-minimal .community-feed-list { gap: 0; }
.shadcn-community-feed.layout-minimal .community-feed-post {
  padding: 1rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in oklab, var(--primary-color) 12%, #e5e7eb);
  border-radius: 0;
}
.shadcn-community-feed.layout-minimal .community-feed-post:last-child { border-bottom: 0; }
.shadcn-community-feed.layout-minimal .community-feed-post:hover {
  border-color: color-mix(in oklab, var(--primary-color) 30%, #e5e7eb);
}
.shadcn-community-feed.layout-minimal .community-feed-post-body {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
