/* Functionality-only additions. The approved Figma layout lives untouched in figma-design.css. */
.currency-wrap { position: relative; }
.currency-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 9px); z-index: 80;
  min-width: 168px; padding: 7px; background: #fff; color: #222;
  border: 1px solid #e3e3e3; border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.12);
}
.currency-wrap.is-open .currency-menu { display: block; }
.currency-menu button { display: flex; width: 100%; justify-content: space-between; padding: 8px 9px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.currency-menu button:hover, .currency-menu button.is-active { background: #f7f4ef; }
.hoorain-toast {
  position: fixed; left: 18px; bottom: 18px; z-index: 9999; max-width: min(360px, calc(100vw - 36px));
  padding: 11px 14px; border-radius: 6px; background: #1e1e1e; color: #fff; font-size: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.hoorain-toast.is-visible { opacity: 1; transform: translateY(0); }
.speak.is-listening { outline: 1px solid #2f5a43; outline-offset: 2px; }
.newsletter button[disabled], .btn--olive[disabled] { opacity: .6; cursor: wait; }
.wp-content-shell { width: min(1180px, calc(100% - 40px)); margin: 48px auto 72px; }
.woocommerce .wp-content-shell, .woocommerce-page .wp-content-shell { min-height: 55vh; }
@media (max-width: 640px) { .currency-menu { right: auto; left: 0; } }

/* =========================================================
   v3.0.1 FUNCTIONAL LAYER
   These rules do not alter the approved resting Figma layout.
   ========================================================= */

/* Primary navigation dropdowns: top-level sizes/spacing remain governed by figma-design.css. */
.main-nav > ul > .nav-item { position: relative; list-style: none; }
.main-nav .nav-parent-link .ico--chev { transition: transform .2s ease; }
.main-nav .nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 120;
  width: 230px;
  display: grid;
  justify-content: stretch;
  flex-wrap: nowrap;
  gap: 0;
  padding: 8px;
  margin: 0;
  background: #fff;
  border: 1px solid #ece7e1;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(28, 22, 18, .12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.main-nav .nav-dropdown li { width: 100%; list-style: none; }
.main-nav .nav-dropdown a {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 0;
  border-radius: 5px;
  color: #38332f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
}
.main-nav .nav-dropdown a span { opacity: .5; transition: transform .18s ease, opacity .18s ease; }
.main-nav .nav-dropdown a:hover,
.main-nav .nav-dropdown a:focus-visible { background: #f8f4ef; color: var(--green-btn); }
.main-nav .nav-dropdown a:hover span,
.main-nav .nav-dropdown a:focus-visible span { opacity: 1; transform: translateX(2px); }
.main-nav .nav-item--has-submenu:hover > .nav-dropdown,
.main-nav .nav-item--has-submenu:focus-within > .nav-dropdown,
.main-nav .nav-item--has-submenu.is-submenu-open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.main-nav .nav-item--has-submenu.is-submenu-open > .nav-parent-link .ico--chev { transform: rotate(180deg); }

/* AI assistant input keeps the exact Figma dimensions; only state/animation is added. */
.ai-panel__input { transition: border-color .18s ease, box-shadow .18s ease; }
.ai-panel__input.is-ai-pulse {
  animation: hmaiAiInputPulse .48s ease;
}
.chips button.is-ai-suggesting { animation: hmaiAiChipSuggest .9s ease; }
@keyframes hmaiAiInputPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(53,82,64,0); }
  45% { border-color: rgba(53,82,64,.55); box-shadow: 0 0 0 3px rgba(53,82,64,.08); }
}
@keyframes hmaiAiChipSuggest {
  0%,100% { transform: translateY(0); }
  45% { transform: translateY(-1px); }
}

/* Instagram is converted to a horizontal track with the exact same six visible columns. */
.insta__grid[data-carousel="insta"] {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 60px) / 6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.insta__grid[data-carousel="insta"]::-webkit-scrollbar { display: none; }
.insta__grid[data-carousel="insta"] > li { scroll-snap-align: start; }

/* Make carousel tracks comfortable to swipe without changing their measurements. */
[data-carousel] { -webkit-overflow-scrolling: touch; cursor: grab; }
[data-carousel].is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }

@media (max-width: 900px) {
  .main-nav > ul > .nav-item { width: 100%; }
  .main-nav .nav-dropdown {
    position: static;
    width: 100%;
    max-height: 0;
    display: block;
    padding: 0 0 0 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    overflow: hidden;
    transform: none;
    transition: max-height .22s ease, padding .22s ease;
  }
  .main-nav .nav-item--has-submenu.is-submenu-open > .nav-dropdown {
    max-height: 260px;
    padding-top: 4px;
    padding-bottom: 7px;
    pointer-events: auto;
    transform: none;
  }
  .main-nav .nav-dropdown a {
    padding: 9px 0;
    border-bottom: 1px solid #f4f1ee;
    border-radius: 0;
    font-size: 11px;
  }
  .insta__grid[data-carousel="insta"] {
    grid-template-columns: none;
    grid-auto-columns: calc((100% - 16px) / 3);
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-panel__input.is-ai-pulse,
  .chips button.is-ai-suggesting { animation: none !important; }
}
