/* ==========================================================================
   Altira — theme foundation

   Every value here resolves through a --alt-* custom property emitted by
   components/alt/vars.html, which in turn reads the "Altira" groups in Theme
   settings. Nothing in this file hard-codes a colour, a family or a size, so
   the editor stays in charge of all of them.
   ========================================================================== */

/* ---------------------------------------------------------------- reset */

.alt *,
.alt *::before,
.alt *::after { box-sizing: border-box; }

.alt-page {
  margin: 0;
  background: var(--alt-page-bg);
  color: var(--alt-body-color);
  font-family: var(--alt-font-body);
  font-weight: var(--alt-fw-body);
  font-size: var(--alt-body-size);
  line-height: var(--alt-body-lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.alt-page img,
.alt-page video { max-width: 100%; display: block; }

.alt-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--alt-brand);
  color: var(--alt-on-dark);
}
.alt-skip-link:focus { left: 0; }


/* ---------------------------------------------------------------- overflow

   A single stray full-bleed block, a negative margin or a wide table used to
   give the whole page a horizontal scrollbar. Clip it at the root instead:
   `clip` does not create a scroll container, so sticky headers keep working. */

html {
  overflow-x: clip;
  /* The page is the query container that .alt-fullbleed measures against. */
  container-type: inline-size;
  container-name: alt-page;
}

body { overflow-x: clip; }

@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}

/* Media and embeds never widen their column. */
img, svg, video, iframe, canvas { max-width: 100%; }
table { max-width: 100%; }

/* ---------------------------------------------------------------- layout */

/* Matches the reference design's container: the max-width is the outer width
   and the gutter sits inside it, so a 1280px container holds 1250px of content
   behind 15px of padding. */
.alt-container {
  width: 100%;
  /* 1280 is the reference container and the fallback, so a theme whose stored
     settings predate these variables still measures the same. */
  max-width: var(--alt-container, 1280px);
  margin-inline: auto;
  padding-inline: var(--alt-gutter, 15px);
}

.alt-container--wide {
  max-width: var(--alt-container-wide, 1280px);
}

.alt-container--narrow {
  max-width: var(--alt-container-narrow, 740px);
}

.alt-container--full {
  max-width: none;
  padding-inline: var(--alt-gutter, 15px);
}

/* The sections inherited from the base theme measure themselves with
   .page-width, whose max-width is page_width PLUS 30px of padding either side.
   The reference container is 1280px *including* its 15px gutters, so line the
   two up rather than leaving base sections 60px wider than the Altira ones. */
.page-width {
  max-width: var(--alt-container, 1280px);
  padding-inline: var(--alt-gutter, 15px);
}
.page-width--fluid { max-width: 100%; }
.page-width--thin { max-width: var(--alt-container-narrow, 740px); }
@media (max-width: 959px) {
  .page-width { max-width: var(--alt-container, 1280px); padding-inline: var(--alt-gutter, 15px); }
}

/* Breaks a child out of the container and back to the full viewport width. */
.alt-fullbleed {
  width: auto;
  max-width: none;
  margin-left: calc(50% - 50cqw);
  margin-right: calc(50% - 50cqw);
}

/* Older engines, and any context without a query container, fall back to the
   root width — which, unlike 100vw, excludes the scrollbar. */
