.container {
  width: min(var(--container-max, 80rem), 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

body {
  padding: 0;
  margin: 0;
  max-width: 100vw !important;
  overflow-x: clip;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--color-ivory); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-ivory);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 1rem;
}

p {
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Rich text & editorial body copy */
.richtext,
.wysiwyg,
.section-heading__intro,
:is(
  .founder-story__body,
  .exception-section__body,
  .about-founder__body,
  .page-hero__lead,
  .showcase-gallery__body,
  .showcase-cta__text,
  .product-detail__short,
  .product-detail__description-body,
  .faq-contact__intro,
  .faq-contact__answer,
  .article-page__intro,
  .article-page__content,
  .article-author-box__bio,
  .news-index__intro,
  .products-trio__body,
  .contact-newsletter__intro,
  .account-dashboard__intro,
  .product-highlights__body,
  .showcase-gallery__desc,
  blockquote:not(.testimonial-card__text)
) {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.richtext p,
.wysiwyg p {
  text-align: justify;
  text-justify: inter-word;
}

/* Preserve centered UI copy */
.hero-slider__panel :is(p, .hero-slider__kicker, .hero-slider__subtitle),
.product-detail__preview-banner p,
.cart-page__empty p,
.checkout-page__empty p,
.checkout-page__success p,
.site-footer :is(.site-footer__brand, .site-footer__bottom) p,
.showcase-split__content :is(p, h2, h3),
.showcase-intro__text,
.products-trio__card p,
.header-cart__empty p {
  text-align: center;
  hyphens: none;
}

.home-section {
  padding: var(--section-py, 6rem) 0;
}

@media (min-width: 1024px) {
  .home-section { padding: var(--section-py-lg, 8rem) 0; }
}

.home-empty { padding: 3rem 0; }

.kicker,
.subtitle,
.section-heading__kicker {
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  hyphens: none;
  margin: 0 0 1rem;
}

.section--dark { background: var(--color-background); }
.section--light { background: var(--color-card); }
.section--alt { background: color-mix(in srgb, var(--color-secondary) 30%, transparent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn-primary,
.btn:not(.btn-outline):not(.btn-ghost) {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.btn-primary:hover,
.btn:not(.btn-outline):not(.btn-ghost):hover {
  background: color-mix(in srgb, var(--color-primary) 90%, black);
  color: var(--color-primary-foreground);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-ivory);
}

.btn-outline:hover {
  background: var(--color-secondary);
  color: var(--color-ivory);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.richtext-image { margin: 0 auto; max-width: 100%; height: auto; }
.full-width { width: 100%; }

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--color-border);
  padding: 0.5rem;
}

th { background: var(--color-card); color: var(--color-ivory); }
tr:nth-child(odd) { background: var(--color-background); }
tr:nth-child(even) { background: var(--color-card); }
tr:hover { background: color-mix(in srgb, var(--color-secondary) 50%, transparent); }

.account-page :is(.account-page__title, .account-dashboard__title) {
  color: var(--color-ivory);
  font-family: var(--font-serif), serif;
  font-weight: 400;
}

#main-content { padding-top: 5rem; }
.template-homepage #main-content,
.template-about-page #main-content,
.template-shop-page #main-content,
.template-blog-index-page #main-content,
.template-showcase-page #main-content,
.template-article-page #main-content,
#main-content:has(> .page-hero:first-child) { padding-top: 0; }
