/*
 * SiteFactory base stylesheet (structural).
 * The assembler injects a :root token block at the TOKENS marker below,
 * generated from DesignSpec.design_tokens. All visual values reference
 * CSS variables so the same structure restyles per site.
 */


/* ---- reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  letter-spacing: var(--ls-heading, -0.01em);
  line-height: 1.15;
  color: var(--c-neutral-dark);
  margin: 0 0 calc(var(--space) * 0.5);
}
h1 { font-size: calc(2.4rem * var(--scale-heading, 1)); }
h2 { font-size: calc(1.8rem * var(--scale-heading, 1)); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 calc(var(--space) * 0.5); }

.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 calc(var(--space) * 0.75); }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  padding: calc(var(--space) * 0.5) calc(var(--space) * 1.1);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, color .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--c-primary); color: var(--c-bg); }
.btn--primary:hover { background: var(--c-neutral-dark); color: var(--c-bg); }
.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-primary); color: var(--c-bg); }

.section-title { text-align: center; margin-bottom: calc(var(--space) * 1.2); }

/* ---- header / nav ---- */
.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-neutral-light); position: relative; z-index: 50; }
.header__bar, .header__top { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: var(--space); }
.header__brand { font-family: var(--font-heading); font-weight: var(--weight-heading); font-size: 1.25rem; color: var(--c-neutral-dark); }
.header__brand img { max-height: 40px; width: auto; }
.header__cart { font-size: 0.9rem; color: var(--c-text-muted); }

/* classic-horizontal */
.header--horizontal .header__nav ul { display: flex; gap: calc(var(--space) * 0.9); list-style: none; margin: 0; padding: 0; }
.header--horizontal .header__nav li { position: relative; }
.header--horizontal .header__nav a { color: var(--c-text); font-weight: var(--weight-heading); font-size: 0.95rem; padding: 0.25rem 0; }
.header--horizontal .header__nav ul ul { display: none; position: absolute; top: 100%; left: 0; background: var(--c-bg); box-shadow: var(--shadow); border-radius: var(--radius); padding: calc(var(--space) * 0.4); flex-direction: column; min-width: 180px; }
.header--horizontal .header__nav li:hover > ul { display: flex; }

/* centered */
.header--centered .header__top { justify-content: space-between; }
.header--centered .header__brand { margin: 0 auto; }
.header--centered .header__nav--center { border-top: 1px solid var(--c-neutral-light); }
.header--centered .header__nav--center ul { display: flex; gap: calc(var(--space) * 1.2); justify-content: center; list-style: none; margin: 0; padding: calc(var(--space) * 0.4) 0; }
.header--centered .header__nav--center a { color: var(--c-text); font-size: 0.92rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* side-drawer */
.header--drawer .header__actions { display: flex; align-items: center; gap: var(--space); }
.header__burger { background: none; border: 0; width: 32px; height: 28px; cursor: pointer; position: relative; padding: 0; }
.header__burger span { display: block; height: 2px; width: 100%; background: var(--c-neutral-dark); margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 85vw); background: var(--c-surface); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .25s ease; z-index: 100; padding: calc(var(--space) * 1.2); overflow-y: auto; }
.drawer.is-open { transform: translateX(0); }
.drawer__scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 90; border: 0; padding: 0; }
.drawer__nav ul { list-style: none; margin: 0; padding: 0; }
.drawer__nav a { display: block; padding: calc(var(--space) * 0.5) 0; color: var(--c-text); font-family: var(--font-heading); border-bottom: 1px solid var(--c-neutral-light); }
body.drawer-open { overflow: hidden; }

/* ---- hero ---- */
.hero { position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden; background: var(--c-neutral-dark); }
.hero__bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.25) 60%, transparent 100%); }
.hero__scrim--centered { background: rgba(0,0,0,0.5); }
.hero--centered { min-height: min(90vh, 820px); }
.hero--centered .hero__bg-img { opacity: 1; }
.hero--centered .hero__scrim--centered { background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.55) 100%); }
.hero__inner { position: relative; z-index: 2; max-width: 640px; padding: calc(var(--space) * 2) 0; }
.hero__inner--center { text-align: center; margin: 0 auto; max-width: 760px; }
.hero__title { color: var(--c-bg); font-size: calc(2.8rem * var(--scale-heading, 1)); margin-bottom: calc(var(--space) * 0.6); }
.hero__title--center { color: var(--c-bg); font-size: calc(3.4rem * var(--scale-heading, 1)); font-weight: 700; letter-spacing: -0.01em; }
.hero__subtitle { color: rgba(255,255,255,0.88); font-size: 1.15rem; margin-bottom: calc(var(--space) * 0.8); }
.hero__subtitle--center { font-size: 1.3rem; max-width: 620px; margin-left: auto; margin-right: auto; }
.hero__inner--center .hero__cta { margin-top: var(--space); }