@supports not (width: 1cqw) {
  .alt-fullbleed {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

/* The per-section padding overrides land on the section element itself as
   --alt-sp-d / -t / -m, so a section can depart from the global rhythm. */
/* --alt-sp-* is the padding for a device; --alt-spb-* overrides just the
   bottom, for the sections the reference design pads asymmetrically. */
.alt-section {
  position: relative;
  padding-top: var(--alt-sp-d, var(--alt-section-pad));
  padding-bottom: var(--alt-spb-d, var(--alt-sp-d, var(--alt-section-pad)));
}
.alt-section--flush { padding-top: 0; padding-bottom: 0; }
.alt-section--flush-top { padding-top: 0; }
.alt-section--flush-bottom { padding-bottom: 0; }

.alt-grid { display: grid; gap: var(--alt-grid-gap, 24px); }
.alt-flex { display: flex; }

/* ---------------------------------------------------------------- type */

/* Bare h1-h6 only get the margin reset. Giving them the full heading treatment
   here would score (0,1,1) and outrank every single-class rule in the sections
   and in the blocks inherited from the base theme, which is how a section's own
   line height or weight ends up ignored. */
.alt-page h1, .alt-page h2, .alt-page h3,
.alt-page h4, .alt-page h5, .alt-page h6 { margin: 0; }

.alt-h1, .alt-h2, .alt-h3, .alt-h4, .alt-h5, .alt-h6,
.alt-rte h1, .alt-rte h2, .alt-rte h3,
.alt-rte h4, .alt-rte h5, .alt-rte h6 {
  font-family: var(--alt-font-heading);
  font-weight: var(--alt-fw-heading);
  color: var(--alt-heading-color);
  letter-spacing: var(--alt-heading-tracking);
  text-transform: var(--alt-heading-transform);
}

/* Sizes attach to the .alt-hN utility classes and to rich text only. Bare
   h1-h6 are left alone so blocks inherited from the base theme (the product
   title, for one) keep their own typography settings. */
.alt-h1, .alt-rte h1 { font-size: var(--alt-h1); line-height: var(--alt-lh-h1); }
.alt-h2, .alt-rte h2 { font-size: var(--alt-h2); line-height: var(--alt-lh-h2); }
.alt-h3, .alt-rte h3 { font-size: var(--alt-h3); line-height: var(--alt-lh-h3); }
.alt-h4, .alt-rte h4 { font-size: var(--alt-h4); line-height: var(--alt-lh-h4); }
.alt-h5, .alt-rte h5 { font-size: var(--alt-h5); line-height: var(--alt-lh-h5); }
.alt-h6, .alt-rte h6 { font-size: var(--alt-h6); line-height: var(--alt-lh-h6); }

.alt-text { margin: 0; font-size: var(--alt-body-size); line-height: var(--alt-body-lh); }
.alt-text--lg { font-size: calc(var(--alt-body-size) * 1.125); }
.alt-text--sm { font-size: calc(var(--alt-body-size) * 0.875); }
.alt-text--muted { color: var(--alt-muted); }
.alt-text--brand { color: var(--alt-brand); }
.alt-text--heading { color: var(--alt-heading-color); }
.alt-text--on-dark { color: var(--alt-on-dark); }

.alt-eyebrow {
  margin: 0;
  font-family: var(--alt-font-heading);
  font-size: calc(var(--alt-body-size) * 0.8125);
  font-weight: var(--alt-fw-heading);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--alt-brand);
}

.alt-align-left   { text-align: left; }
.alt-align-center { text-align: center; }
.alt-align-right  { text-align: right; }

/* Rich-text output from the editor: give the tags the theme's own rhythm. */
.alt-rte > *:first-child { margin-top: 0; }
.alt-rte > *:last-child { margin-bottom: 0; }
.alt-rte p, .alt-rte ul, .alt-rte ol { margin: 0 0 1em; }
.alt-rte h1, .alt-rte h2, .alt-rte h3,
.alt-rte h4, .alt-rte h5, .alt-rte h6 { margin: 1.6em 0 0.6em; }
.alt-rte ul, .alt-rte ol { padding-left: 1.35em; }
.alt-rte li { margin-bottom: 0.4em; }
.alt-rte a { color: var(--alt-brand); text-decoration: underline; text-underline-offset: 3px; }
.alt-rte a:hover { color: var(--alt-brand-dark); }
.alt-rte img { border-radius: var(--alt-radius-media); margin: 1.2em 0; }
.alt-rte strong, .alt-rte b { font-weight: var(--alt-fw-heading-bold); }
.alt-rte blockquote {
  margin: 1.5em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--alt-brand);
  color: var(--alt-muted);
}
.alt-rte table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.alt-rte th, .alt-rte td { padding: 12px 14px; border: 1px solid var(--alt-border); text-align: left; }
.alt-rte th { background: var(--alt-surface); font-weight: var(--alt-fw-heading); }

/* ---------------------------------------------------------------- buttons */

.alt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--alt-btn-pad-y) var(--alt-btn-pad-x);
  border: var(--alt-btn-border) solid transparent;
  border-radius: var(--alt-btn-radius);
  font-family: var(--alt-font-heading);
  font-size: var(--alt-btn-size);
  font-weight: var(--alt-btn-weight);
  letter-spacing: var(--alt-btn-tracking);
  text-transform: var(--alt-btn-transform);
  line-height: 1.33334;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--alt-hover-duration) ease,
              color var(--alt-hover-duration) ease,
              border-color var(--alt-hover-duration) ease,
              transform var(--alt-hover-duration) ease;
}

