/* aromuli shared tokens + primitives. Loaded in editor + front.
   Values mirror the approved redesign (see brand-visual.json). */
:root {
  --am-lime: #a3cf44;
  --am-leaf: #7fae23;
  --am-leaf-deep: #5d8317;
  --am-sun: #ffce43;
  --am-sun-hover: #f5bd1e;
  --am-tangerine: #ef8f61;
  --am-tangerine-hover: #e0733f;
  --am-ink: #33401f;
  --am-body: #57604a;
  --am-paper: #fffdf8;
  --am-mist: #f3f8e6;
  --am-card: #ffffff;
  --am-line: #e6ecd7;
  --am-imgbox: #f6f4ef;
  --am-radius: 26px;
  --am-shadow: 0 14px 40px -18px rgba(51, 64, 31, 0.25);
  --am-shadow-soft: 0 8px 30px -22px rgba(51, 64, 31, 0.3);
  --am-font-display: "Ubuntu Condensed", Helvetica, Arial, sans-serif;
  --am-font-body: Ubuntu, Helvetica, Arial, sans-serif;
  --am-font-script: Caveat, cursive;
}

/* Content measure — sections are full-bleed (align:full), their inner content
   mirrors the design's .wrap: a 1180px border-box with the gutter as
   padding, i.e. 1092px of content on desktop. */
.am-wrap {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  padding-inline: clamp(20px, 4vw, 44px);
  position: relative;
}

/* Blocks hosted inside a padded core group section (the section-head/
   product-grid/tiere-intro sections) already get the gutter from the
   group's global padding and content width — don't double it with the
   wrap's own. Scoped to section groups: the page's <main> group would
   otherwise match and strip the gutter everywhere. */
section.wp-block-group .am-wrap {
  padding-inline: 0;
}

/* Section rhythm: generous block padding, mist for the alternating bands. */
.am-section {
  position: relative;
  padding-block: clamp(56px, 7vw, 100px);
}

.am-section--mist {
  background: var(--am-mist);
}

/* Accent span inside headings (design .go / .accent). */
.am-accent {
  color: var(--am-leaf);
}

/* =========================================================
   Buttons — the lime pill and its ghost/sun/tangerine variants.
   ========================================================= */
