/* Animated Shop Themes — shared building blocks.
 * Every theme file sets the --hat-* tokens; these rules turn them into a look.
 * Templates use the classes below on Elementor widgets/containers (Advanced → CSS Classes),
 * so buyers can add the same look to anything they build. */

body.hat-on {
  background-color: var(--hat-bg) !important;
  color: var(--hat-ink);
  font-family: var(--hat-body);
  /* Elementor's global colours and fonts follow the theme, so new widgets match automatically */
  --e-global-color-primary: var(--hat-accent);
  --e-global-color-secondary: var(--hat-ink);
  --e-global-color-text: var(--hat-ink);
  --e-global-color-accent: var(--hat-accent);
  --e-global-typography-primary-font-family: var(--hat-display);
  --e-global-typography-secondary-font-family: var(--hat-display);
  --e-global-typography-text-font-family: var(--hat-body);
  --e-global-typography-accent-font-family: var(--hat-display);
}
body.hat-on .elementor-widget-text-editor,
body.hat-on .elementor-widget-text-editor p { color: var(--hat-ink); font-family: var(--hat-body); }
body.hat-on .elementor-heading-title { font-family: var(--hat-display); color: var(--hat-heading, var(--hat-ink)); }
body.hat-on a { color: var(--hat-link, var(--hat-accent)); }

/* ---------- background layer ---------- */
.hat-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hat-scene > * { position: absolute; }
.hat-scene canvas { inset: 0; width: 100%; height: 100%; }

/* ---------- panels and cards ---------- */
.hat-panel {
  background: var(--hat-surface) !important;
  border-radius: var(--hat-radius) !important;
  box-shadow: var(--hat-panel-shadow, 0 14px 34px rgba(0, 0, 0, .18));
  border: var(--hat-panel-border, 0);
}
.hat-card.elementor-widget:not(:has(> .elementor-widget-container)), .hat-card.elementor-widget > .elementor-widget-container,
.hat-card.e-con {
  background: var(--hat-surface);
  border-radius: var(--hat-radius);
  box-shadow: var(--hat-panel-shadow, 0 10px 24px rgba(0, 0, 0, .15));
  border: var(--hat-panel-border, 0);
  padding: 22px 18px;
  height: 100%;
  box-sizing: border-box;
}
.hat-card .elementor-icon { color: var(--hat-accent); fill: var(--hat-accent); }
.hat-card .elementor-icon-box-title, .hat-card .elementor-image-box-title { font-family: var(--hat-display); color: var(--hat-heading, var(--hat-ink)); }
.hat-card .elementor-icon-box-description, .hat-card .elementor-image-box-description { color: var(--hat-muted); }
.hat-card .elementor-image-box-img { width: 100% !important; margin-bottom: 12px !important; }
.hat-card .elementor-image-box-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--hat-radius) * .6); background: var(--hat-stage); }