.alt-btn--primary {
  background: var(--alt-btn-bg);
  color: var(--alt-btn-text);
  border-color: var(--alt-btn-bg);
}
.alt-btn--primary:hover {
  background: var(--alt-btn-bg-hover);
  color: var(--alt-btn-text-hover);
  border-color: var(--alt-btn-outline);
}

.alt-btn--outline {
  background: transparent;
  color: var(--alt-btn-outline);
  border-color: var(--alt-btn-outline);
}
.alt-btn--outline:hover {
  background: var(--alt-btn-bg);
  color: var(--alt-btn-text);
  border-color: var(--alt-btn-bg);
}

.alt-btn--light {
  background: transparent;
  color: var(--alt-on-dark);
  border-color: var(--alt-on-dark);
}
.alt-btn--light:hover {
  background: var(--alt-on-dark);
  color: var(--alt-heading-color);
}

.alt-btn--solid-light {
  background: var(--alt-on-dark);
  color: var(--alt-heading-color);
  border-color: var(--alt-on-dark);
}
.alt-btn--solid-light:hover {
  background: var(--alt-brand);
  color: var(--alt-on-dark);
  border-color: var(--alt-brand);
}

.alt-btn--link {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  color: var(--alt-link-color, var(--alt-heading-color));
  text-decoration: none;
}
.alt-btn--link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: currentColor;
}
.alt-btn--link:hover { color: var(--alt-brand); }

.alt-btn--full { width: 100%; }
.alt-btn[disabled], .alt-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------------- forms */

.alt-field {
  width: 100%;
  padding: 13px 16px;
  background: var(--alt-input-bg);
  color: var(--alt-input-text);
  border: var(--alt-input-border-w) solid var(--alt-input-border);
  border-radius: var(--alt-radius-input);
  font-family: var(--alt-font-body);
  font-size: var(--alt-body-size);
  line-height: 1.4;
}
.alt-field:focus {
  outline: none;
  border-color: var(--alt-brand);
  box-shadow: 0 0 0 2px rgba(var(--alt-brand-rgb), 0.15);
}
.alt-field::placeholder { color: var(--alt-muted); }
textarea.alt-field { min-height: 140px; resize: vertical; }

.alt-label {
  display: block;
  margin-bottom: 7px;
  font-size: calc(var(--alt-body-size) * 0.875);
  font-weight: 500;
  color: var(--alt-heading-color);
}

.alt-form__row { margin-bottom: 18px; }
.alt-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------------------------------------------------------------- media */

.alt-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--alt-radius-media);
  background: var(--alt-surface);
}
.alt-media > img,
.alt-media > video,
.alt-media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--alt-focal, center center);
}

.alt-media--square { aspect-ratio: 1 / 1; }
.alt-media--portrait { aspect-ratio: 3 / 4; }
.alt-media--landscape { aspect-ratio: 4 / 3; }
.alt-media--wide { aspect-ratio: 16 / 9; }

.alt-overlay {
  position: absolute;
  inset: 0;
  background: var(--alt-overlay);
  opacity: var(--alt-section-overlay, var(--alt-overlay-opacity));
  pointer-events: none;
}

.alt-zoom img { transition: transform 0.65s cubic-bezier(0.2, 0.6, 0.2, 1); }
.alt-zoom:hover img { transform: scale(1.06); }

.alt-lift { transition: transform var(--alt-hover-duration) ease, box-shadow var(--alt-hover-duration) ease; }
.alt-lift:hover { transform: translateY(-6px); }

/* ---------------------------------------------------------------- badges */

.alt-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--alt-font-heading);
  font-size: calc(var(--alt-body-size) * 0.75);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--alt-badge-text);
  background: var(--alt-brand);
}
.alt-badge--sale { background: var(--alt-badge-sale-bg); }
.alt-badge--new  { background: var(--alt-badge-new-bg); }
.alt-badge--hot  { background: var(--alt-badge-hot-bg); }

/* ---------------------------------------------------------------- price */

