/* ---------- Announcement bar ---------- */
.announcement-bar {
  background: var(--color-black);
  color: var(--color-white);
  text-align: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
  padding: var(--space-2) var(--space-4);
  height: var(--announcement-height);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-5);
}

.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { height: 56px; width: auto; max-width: 100%; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: var(--space-6); }
.main-nav a {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text);
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.main-nav a:hover, .main-nav a.is-active { color: var(--color-accent); border-color: var(--color-accent); }

.header-actions { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }
.header-actions button, .header-actions a {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  color: var(--color-text);
}
.header-actions button:hover, .header-actions a:hover { color: var(--color-accent); }
.header-actions svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.cart-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 3px;
  background: var(--color-accent); color: var(--color-white);
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  border-radius: 999px;
}
.cart-count[hidden] { display: none; }

.hamburger-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  color: var(--color-text);
}
.hamburger-btn:hover { color: var(--color-accent); }
.hamburger-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* Search */
.search-flyout {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-4) 0;
  display: none;
}
.search-flyout.is-open { display: block; }
.search-flyout form { display: flex; gap: var(--space-3); }
.search-flyout input { flex: 1; }

/* Mobile nav drawer */
.nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(320px, 85%);
  background: var(--color-white);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  z-index: 301;
  overflow-y: auto;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); }
.nav-drawer__header button {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  color: var(--color-text);
}
.nav-drawer__header button:hover { color: var(--color-accent); }
.nav-drawer__header svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav-drawer__list { padding: var(--space-3) 0; }
.nav-drawer__list a {
  display: block; padding: var(--space-3) var(--space-5);
  font-size: var(--fs-base); font-weight: 600;
  border-bottom: 1px solid var(--color-grey-100);
}
.nav-drawer__list a:hover { color: var(--color-accent); }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger-btn { display: flex; }
  .hide-on-mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--color-grey-100);
  overflow: hidden;
}
.hero__slide { display: none; }
.hero__slide.is-active { display: block; }

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: var(--hero-height, 480px);
}
.hero__content { padding: var(--space-6) var(--space-4); }
.hero__badge {
  display: inline-flex; align-items: center;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 0.3rem 0.8rem; border-radius: 999px;
  background: var(--color-black); color: var(--color-white);
  margin-bottom: var(--space-3);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em;
  color: var(--color-accent); margin-bottom: var(--space-3);
}
.hero__content h1, .hero__content h2 { text-transform: uppercase; margin-bottom: var(--space-4); }
.hero__content p { font-size: var(--fs-md); max-width: 420px; margin-bottom: var(--space-6); }
.hero__actions {
  display: flex; gap: var(--space-3); flex-wrap: wrap;
  justify-content: var(--hero-btn-align, flex-start);
  flex-direction: var(--hero-btn-layout, row);
}
/* Image sizing/position are driven by --hero-img-fit / --hero-img-position
   (set inline per-hero by js/hero-render.js from image_fit/image_position).
   Default is "contain" — show the whole uploaded image — never a hardcoded
   crop. This replaces two previously-conflicting rules (this file used to
   hardcode object-fit:cover here while css/pages/home.css separately
   hardcoded a 60%-size object-fit:contain box with identical specificity;
   whichever loaded last silently won and neither reflected an uploaded
   banner correctly). */
.hero__media {
  height: 100%; min-height: 320px;
  background: var(--hero-bg-color, var(--color-grey-200));
  display: flex; align-items: center; justify-content: center;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: var(--hero-img-fit, contain);
  object-position: var(--hero-img-position, center);
}
/* Natural ratio: let the image's own aspect ratio set the box height
   instead of stretching to fill a fixed-height container. */
.hero__media--natural { height: auto; min-height: 0; }
.hero__media--natural img { height: auto; object-fit: contain; }
.hero__media--empty {
  min-height: 160px;
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--space-4);
}
.hero__media-placeholder { max-width: 220px; }

/* Text alignment variants */
.hero--align-center .hero__content { text-align: center; margin: 0 auto; }
.hero--align-center .hero__content p { margin-left: auto; margin-right: auto; }
.hero--align-right .hero__content { text-align: right; margin-left: auto; }
.hero--align-right .hero__content p { margin-left: auto; }

/* Centered layout: single column, image (if any) below the text */
.hero--centered .hero__inner { grid-template-columns: 1fr; text-align: center; }
.hero--centered .hero__content { text-align: center; margin: 0 auto; }
.hero--centered .hero__content p { margin-left: auto; margin-right: auto; }
.hero--centered .hero__media { min-height: 260px; margin-top: var(--space-6); }

/* Image only: no text column at all */
.hero--image_only .hero__inner { grid-template-columns: 1fr; }
.hero--image_only .hero__media { min-height: var(--hero-height, 420px); }

/* Text only: no image column at all */
.hero--text_only .hero__inner { grid-template-columns: 1fr; }

/* Split reverse: same as split, image on the left instead of the right */
.hero--split_reverse .hero__inner { grid-template-columns: 1fr 1fr; }
.hero--split_reverse .hero__content { order: 2; }
.hero--split_reverse .hero__media { order: 1; }