/* split hero */
.hero--split { display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; background: var(--c-bg); }
.hero--split-image-left { direction: rtl; }
.hero--split-image-left > * { direction: ltr; }
.hero__copy { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--space) * 2); }
.hero__copy .hero__title { color: var(--c-neutral-dark); }
.hero__copy .hero__subtitle { color: var(--c-text-muted); }
.hero__media { overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }

/* minimal hero */
.hero--minimal { min-height: auto; background: var(--c-surface); border-bottom: 1px solid var(--c-neutral-light); }
.hero__inner--minimal { padding: calc(var(--space) * 3) 0; max-width: 820px; }
.hero__title--minimal { color: var(--c-neutral-dark); font-size: calc(2.6rem * var(--scale-heading, 1)); }
.hero__subtitle--minimal { color: var(--c-text-muted); font-size: 1.2rem; }

/* carousel */
.hero--carousel .hero__track { position: relative; }
.hero__slide { position: absolute; inset: 0; margin: 0; min-height: 520px; display: flex; align-items: center; background-size: cover; background-position: center; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.hero__slide.is-active { opacity: 1; pointer-events: auto; position: relative; }
.hero__dots { position: absolute; bottom: calc(var(--space) * 1.2); left: 0; right: 0; z-index: 3; display: flex; gap: 0.5rem; justify-content: center; }
.hero__dot { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.5); cursor: pointer; padding: 0; }
.hero__dot.is-active { background: var(--c-bg); }

/* ---- products ---- */
.products { padding: calc(var(--space) * 2.2) 0; }
.products__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: calc(var(--space) * 1.2); }
.products__head .section-title { text-align: left; margin-bottom: 0; }
.products__nav { display: flex; gap: 0.5rem; }
.products__arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--c-neutral-light); background: var(--c-bg); cursor: pointer; font-size: 1rem; color: var(--c-text); }
.products__arrow:disabled { opacity: 0.35; cursor: default; }

.product-card__media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--c-neutral-light); }
.product-card__media img { transition: transform .3s ease; }
.product-card__media:hover img { transform: scale(1.03); }
.product-card__title { font-size: 1.1rem; margin: calc(var(--space) * 0.4) 0 0; }
.product-card__title a { color: var(--c-neutral-dark); }
.product-card__excerpt { color: var(--c-text-muted); font-size: 0.95rem; margin: 0.25rem 0; }
.product-card__price { color: var(--c-primary); font-weight: var(--weight-heading); font-family: var(--font-heading); }

/* two-column cards */
.products__rows { display: flex; flex-direction: column; gap: calc(var(--space) * 1.5); }
.product-card--row { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--space) * 1.2); align-items: center; }
.product-card--reverse .product-card__media { order: 2; }
.product-card--row .product-card__media img { aspect-ratio: 4/3; object-fit: cover; }

/* grid */
.products__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: calc(var(--space) * 1.1); }
.product-card--cell .product-card__media img { aspect-ratio: 1; object-fit: cover; }

/* horizontal scroll */
.products--hscroll .products__track { display: flex; gap: calc(var(--space) * 0.9); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 calc(var(--space) * 0.75) calc(var(--space) * 0.5); scrollbar-width: thin; }
.product-card--slide { flex: 0 0 300px; scroll-snap-align: start; }
.product-card--slide .product-card__media img { aspect-ratio: 1; object-fit: cover; }

/* editorial list */
.products__list { list-style: none; margin: 0; padding: 0; }
.product-card--editorial { display: grid; grid-template-columns: auto 1fr 1.4fr; gap: calc(var(--space) * 1.1); align-items: center; padding: calc(var(--space) * 1.2) 0; border-bottom: 1px solid var(--c-neutral-light); }
.product-card__index { font-family: var(--font-heading); font-size: 1.6rem; color: var(--c-neutral-light); }
.product-card--editorial .product-card__media img { aspect-ratio: 4/3; object-fit: cover; }

/* ---- category grid ---- */
.categories { padding: calc(var(--space) * 2.2) 0; background: var(--c-surface); }
.categories__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: calc(var(--space) * 1.1); }
.category-card { border-radius: var(--radius); overflow: hidden; background: var(--c-bg); box-shadow: var(--shadow); }
.category-card__link { display: block; text-decoration: none; color: inherit; }
.category-card__media { display: block; position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--c-neutral-light); }
.category-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.category-card__link:hover .category-card__media img { transform: scale(1.04); }
.category-card__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: 3rem; color: var(--c-bg); opacity: 0.9; }
.category-card__body { display: flex; flex-direction: column; gap: 0.15rem; padding: calc(var(--space) * 0.6) calc(var(--space) * 0.7); }
.category-card__name { font-family: var(--font-heading); font-weight: var(--weight-heading); font-size: 1.15rem; color: var(--c-neutral-dark); }
.category-card__count { font-size: 0.85rem; color: var(--c-text-muted); }

