/* Final accessibility corrections; existing palette/layout and imagery retained. */
.elementor .aw8-home-copy p:not(.aw8-eyebrow),
.elementor .aw8-home-section .elementor-widget-text-editor p:not(.aw8-eyebrow){color:#485349}
.aw8-home-copy a:not(.elementor-button),.aw8-long-content p a,.aw8-page-section p a{ text-decoration:underline;text-underline-offset:.2em }
.agro-main-nav .aw8-nav-toggle{min-width:32px;min-height:36px}
.aw8-home-card .elementor-button{min-height:44px;display:inline-flex;align-items:center}
.aw8-footer-grid a:not(.aw8-footer-brand){min-height:32px;padding-block:5px}
button.shopengine_add_to_list_action,button.shopengine_comparison_add_to_list_action{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:1px solid #dedfd2;background:#fffef9;color:#123729;border-radius:6px;cursor:pointer}
#aw-final-main:focus{outline:3px solid #856c3b;outline-offset:-3px}
@media(max-width:1024px){.agro-main-nav .aw8-nav-toggle{min-width:44px;min-height:44px}}

.agro-header-action small{color:#5a6456}
.agro-cart-count{background:#735c32}
.elementor .aw8-home-hero .aw8-eyebrow{color:#725b2f}
.aw8-home-products ul.products li.product a:not(.button):not(.woocommerce-LoopProduct-link){color:#355d40;text-decoration:underline;text-underline-offset:.2em;min-height:28px;display:inline-flex;align-items:center}
.aw8-home-section .elementor-widget-text-editor a{text-decoration:underline;text-underline-offset:.2em}

/* AgroWholesale motion and interaction styles. */
:root {
  --agro-motion-gold: #a7823f;
  --agro-motion-ease: cubic-bezier(.22,.72,.26,1);
}

/* Shared button feedback. Existing destinations and triggers stay in charge. */
:is(.aw-home01,.aw-about01,.aw8-editorial-page,.aw8-catalogue,.agro-site-header)
  :is(.aw-home-btn,.aw-about-btn:not(.aw-about-text),.aw8-view-product,.agro-quote-btn,.aw8-button,.aw8-primary-button) {
  position: relative;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease,
    box-shadow 220ms ease, translate 220ms var(--agro-motion-ease);
}
:is(.aw-home01,.aw-about01,.aw8-editorial-page,.aw8-catalogue,.agro-site-header)
  :is(.aw-home-btn,.aw-about-btn:not(.aw-about-text),.aw8-view-product,.agro-quote-btn,.aw8-button,.aw8-primary-button):focus-visible,
.agro-main-nav a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
:is(.aw-home-btn,.aw-about-btn,.aw8-view-product,.agro-quote-btn):active { translate: 0 1px; }
.agro-quote-btn > span, .aw8-card-arrow, .aw8-text-link > span {
  display: inline-block;
  transition: translate 220ms var(--agro-motion-ease);
}
.agro-main-nav .aw8-menu > li > a {
  position: relative;
  transition: color 180ms ease;
}
.agro-main-nav .aw8-menu > li > a::after {
  content: "";
  position: absolute;
  inset: auto 6px 8px;
  height: 2px;
  background: var(--agro-motion-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 210ms var(--agro-motion-ease);
  pointer-events: none;
}
.agro-main-nav .aw8-menu > li > a:is(:hover,:focus-visible,[aria-current="page"])::after,
.agro-main-nav .aw8-menu > li:is(.is-open,.agro-motion-current) > a::after { transform: scaleX(1); }
.agro-main-nav .aw8-menu a[aria-current="page"] { color: #6d5225; text-decoration: underline; text-underline-offset: .16em; }
.agro-main-nav .aw8-menu > li > a[aria-current="page"] { text-decoration: none; }

@media (hover: hover) and (pointer: fine) {
  :is(.aw-home01,.aw-about01,.aw8-editorial-page,.aw8-catalogue,.agro-site-header)
    :is(.aw-home-btn,.aw-about-btn:not(.aw-about-text),.aw8-view-product,.agro-quote-btn,.aw8-button,.aw8-primary-button):hover {
    translate: 0 -2px;
    box-shadow: 0 5px 12px #102f2738, inset 0 0 0 1px #ae8d51ae;
  }
  .agro-quote-btn:hover > span, .aw8-category-card:hover .aw8-card-arrow,
  .aw8-text-link:hover > span { translate: 3px 0; }
  :is(.aw-home01,.aw-about01) figure { position: relative; overflow: clip; border-radius: 8px; }
  :is(.aw-home01,.aw-about01) figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg,transparent 63%,#173d311a);
    opacity: 0;
    transition: opacity 320ms ease;
    pointer-events: none;
  }
  :is(.aw-home01,.aw-about01) figure:hover::after { opacity: 1; }
  :is(.aw-home01,.aw-about01) figure img,
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product) img {
    transition: scale 480ms var(--agro-motion-ease), clip-path 480ms var(--agro-motion-ease);
  }
  :is(.aw-home01,.aw-about01) figure:hover img,
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product):hover img { scale: 1.025; }
  .aw8-catalogue li.product img { clip-path: inset(0 round 4px); }
  .aw8-catalogue li.product:hover img { clip-path: inset(1.23% round 4px); }
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product) {
    transition: translate 240ms var(--agro-motion-ease), box-shadow 240ms ease, border-color 240ms ease;
  }
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product):hover {
    translate: 0 -3px;
    box-shadow: 0 10px 23px #173d311c;
    border-color: #ad925d;
  }
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product) :is(h3,strong,.woocommerce-loop-product__title) { transition: color 220ms ease; }
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product):hover :is(h3,strong,.woocommerce-loop-product__title) { color: #6d5225; }
}

@media (prefers-reduced-motion: no-preference) {
  /* The opening frame is readable, including while later layers are staggered. */
  .aw-home-hero .aw-home-split > div > :is(p,h1),
  .aw-home-hero .aw-home-actions > a {
    animation: agro-motion-hero-copy 630ms var(--agro-motion-ease) var(--agro-hero-delay,0ms) backwards;
  }
  .aw-home-hero h1 { --agro-hero-delay: 70ms; }
  .aw-home-hero .aw-home-split > div > p:not(.aw-home-eyebrow) { --agro-hero-delay: 125ms; }
  .aw-home-hero .aw-home-actions > a { --agro-hero-delay: 175ms; }
  .aw-home-hero .aw-home-actions > a + a { --agro-hero-delay: 235ms; }
  .aw-home-hero .aw-home-eyebrow::after {
    content: "";
    display: inline-block;
    vertical-align: middle;
    width: 26px;
    height: 1px;
    margin-left: 9px;
    background: var(--agro-motion-gold);
    transform-origin: left;
    animation: agro-motion-accent 950ms var(--agro-motion-ease) both;
  }
  .aw-home-hero figure { animation: agro-motion-hero-copy 780ms var(--agro-motion-ease); overflow: clip; border-radius: 8px; }
  .aw-home-hero figure img { animation: agro-motion-hero-zoom 7s ease-out; }

  .agro-motion-reveal {
    animation: agro-motion-rise 620ms var(--agro-motion-ease) var(--agro-motion-delay,0ms) backwards;
  }
  figure.agro-motion-reveal { animation-name: agro-motion-mask; }
  .aw8-has-children.is-open > .aw8-panel { animation: agro-motion-panel-in 190ms var(--agro-motion-ease); }
  @media (min-width: 851px) {
    .aw-home-split figure.agro-motion-reveal, .aw-about-split figure.agro-motion-reveal { --agro-motion-x: 12px; }
    :is(.aw-home-reverse,.aw-about-reverse) figure.agro-motion-reveal { --agro-motion-x: -12px; }
  }
  @media (min-width: 1025px) {
    @supports (interactivity: inert) and (transition-behavior: allow-discrete) {
      .aw8-has-children > .aw8-panel {
        opacity: 0;
        translate: 0 -5px;
        interactivity: inert;
        pointer-events: none;
        transition: opacity 175ms ease, translate 175ms ease, display 175ms allow-discrete;
      }
      .aw8-has-children.is-open > .aw8-panel {
        opacity: 1;
        translate: none;
        interactivity: auto;
        pointer-events: auto;
        animation: none;
      }
      @starting-style {
        .aw8-has-children.is-open > .aw8-panel { opacity: 0; translate: 0 -5px; }
      }
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .agro-motion-reveal, .aw8-panel,
  :is(.aw-home01,.aw-about01,.aw8-catalogue,.aw8-editorial-page,.agro-site-header) * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product):hover,
  :is(.aw-home-btn,.aw-about-btn,.aw8-view-product,.agro-quote-btn):is(:hover,:active) { translate: none; }
  :is(.aw-home01,.aw-about01) figure:hover img,
  :is(.aw-home-card,.aw8-category-card,.aw8-catalogue li.product):hover img { scale: none; clip-path: none; }
}
@keyframes agro-motion-hero-copy { from { opacity: .96; translate: 0 7px; } to { opacity: 1; translate: none; } }
@keyframes agro-motion-hero-zoom { from { transform: scale(1.028); } to { transform: scale(1); } }
@keyframes agro-motion-accent { from { transform: scaleX(.2); } to { transform: scaleX(1); } }
@keyframes agro-motion-rise { from { opacity: .78; translate: 0 10px; } to { opacity: 1; translate: none; } }
@keyframes agro-motion-mask {
  from { opacity: .82; translate: var(--agro-motion-x,0) 6px; clip-path: inset(3% 2% 1% round 8px); }
  to { opacity: 1; translate: none; clip-path: inset(0 round 8px); }
}
@keyframes agro-motion-panel-in { from { opacity: .92; translate: 0 -5px; } to { opacity: 1; translate: none; } }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.aw-home01,.aw-about01) :is(.aw-home-btn,.aw-about-btn):not(.aw-about-text):hover::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(115deg,transparent 28%,#dfc48c38 48%,transparent 68%);
    background-size: 260% 100%;
    animation: agro-motion-sweep 680ms ease-out both;
  }
  :is(.aw-home-btn,.aw-about-btn,.aw8-view-product,.agro-quote-btn):hover:active { translate: 0 1px; }
  .agro-site-header .agro-quote-btn:hover { background-color: #355d40; }
}
@keyframes agro-motion-sweep {
  from { background-position: 100% 0; opacity: .25; }
  55% { opacity: 1; }
  to { background-position: 0 0; opacity: 0; }
}

@media (hover: hover) and (pointer: fine) {
  :is(.aw-home01,.aw-about01) :is(.aw-home-btn,.aw-about-btn):not(.aw-home-alt,.aw-about-alt,.aw-about-text):hover {
    border-color: var(--agro-motion-gold);
  }
  .aw8-editorial-page .aw8-text-link:hover, .aw8-catalogue .aw8-view-product:hover,
  .aw-about01 .aw-about-text:hover { color: #6d5225; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.aw-home01,.aw-about01) :is(.aw-home-actions,.aw-about-actions) > :is(.aw-home-btn,.aw-about-btn):not(.aw-about-text)::after {
    content: "";
    position: absolute;
    inset: calc(50% - 3px) 5px auto auto;
    width: 5px;
    height: 5px;
    border-block-start: 1px solid currentColor;
    border-inline-end: 1px solid currentColor;
    transform: translateX(-3px) rotate(45deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
  }
  :is(.aw-home01,.aw-about01) :is(.aw-home-actions,.aw-about-actions) > :is(.aw-home-btn,.aw-about-btn):not(.aw-about-text):hover::after {
    opacity: 1;
    transform: translateX(0) rotate(45deg);
  }
}

/* Match the catalogue selector so the hover interpolates without changing dimensions. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .aw8-catalogue ul.products > li.product {
    transition: transform 240ms var(--agro-motion-ease), box-shadow 240ms ease, border-color 240ms ease;
  }
  .aw8-catalogue ul.products > li.product:hover {
    translate: none;
    transform: translateY(-3px);
    box-shadow: 0 10px 23px #173d311c;
    border-color: #ad925d;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aw8-catalogue ul.products > li.product:hover { transform: none; }
}