/* No text content at all (regardless of the selected layout): collapse
   to a single column so the image is the only grid item and fills the
   full hero width, instead of only filling the first 1fr track of a
   two-column grid meant for text+image. js/hero-render.js applies this
   class whenever every text/button field is empty, and also skips
   rendering .hero__content entirely in that case — the two together are
   what actually fix the image being pinned to one half of the hero. */
.hero--no-text .hero__inner { grid-template-columns: 1fr; }
.hero--no-text .hero__media { min-height: var(--hero-height, 420px); }

/* Background layout: full-bleed image with overlay text, no side image */
.hero--background .hero__inner {
  grid-template-columns: 1fr;
  min-height: var(--hero-height, 520px);
}
.hero--background {
  background-size: cover;
  background-position: center;
}
.hero--background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}
.hero--background .hero__inner { position: relative; z-index: 1; }
.hero--background .hero__content { color: var(--color-white); }
.hero--background .hero__content h1,
.hero--background .hero__content h2,
.hero--background .hero__content p { color: var(--color-white); }
.hero--background .hero__eyebrow { color: var(--color-white); }

/* Carousel controls */
.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-white); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-md); cursor: pointer; z-index: 2;
}
.hero__arrow--prev { left: var(--space-4); }
.hero__arrow--next { right: var(--space-4); }
.hero__dots {
  position: absolute; bottom: var(--space-4); left: 50%; transform: translateX(-50%);
  display: flex; gap: var(--space-2); z-index: 2;
}
.hero__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.25); border: none; cursor: pointer; padding: 0;
}
.hero__dot.is-active { background: var(--color-accent); }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { min-height: 260px; order: -1; }
  .hero__arrow { width: 32px; height: 32px; font-size: var(--fs-sm); }
  .hero__arrow--prev { left: var(--space-2); }
  .hero__arrow--next { right: var(--space-2); }
  .hero--centered .hero__content,
  .hero--background .hero__content { padding-inline: 48px; }
}

/* ---------- Promo banner ---------- */
.promo-banner {
  background: var(--color-black);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(232,56,13,0.18), transparent 55%);
}
.promo-banner__inner { position: relative; max-width: 560px; margin: 0 auto; }
.promo-banner h2 { color: var(--color-white); text-transform: uppercase; margin-bottom: var(--space-3); }
.promo-banner p { color: var(--color-grey-200); margin-bottom: var(--space-5); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--color-surface);
  text-align: center;
  padding: var(--space-8) var(--space-4);
}
.newsletter h2 { text-transform: uppercase; margin-bottom: var(--space-2); }
.newsletter p { margin-bottom: var(--space-5); }
.newsletter-form { display: flex; gap: var(--space-3); max-width: 420px; margin: 0 auto; }
.newsletter-form input { flex: 1; }
@media (max-width: 480px) { .newsletter-form { flex-direction: column; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-black); color: var(--color-grey-200); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand img { height: 40px; width: auto; max-width: 100%; object-fit: contain; margin-bottom: var(--space-3); }
.nav-drawer__header img { height: 32px; width: auto; max-width: 100%; object-fit: contain; }
.footer-brand p { color: var(--color-grey-500); font-size: var(--fs-sm); max-width: 260px; }
.footer-col h4 { color: var(--color-white); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-4); }
.footer-col a { display: block; color: var(--color-grey-500); font-size: var(--fs-sm); padding-block: var(--space-1); }
.footer-col a:hover { color: var(--color-white); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-7); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 420px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; row-gap: var(--space-6); }
}

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: var(--space-5);
  font-size: var(--fs-xs);
  color: var(--color-grey-500);
  flex-wrap: wrap; gap: var(--space-3);
}
.footer-bottom .brandline { display: flex; align-items: center; gap: var(--space-2); color: var(--color-grey-200); }
.footer-bottom .brandline strong { color: var(--color-white); letter-spacing: 0.03em; }
.social-links { display: flex; gap: var(--space-3); }
.social-links a {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 50%;
  color: var(--color-grey-200);
}
.social-links a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.social-links svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Page header (shop/category/static pages) ---------- */
.page-header { padding-block: var(--space-6); border-bottom: 1px solid var(--color-border); text-align: left; }
.page-header h1 { text-transform: uppercase; margin-bottom: var(--space-2); }

/* ---------- Sidebar/filter layout ---------- */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 900px) { .shop-layout { grid-template-columns: 1fr; } }

.filter-panel { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); }
.filter-group { margin-bottom: var(--space-5); }
.filter-group h4 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: var(--space-3); }
.filter-option { display: flex; align-items: center; gap: var(--space-2); padding-block: var(--space-1); font-size: var(--fs-sm); }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); gap: var(--space-3); flex-wrap: wrap; }
.toolbar .result-count { font-size: var(--fs-sm); color: var(--color-text-muted); }
.toolbar .sort-select { min-width: 200px; }

.mobile-filter-toggle { display: none; }
@media (max-width: 900px) {
  .mobile-filter-toggle { display: inline-flex; }
  .filter-panel { display: none; }
  .filter-panel.is-open { display: block; }
}