.am-btn {
  display: inline-block;
  font-family: var(--am-font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.65; /* the design's .btn inherits the body line-height */
  background: var(--am-lime);
  color: #ffffff;
  text-decoration: none;
  padding: 13px 30px;
  border: 2px solid var(--am-lime);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

/* Hold the button's own text colour through every state — otherwise the
   theme's link colours win and tint the label. */
.am-btn:hover,
.am-btn:focus,
.am-btn:focus-visible,
.am-btn:active {
  color: #ffffff;
}

.am-btn:hover,
.am-btn:focus-visible {
  background: var(--am-leaf);
  border-color: var(--am-leaf);
  transform: translateY(-2px);
}

.am-btn--ghost {
  background: transparent;
  color: var(--am-ink);
  border-color: var(--am-ink);
}

.am-btn--ghost:hover,
.am-btn--ghost:focus-visible {
  background: var(--am-ink);
  border-color: var(--am-ink);
  color: #ffffff;
}

.am-btn--ghost:focus,
.am-btn--ghost:active {
  color: var(--am-ink);
}

.am-btn--ghost:hover,
.am-btn--ghost:focus-visible {
  color: #ffffff;
}

.am-btn--sun {
  background: var(--am-sun);
  border-color: var(--am-sun);
  color: var(--am-ink);
}

.am-btn--sun:hover,
.am-btn--sun:focus,
.am-btn--sun:focus-visible,
.am-btn--sun:active {
  color: var(--am-ink);
}

.am-btn--sun:hover,
.am-btn--sun:focus-visible {
  background: var(--am-sun-hover);
  border-color: var(--am-sun-hover);
}

.am-btn--tangerine {
  background: var(--am-tangerine);
  border-color: var(--am-tangerine);
}

.am-btn--tangerine:hover,
.am-btn--tangerine:focus-visible {
  background: var(--am-tangerine-hover);
  border-color: var(--am-tangerine-hover);
}

/* =========================================================
   Editorial primitives — script eyebrow, section H2, leafmark.
   ========================================================= */
.am-eyebrow {
  font-family: var(--am-font-script);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 31px);
  /* No line-height: the design's .eyebrow inherits the body's 1.65. */
  color: var(--am-leaf);
  display: block;
  width: fit-content;
  rotate: -1.5deg;
  margin: 0;
}

.am-h2 {
  font-family: var(--am-font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--am-ink);
  margin: 0 0 16px;
}

/* The start page runs its headings one step larger than the inner pages
   (index.html: clamp(34px,4vw,52px)/18px vs shop/über-uns: 48px/16px).
   Front end only — the editor canvas has no body.home. */
.home .am-h2 {
  font-size: clamp(34px, 4vw, 52px);
  margin-bottom: 18px;
}

/* Two lime petals after a heading (design .leafmark). */
.am-leafmark {
  display: inline-flex;
  gap: 3px;
  margin-left: 12px;
  vertical-align: middle;
}

.am-leafmark i {
  width: 15px;
  height: 15px;
  background: var(--am-lime);
  border-radius: 0 70% 0 70%;
  rotate: 45deg;
}

.am-leafmark i:last-child {
  rotate: -45deg;
  border-radius: 70% 0 70% 0;
  background: var(--am-leaf);
}

/* Centered section head (eyebrow + H2 on 720px measure). */
.am-section-head {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.am-section-head .am-eyebrow {
  margin-inline: auto;
}

/* =========================================================
   Drift — the aroma-garden scroll parallax for leaf/lemon cutouts.
   Scroll-driven animation where supported; motion.js covers the rest.
   ========================================================= */
.am-drift {
  will-change: transform;
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .am-drift {
      animation: am-drift auto linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}

@keyframes am-drift {
  from {
    transform: translate3d(0, var(--y0, 7vh), 0) rotate(var(--r0, -14deg)) scale(var(--s0, 1));
  }
  to {
    transform: translate3d(0, var(--y1, -7vh), 0) rotate(var(--r1, 10deg)) scale(var(--s1, 1));
  }
}

/* «Ausblenden» in the editor: the canvas keeps the static preview markup,
   so hide the garnish by class (the front end never renders it at all). */
.is-deco-ohne .am-drift {
  display: none;
}

/* =========================================================
   Reveal on scroll — gated on html.am-js so content never
   stays hidden without JavaScript.
   ========================================================= */
.am-js .am-reveal {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.7s ease, translate 0.7s ease;
}

.am-js .am-reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .am-js .am-reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }
}

/* =========================================================
   Product cards — shared by the product-grid block and the
   design's card look for any product listing.
   ========================================================= */
.am-prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 30px);
  margin-top: 40px;
}

/* Start page: .prod-grid sits 44px under the section head, and the cards
   run one step larger than in the Lädeli (index.html .prod-card). */
.home .am-prod-grid {
  margin-top: 44px;
}

.home .am-prod-card__body {
  padding: 24px 26px 28px;
  gap: 6px;
}

.home .am-prod-card__title {
  font-size: 26px;
}

.home .am-prod-card__meta {
  font-size: 15px;
}

.home .am-prod-card__row {
  padding-top: 14px;
}

.home .am-prod-card__price {
  font-size: 22px;
}

.home .am-prod-card__go {
  font-size: 15px;
}

.am-prod-card {
  background: var(--am-card);
  border: 1px solid var(--am-line);
  border-radius: var(--am-radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--am-shadow-soft);
}

.am-prod-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--am-shadow);
}