.alt-price { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.alt-price__now { color: var(--alt-price); font-weight: 600; }
.alt-price__was { color: var(--alt-muted); text-decoration: line-through; font-weight: 400; }
.alt-price--on-sale .alt-price__now { color: var(--alt-price-sale); }

/* ---------------------------------------------------------------- reveal */

.alt-reveal {
  opacity: 0;
  transform: translateY(var(--alt-anim-distance));
  transition: opacity var(--alt-anim-duration) cubic-bezier(0, 0, 0.3, 1),
              transform var(--alt-anim-duration) cubic-bezier(0, 0, 0.3, 1);
  transition-delay: var(--alt-delay, 0ms);
}
.alt-reveal.is-in { opacity: 1; transform: none; }

/* Nothing should stay invisible if the reveal script never runs. */
.no-js .alt-reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .alt-reduce-motion .alt-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .alt-reduce-motion * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- utility */

.alt-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.alt-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.alt-no-scrollbar::-webkit-scrollbar { display: none; }
.alt-no-scrollbar { scrollbar-width: none; }

.alt-bg-cream   { background: var(--alt-cream); }
.alt-bg-cream-soft { background: var(--alt-cream-soft); }
.alt-bg-surface { background: var(--alt-surface); }
.alt-bg-brand   { background: var(--alt-brand); color: var(--alt-on-dark); }
.alt-bg-dark    { background: var(--alt-heading-color); color: var(--alt-on-dark); }
.alt-bg-green   { background: var(--alt-green); color: var(--alt-on-dark); }

.alt-bg-brand h1, .alt-bg-brand h2, .alt-bg-brand h3,
.alt-bg-dark h1, .alt-bg-dark h2, .alt-bg-dark h3,
.alt-bg-green h1, .alt-bg-green h2, .alt-bg-green h3,
.alt-bg-brand .alt-h1, .alt-bg-brand .alt-h2, .alt-bg-brand .alt-h3,
.alt-bg-dark .alt-h1, .alt-bg-dark .alt-h2, .alt-bg-dark .alt-h3,
.alt-bg-green .alt-h1, .alt-bg-green .alt-h2, .alt-bg-green .alt-h3 { color: inherit; }

/* Per-device visibility and the tablet/mobile halves of .alt-section live in
   components/alt/vars.html, because the breakpoints they key off are themselves
   theme settings and cannot be written into a static stylesheet. */

/* ---- anchor colour re-assertion (see fix_link_specificity) ---- */
a.alt-skip-link { color: var(--alt-on-dark); }
a.alt-btn--primary { color: var(--alt-btn-text); }
a.alt-btn--primary:hover { color: var(--alt-btn-text-hover); }
a.alt-btn--outline { color: var(--alt-btn-outline); }
a.alt-btn--outline:hover { color: var(--alt-btn-text); }
a.alt-btn--light { color: var(--alt-on-dark); }
a.alt-btn--light:hover { color: var(--alt-heading-color); }
a.alt-btn--solid-light { color: var(--alt-heading-color); }
a.alt-btn--solid-light:hover { color: var(--alt-on-dark); }
a.alt-btn--link { color: var(--alt-link-color, var(--alt-heading-color)); }
a.alt-btn--link:hover { color: var(--alt-brand); }
/* =====================================================================
   Reference match — appended so the rules above stay untouched.
   ===================================================================== */

/* Container. The reference resolves every container to 1280px with 15px
   gutters. The layout prints the theme-setting values on a bare :root, so
   these are written as html:root to outrank them whatever the load order. */

html:root {
  --alt-container: 1280px;
  --alt-container-wide: 1280px;
  --alt-gutter: 15px;
}

@media (max-width: 1023px) {
  html:root { --alt-gutter: 15px; }
}
@media (max-width: 767px) {
  html:root { --alt-gutter: 15px; }
}

.alt-container--wide { max-width: var(--alt-container-wide); }

/* ---------------------------------------------------------- product card */

/* The reference card carries a name and a green price, nothing else. */
.alt-card .alt-price__now,
.alt-card .alt-card__price .alt-price__now { color: #5ea274; }

.alt-card .alt-card__desc,
.alt-card .alt-card__excerpt,
.alt-card .alt-card__description { display: none !important; }


/* These sections render as custom elements, so the rules key off the class
   twice for weight rather than a tag name that never matches. */

/* 48px of air between the buy box and the details tabs, as on the reference. */
.alt-tabs.alt-tabs { padding-top: calc(var(--alt-sp-d, 50px) + 48px); margin-top: 0; }
@media (max-width: 1023px) { .alt-tabs.alt-tabs { padding-top: calc(var(--alt-sp-t, 40px) + 36px); } }
@media (max-width: 767px) { .alt-tabs.alt-tabs { padding-top: calc(var(--alt-sp-m, 32px) + 28px); } }

/* The reference bar is exactly 40px tall. */
.alt-announce.alt-announce { height: var(--alt-announce-h); min-height: var(--alt-announce-h); }
.alt-announce.alt-announce .alt-announce__inner { height: var(--alt-announce-h); padding-block: 0; }

/* ===== pass 3 reference fixes ===== */

/* Banner. The reference slide is 893px tall and the button row sits 32px
   under the heading. Class doubling outranks the section's inline vars. */
.alt-hero.alt-hero .alt-hero__viewport,
.alt-hero.alt-hero .alt-hero__slide { min-height: 893px; }
@media (max-width: 1023px) {
  .alt-hero.alt-hero .alt-hero__viewport,
  .alt-hero.alt-hero .alt-hero__slide { min-height: 640px; }
}
@media (max-width: 767px) {
  .alt-hero.alt-hero .alt-hero__viewport,
  .alt-hero.alt-hero .alt-hero__slide { min-height: 560px; }
}

.alt-hero__buttons { margin-top: 32px; gap: 16px; }
@media (max-width: 767px) { .alt-hero__buttons { margin-top: 24px; } }

/* Footer: more air under each column heading, and no icon in the sign-up
   field, as on the reference. */
.alt-footer .alt-footer__title { margin-bottom: 18px; }
.alt-footer .alt-footer__col--newsletter .alt-footer__title { margin-bottom: 18px; }
/* Space above the details tab bar. */
.alt-tabs .alt-tabs__bar { margin-top: 24px; }

/* ===== round 4 reference fixes ===== */

/* ---------------------------------------------------------- cart icon */
/* The cart bubble ships a bare <button>, which picks up the browser
   default chrome (grey fill, outset border). Strip it back to the icon. */
.alt-header__cart,
.alt-header__cart button,
.alt-header__cart theme-cart-bubble button,
.alt-header .cart-bubble button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  line-height: 0;
}
.alt-header__cart button:focus,
.alt-header__cart button:focus-visible {
  outline: 0;
  box-shadow: none;
}
.alt-header__cart svg { width: 22px; height: 22px; display: block; }

/* ---------------------------------------------------------- product tabs */
/* Written on the suffix so it holds whatever section id the template gets. */
[id$="__product-tabs"] { margin-top: 80px; }
@media (max-width: 767px) { [id$="__product-tabs"] { margin-top: 48px; } }

/* ---------------------------------------------------------- hover */
/* One hover for every button on the site: the fill darkens slightly,
   the outline variants fill in. Matches the reference 0.25s ease. */
.alt-btn,
.alt-card__btn,
.button,
.button--fill,
.alt-hero__btn,
.alt-newsletter__button {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, filter 0.25s ease;
}

.alt-btn:hover,
.alt-card__btn:hover,
.button--fill:hover,
.alt-hero__btn:hover,
.alt-newsletter__button:hover {
  filter: brightness(0.92);
}

.alt-btn--ghost:hover,
.alt-btn--outline:hover,
.button--outline:hover,
.alt-hero__btn--ghost:hover {
  filter: none;
  background: var(--alt-brand, #c0541b);
  border-color: var(--alt-brand, #c0541b);
  color: #ffffff;
}

/* ===== round 5 reference fixes ===== */

/* ---------------------------------------------------------- cart count */
/* The reference badge is a brand-brown pill pinned to the icon corner. */

.alt-header__cart a,
.alt-header__cart button,
.alt-header__cart theme-cart-bubble,
.alt-header .cart-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.alt-header__cart .cart-bubble__count {
  position: absolute;
  top: -5px;
  right: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #c0541b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}

/* No badge when the cart is empty. */
.alt-header__cart .cart-bubble__count:empty { display: none; }
