/* ==========================================================================
   AVENTRA IMPEX — Navigation & Floating Actions
   Loaded LAST, after style.css and mobile.css, so these rules always win.
   Kept in its own file so a cached copy of style.css can never suppress them.
   ========================================================================== */

/* --------------------------------------------------------------------------
   GUARD: <body> must never carry a transform.
   A transform on body makes it the containing block for every
   position:fixed element, which drops the floating WhatsApp and
   back-to-top buttons into the footer instead of pinning them to
   the screen. Fade with opacity only.
   -------------------------------------------------------------------------- */
body {
  animation: aventraBodyFade 0.4s ease both !important;
  transform: none !important;
  perspective: none !important;
  filter: none !important;
}

@keyframes aventraBodyFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   FLOATING ACTIONS — pinned to the viewport on every page, every size
   -------------------------------------------------------------------------- */
.floating-actions {
  position: fixed !important;
  right: 1.5rem;
  bottom: 1.5rem;
  left: auto;
  top: auto;
  z-index: 9990;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.floating-actions > * {
  pointer-events: auto;
}

@media (min-width: 992px) {
  .floating-actions {
    right: 2rem;
    bottom: 2rem;
  }
}

/* ==========================================================================
   NAV DROPDOWN — About Aventra / About MD
   ========================================================================== */

.nav-dropdown {
  position: relative !important;
  list-style: none !important;
}

.nav-dropdown > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-caret {
  font-size: 0.6rem;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.75;
}

.nav-dropdown:hover > .nav-link .nav-caret,
.nav-dropdown:focus-within > .nav-link .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute !important;
  list-style: none !important;
  top: calc(100% + 0.65rem);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 290px;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: 16px;
  box-shadow: 0 22px 48px -14px rgba(4, 26, 13, 0.3), 0 4px 12px rgba(4, 26, 13, 0.07);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.26s;
  z-index: 1200;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  margin-left: -7px;
  width: 13px;
  height: 13px;
  background: var(--white);
  border-left: 1px solid var(--cream-border);
  border-top: 1px solid var(--cream-border);
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.nav-dropdown-menu::after {
  content: '';
  position: absolute;
  top: -0.7rem;
  left: 0;
  right: 0;
  height: 0.8rem;
}

.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu,
.nav-dropdown.is-open > .nav-dropdown-menu {
  display: block !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: block !important;
}

.dd-item {
  display: flex !important;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.8rem 0.85rem;
  border-radius: 11px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dd-item i {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.9rem;
  transition: background 0.22s ease, color 0.22s ease;
}

.dd-item span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.dd-item strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--emerald-950);
  line-height: 1.2;
}

.dd-item em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.dd-item:hover,
.dd-item:focus-visible,
.dd-item.active {
  background: var(--cream-bg);
  transform: translateX(2px);
}

.dd-item:hover i,
.dd-item:focus-visible i,
.dd-item.active i {
  background: var(--gold-600);
  color: var(--white);
}

/* --- Mobile drawer accordion --- */
.drawer-group-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.drawer-caret {
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-group.open .drawer-caret {
  transform: rotate(180deg);
  color: var(--gold-400);
}

/* the open group reads as a section header, not as the current page */
.drawer-group.open > .drawer-group-toggle:not(.active) {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.drawer-sub {
  display: grid !important;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-sub-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.drawer-group.open .drawer-sub {
  grid-template-rows: 1fr;
}

.drawer-sublink {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem 0.7rem 2.4rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  border-radius: 9px;
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.drawer-sublink i {
  font-size: 0.8rem;
  color: var(--gold-500);
}

.drawer-sublink:hover,
.drawer-sublink.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  padding-left: 2.65rem;
}

/* --------------------------------------------------------------------------
   <picture> wrappers
   Images are served as JPEG by default with WebP offered on top, so the site
   still shows every photo on a host that does not serve .webp. The wrapper is
   an inline element by default, which would collapse the layouts below.
   -------------------------------------------------------------------------- */
.product-img-box picture,
.modal-inner-grid picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide picture {
  display: block;
}

.about-grid-wrap picture {
  display: block;
  width: 100%;
}