/* ---------- type ---------- */
body.hat-on .hat-title .elementor-heading-title {
  font-family: var(--hat-display);
  color: var(--hat-title-color, var(--hat-accent));
  text-shadow: var(--hat-title-shadow, none);
  font-weight: var(--hat-title-weight, 700);
  line-height: 1.1;
  text-wrap: balance;
}
body.hat-on .hat-subtitle .elementor-heading-title { font-family: var(--hat-display); color: var(--hat-heading, var(--hat-ink)); font-weight: 600; }
body.hat-on .hat-kicker .elementor-heading-title {
  display: inline-block;
  font: 700 12px/1 var(--hat-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 7px 12px;
  background: var(--hat-kicker-bg, var(--hat-accent));
  color: var(--hat-kicker-ink, var(--hat-accent-ink));
  border-radius: var(--hat-pill, 99px);
}
.hat-muted, .hat-muted p { color: var(--hat-muted) !important; }
body.hat-on .hat-logo .elementor-heading-title {
  font-family: var(--hat-display);
  font-weight: 700;
  color: var(--hat-logo, var(--hat-accent));
  text-shadow: var(--hat-logo-shadow, none);
  white-space: nowrap;
}
.hat-logo .elementor-heading-title a { color: inherit; }

/* ---------- buttons ---------- */
.hat-btn .elementor-button {
  background: var(--hat-btn) !important;
  color: var(--hat-btn-ink) !important;
  border-radius: var(--hat-btn-radius, var(--hat-radius));
  font-family: var(--hat-display);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  box-shadow: var(--hat-btn-shadow, none);
  border: var(--hat-btn-border, 0);
  transition: transform .12s, filter .12s, box-shadow .12s;
}
.hat-btn .elementor-button:hover { transform: translateY(-2px); filter: brightness(1.06); }
.hat-btn .elementor-button:active { transform: translateY(2px); }
.hat-btn-alt .elementor-button {
  background: var(--hat-btn-alt, var(--hat-surface)) !important;
  color: var(--hat-btn-alt-ink, var(--hat-ink)) !important;
}
.hat-btn .elementor-button:focus-visible { outline: 3px solid var(--hat-ink); outline-offset: 3px; }

/* ---------- header, navigation, footer ---------- */
.hat-header { position: relative; z-index: 3; }
.hat-nav .elementor-icon-list-item a, .hat-nav .elementor-icon-list-text { color: var(--hat-nav, var(--hat-ink)) !important; font-family: var(--hat-display); font-weight: 600; }
.hat-nav .elementor-icon-list-item a:hover .elementor-icon-list-text { color: var(--hat-accent) !important; }
.hat-footer .elementor-icon-list-text, .hat-footer .elementor-icon-list-item a { color: var(--hat-footer-ink, var(--hat-ink)) !important; }
.hat-footer .elementor-icon-list-icon i, .hat-footer .elementor-icon-list-icon svg { color: var(--hat-accent); fill: var(--hat-accent); }

/* ---------- framed image (product or hero photo) ---------- */
.hat-frame:not(:has(> .elementor-widget-container)), .hat-frame > .elementor-widget-container { box-sizing: border-box; background: var(--hat-stage); border-radius: var(--hat-radius); padding: 6%; box-shadow: var(--hat-frame-shadow, var(--hat-panel-shadow)); border: var(--hat-frame-border, 0); }
.hat-frame img { display: block; margin: 0 auto; border-radius: calc(var(--hat-radius) * .5); }

/* ---------- announcement ticker ---------- */
.hat-ticker { overflow: hidden; }
body.hat-on .hat-ticker:not(:has(> .elementor-widget-container)), body.hat-on .hat-ticker > .elementor-widget-container { background: var(--hat-ticker-bg, var(--hat-accent)); color: var(--hat-ticker-ink, var(--hat-accent-ink)); overflow: hidden; white-space: nowrap; padding: 8px 0; font-family: var(--hat-display); font-weight: 600; border-radius: var(--hat-ticker-radius, 0); }
.hat-ticker p, body.hat-on .hat-ticker .hat-track span { margin: 0 !important; color: var(--hat-ticker-ink, var(--hat-accent-ink)) !important; }
.hat-ticker .hat-track { display: inline-block; padding-left: 0; animation: hat-marquee var(--hat-ticker-speed, 32s) linear infinite; }
.hat-ticker .hat-track > span { display: inline-block; padding-right: 3em; }
@keyframes hat-marquee { to { transform: translateX(-50%); } }

/* ---------- toggles / FAQ (free Elementor Toggle widget) ---------- */
.hat-faq .elementor-toggle-item { background: var(--hat-surface); border-radius: var(--hat-radius); margin-bottom: 10px; overflow: hidden; box-shadow: var(--hat-panel-shadow); }
.hat-faq .elementor-tab-title { border: 0 !important; font-family: var(--hat-display); color: var(--hat-heading, var(--hat-ink)) !important; }
.hat-faq .elementor-tab-title a { color: inherit !important; }
.hat-faq .elementor-tab-content { border: 0 !important; color: var(--hat-ink); }

/* ---------- Design Picker plugin, if installed ---------- */
body.hat-on .hgdp-page-gallery { background: var(--hat-stage); border-radius: var(--hat-radius); }
body.hat-on .hgdp-tile { --hgdp-radius: var(--hat-radius); }
body.hat-on .hgdp-tile[aria-checked="true"] { box-shadow: 0 0 0 3px var(--hat-accent), 0 0 0 7px var(--hat-surface); }
body.hat-on .hgdp-page-buy .single_add_to_cart_button { background: var(--hat-btn); color: var(--hat-btn-ink); border-radius: var(--hat-btn-radius, var(--hat-radius)); font-family: var(--hat-display); box-shadow: var(--hat-btn-shadow, none); border: 0; }

/* ---------- weather switch (Frog Pond, when visitors may choose) ---------- */
.hat-weather { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 50; display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(255, 255, 255, .94); box-shadow: 0 6px 18px rgba(20, 80, 60, .25); }
.hat-weather button { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 99px; font: 700 14px/1 var(--hat-display); color: #2f6b3a; }
.hat-weather button[aria-pressed="true"] { background: #5cbf5f; color: #fff; }
.hat-weather button:focus-visible { outline: 2px solid #2f6b3a; outline-offset: 2px; }

/* ---------- static mode and reduced motion: same picture, nothing moves ---------- */
.hat-motion-static .hat-scene *, .hat-motion-static .hat-track, .hat-motion-static .hat-anim, .hat-motion-static .hat-note { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .hat-scene *, .hat-track, .hat-anim, .hat-note { animation: none !important; transition: none !important; }
  .hat-btn .elementor-button { transition: none; }
}