/* ---- generic content section + CTA banner ---- */
.content-section { padding: calc(var(--space) * 2) 0; }
.content-section__inner { max-width: 760px; margin: 0 auto; }
.content-section__body { color: var(--c-text); line-height: 1.7; }
.content-section__body p { margin: 0 0 1rem; }
.content-section--cta { background: var(--c-primary); color: var(--c-bg); text-align: center; }
.content-section--cta .section-title { color: var(--c-bg); }
.content-section--cta .content-section__body { color: rgba(255,255,255,0.92); }
.content-section--cta .content-section__inner { max-width: 680px; }
.content-section--cta .btn { background: var(--c-bg); color: var(--c-primary); margin-top: var(--space); }
.content-section--cta .btn:hover { background: var(--c-neutral-light); }

/* ---- shop archive ---- */
.shop { padding: calc(var(--space) * 1.5) 0; }
.shop--sidebar-left, .shop--sidebar-right { display: grid; grid-template-columns: 260px 1fr; gap: calc(var(--space) * 1.5); max-width: var(--container-width); margin: 0 auto; padding: 0 calc(var(--space) * 0.75); }
.shop--sidebar-right { grid-template-columns: 1fr 260px; }
.shop--filters-top .shop__filters { background: var(--c-surface); border-bottom: 1px solid var(--c-neutral-light); margin-bottom: calc(var(--space) * 1.2); padding: calc(var(--space) * 0.5) 0; }
.shop__sidebar .widget { padding: calc(var(--space) * 0.6) 0; border-bottom: 1px solid var(--c-neutral-light); }
.shop__sidebar .widget-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text-muted); }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--space) * 1); }
.woocommerce ul.products li.product { background: var(--c-surface); border-radius: var(--radius); padding: calc(var(--space) * 0.6); }
.woocommerce ul.products li.product .button { background: var(--c-primary); color: var(--c-bg); border-radius: var(--radius); }

/* ---- footer ---- */
.footer { background: var(--c-neutral-dark); color: rgba(255,255,255,0.8); margin-top: calc(var(--space) * 2.5); }
.footer a { color: rgba(255,255,255,0.85); }
.footer a:hover { color: var(--c-bg); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: calc(var(--space) * 1.2); padding: calc(var(--space) * 2.2) 0; }
.footer__name { font-family: var(--font-heading); font-weight: var(--weight-heading); color: var(--c-bg); margin-bottom: 0.5rem; }
.footer__brand p, .footer__col p { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer__col ul, .footer__links { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: 0.4rem; font-size: 0.92rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: calc(var(--space) * 0.8) 0; font-size: 0.85rem; }
.footer__bottom-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }

.footer--minimal { padding: calc(var(--space) * 1.2) 0; }
.footer__single { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; font-size: 0.9rem; }
.footer__sep { opacity: 0.5; }

.footer--cta .footer__cta-band { background: var(--c-primary); color: var(--c-bg); }
.footer--cta .footer__cta-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space); padding: calc(var(--space) * 1.5) 0; }
.footer__cta-text { font-family: var(--font-heading); font-weight: var(--weight-heading); font-size: 1.3rem; margin: 0; }
.footer--cta .footer__cta-btn { background: var(--c-bg); color: var(--c-primary); }
.footer--cta .footer__cta-btn:hover { background: var(--c-neutral-light); }
.footer--cta .footer__bottom { background: var(--c-neutral-dark); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero--split { grid-template-columns: 1fr; }
  .hero--split .hero__media { order: -1; }
  .hero--split .hero__media img { min-height: 220px; }
  .product-card--row { grid-template-columns: 1fr; }
  .product-card--reverse .product-card__media { order: 0; }
  .product-card--editorial { grid-template-columns: auto 1fr; }
  .product-card--editorial .product-card__media { grid-column: 1 / -1; }
  .shop--sidebar-left, .shop--sidebar-right { grid-template-columns: 1fr; }
  .shop__sidebar { order: 2; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .products__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer--cta .footer__cta-inner { flex-direction: column; align-items: flex-start; }
  .woocommerce ul.products { grid-template-columns: 1fr; }
  h1 { font-size: calc(1.9rem * var(--scale-heading, 1)); }
  .hero__title { font-size: calc(2rem * var(--scale-heading, 1)); }
  .hero--centered { min-height: 70vh; }
  .hero__title--center { font-size: calc(2.3rem * var(--scale-heading, 1)); }
  .hero__subtitle--center { font-size: 1.1rem; }
}

/* -- deliberate imperfection: per-site rhythm (anti-template) -- */
.products { padding-top: calc(var(--space) * 2.4); padding-bottom: calc(var(--space) * 2.25); }
.shop { padding-top: calc(var(--space) * 1.65); }
.section-title { text-align: center; }
.footer { margin-top: calc(var(--space) * 2.8); }