.am-prod-card__imgbox {
  background: var(--am-imgbox);
  overflow: hidden;
  position: relative;
}

.am-prod-card__imgbox img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: scale 0.4s ease;
}

.am-prod-card:hover .am-prod-card__imgbox img {
  scale: 1.05;
}

/* Script tag pill («Beliebt», «Für Tiere» …). */
.am-prod-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--am-sun);
  color: var(--am-ink);
  font-family: var(--am-font-script);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 999px;
  rotate: -4deg;
}

.am-prod-card__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.am-prod-card__title {
  font-family: var(--am-font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--am-ink);
  margin: 0;
}

.am-prod-card__meta {
  font-family: var(--am-font-body);
  font-weight: 300;
  font-size: 14.5px;
  color: var(--am-body);
}

.am-prod-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.am-prod-card__price {
  font-family: var(--am-font-display);
  font-size: 21px;
  color: var(--am-ink);
}

/* WooCommerce sale price markup inside the card price. */
.am-prod-card__price del {
  color: var(--am-body);
  font-size: 0.8em;
  margin-right: 6px;
}

.am-prod-card__price ins {
  text-decoration: none;
}

.am-prod-card__go {
  font-family: var(--am-font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--am-leaf-deep);
}

/* Tiere context: tangerine tag + go-link (design .tiere-band). */
.am-tiere-scope .am-prod-card__tag,
.has-tiere-gradient-background .am-prod-card__tag {
  background: var(--am-tangerine);
  color: #ffffff;
}

.am-tiere-scope .am-prod-card__go,
.has-tiere-gradient-background .am-prod-card__go {
  color: #c05f2c;
}

@media (max-width: 980px) {
  .am-prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .am-prod-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Form primitives — the white card, wells and notices (kontakt).
   ========================================================= */
.am-field {
  margin-bottom: 20px;
}

.am-field label {
  display: block;
  font-family: var(--am-font-display);
  font-size: 14.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--am-ink);
  margin-bottom: 7px;
}

.am-field__req {
  color: var(--am-tangerine);
}

.am-input,
.am-select,
.am-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--am-font-body);
  font-size: 16px;
  color: var(--am-ink);
  background: var(--am-paper);
  border: 1.5px solid var(--am-line);
  border-radius: 14px;
  padding: 13px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.am-input:focus,
.am-select:focus,
.am-textarea:focus {
  outline: none;
  border-color: var(--am-lime);
  box-shadow: 0 0 0 3px rgba(163, 207, 68, 0.25);
}

.am-textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

/* The little arithmetic captcha: script chip + narrow well. */
.am-captcha {
  display: flex;
  align-items: center;
  gap: 14px;
}

.am-captcha__q {
  font-family: var(--am-font-script);
  font-weight: 700;
  font-size: 26px;
  color: var(--am-leaf-deep);
  background: var(--am-mist);
  border-radius: 14px;
  padding: 8px 18px;
  white-space: nowrap;
}

.am-captcha .am-input {
  width: 90px;
}

/* Honeypot field (bots fill it, humans never see it). */
.am-field--hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Post-submit notice rendered above the form after the admin-post redirect. */
.am-form-notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.5;
}

.am-form-notice.is-success {
  background: var(--am-mist);
  border: 1px solid var(--am-lime);
  color: var(--am-ink);
}

.am-form-notice.is-error {
  background: #fdf3ec;
  border: 1px solid var(--am-tangerine);
  color: var(--am-ink);
}

/* Small print under the product info cards. */
.am-hinweis {
  font-size: 14px;
  margin-top: 18px;
}

/* Editor only: core marks every top-level dynamic block `draggable="true"` and
   paints `cursor: grab` on the wrapper, which bleeds across our decorative
   markup. Reset it on our block roots — dragging still works via the toolbar
   mover handle. */
.editor-styles-wrapper .block-editor-block-list__block.wp-block[class*="wp-block-aromuli-"] {
  cursor: auto;
}
