/* Interaction and visual refinements layered over the base Accurex stylesheet. */
html {
  scroll-padding-top: 118px;
}

#accurex-homepage [id] {
  scroll-margin-top: 118px;
}

/* Keep primary navigation visible while the visitor explores the page. */
#accurex-homepage .ax-header {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 28px rgba(23, 27, 25, .08);
}

/* Give the highlight cards a restrained sense of movement and location. */
#accurex-homepage .ax-card {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  will-change: transform;
}

#accurex-homepage .ax-card-top,
#accurex-homepage .ax-card-number,
#accurex-homepage .ax-card-link .ax-arrow,
#accurex-homepage .ax-industrial-tag-small,
#accurex-homepage .ax-reader,
#accurex-homepage .ax-antenna,
#accurex-homepage .ax-network {
  transition: transform .24s ease, background-color .24s ease, box-shadow .24s ease, filter .24s ease;
}

#accurex-homepage .ax-card:hover,
#accurex-homepage .ax-card:focus-within {
  transform: translateY(-5px);
  border-color: #cbd0c6;
  box-shadow: 0 16px 34px rgba(35, 48, 27, .10);
}

#accurex-homepage .ax-card:hover .ax-card-top,
#accurex-homepage .ax-card:focus-within .ax-card-top {
  background: #edf0e8;
}

#accurex-homepage .ax-card:hover .ax-card-number,
#accurex-homepage .ax-card:focus-within .ax-card-number {
  transform: translateX(4px);
}

#accurex-homepage .ax-card:hover .ax-card-link .ax-arrow,
#accurex-homepage .ax-card:focus-within .ax-card-link .ax-arrow {
  transform: translate(2px, -2px) rotate(7deg);
}

#accurex-homepage .ax-card:hover .ax-industrial-tag-small,
#accurex-homepage .ax-card:focus-within .ax-industrial-tag-small {
  transform: translateY(-3px) scale(1.035);
  filter: drop-shadow(0 12px 13px rgba(36, 49, 27, .20));
}

/* Fixed RFID reader: broad chassis, inset top panel, status strip and antenna ports. */
#accurex-homepage .ax-reader {
  position: relative;
  width: 126px;
  height: 83px;
  border: 2px solid #c0c8b5;
  border-radius: 17px;
  background: linear-gradient(145deg, #f6f6ee 0%, #e0e4d8 62%, #c8d0bf 100%);
  box-shadow: 6px 8px 0 #83907a, 12px 17px 19px rgba(36, 49, 27, .18);
  transform: rotate(-8deg) skewY(2deg);
}

#accurex-homepage .ax-reader::before,
#accurex-homepage .ax-reader::after {
  content: none;
}

#accurex-homepage .ax-reader-panel {
  position: absolute;
  inset: 14px 17px 18px 17px;
  border: 2px solid #89987d;
  border-radius: 12px;
  background: linear-gradient(145deg, #d7dfcf, #bfcbb6);
  box-shadow: inset 0 0 0 4px #eef1e8;
}

#accurex-homepage .ax-reader-panel::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 45px;
  height: 7px;
  border-radius: 7px 0 10px 0;
  background: var(--ax-orange);
  opacity: .92;
}

#accurex-homepage .ax-reader-leds {
  position: absolute;
  left: 20px;
  top: 8px;
  width: 39px;
  height: 5px;
  background: radial-gradient(circle at 3px 50%, #81966e 0 2px, transparent 2.5px), radial-gradient(circle at 14px 50%, #81966e 0 2px, transparent 2.5px), radial-gradient(circle at 25px 50%, var(--ax-orange) 0 2px, transparent 2.5px), radial-gradient(circle at 36px 50%, #81966e 0 2px, transparent 2.5px);
}

#accurex-homepage .ax-reader-ports {
  position: absolute;
  right: -8px;
  bottom: 10px;
  width: 12px;
  height: 51px;
  background: radial-gradient(circle at 50% 5px, #eef1e8 0 3px, #7c8872 3.5px 5px, transparent 5.5px), radial-gradient(circle at 50% 18px, #eef1e8 0 3px, #7c8872 3.5px 5px, transparent 5.5px), radial-gradient(circle at 50% 31px, #eef1e8 0 3px, #7c8872 3.5px 5px, transparent 5.5px), radial-gradient(circle at 50% 44px, #eef1e8 0 3px, #7c8872 3.5px 5px, transparent 5.5px);
}

#accurex-homepage .ax-card:hover .ax-reader,
#accurex-homepage .ax-card:focus-within .ax-reader {
  transform: translateY(-3px) rotate(-5deg) skewY(2deg) scale(1.025);
  box-shadow: 7px 9px 0 #83907a, 13px 19px 22px rgba(36, 49, 27, .20);
}

#accurex-homepage .ax-card:hover .ax-antenna,
#accurex-homepage .ax-card:focus-within .ax-antenna {
  transform: translateY(-3px) rotate(-9deg) skewY(3deg) scale(1.025);
}

#accurex-homepage .ax-card:hover .ax-network,
#accurex-homepage .ax-card:focus-within .ax-network {
  transform: translateY(-3px) rotate(4deg) scale(1.04);
}

/* Direct contact form states. */
#accurex-homepage .ax-mail-result {
  border-left: 3px solid var(--ax-orange);
  padding: 12px 0 12px 16px;
}

#accurex-homepage .ax-submit-label {
  white-space: nowrap;
}

/* RFID tags category refinements. */
#accurex-homepage.ax-category-page .ax-tags-hero-art {
  background: url('imagens/tag-industrial.svg') center / min(96%, 560px) auto no-repeat;
}

#accurex-homepage.ax-category-page .ax-tags-hero-art .ax-hero-tag {
  display: none;
}

/* Catalogue takes the full row; the contact form follows it instead of sharing a side column. */
#accurex-homepage.ax-category-page .ax-tags-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

#accurex-homepage.ax-category-page .ax-tags-main {
  min-width: 0;
}

#accurex-homepage.ax-category-page .ax-tag-aside {
  width: 100%;
  max-width: 860px;
  min-height: 0;
  align-self: auto;
  margin: 56px auto 0;
}

#accurex-homepage.ax-category-page .ax-sticky-contact {
  position: relative;
  top: auto;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
}

/* Six products per page: three columns by two rows on desktop. */
#accurex-homepage.ax-category-page .ax-tag-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#accurex-homepage.ax-category-page .ax-product-visual::before {
  display: none;
}

#accurex-homepage.ax-category-page .ax-product-visual .ax-tag-shape {
  display: none;
}

#accurex-homepage.ax-category-page .ax-product-photo,
#accurex-homepage.ax-category-page .ax-product-photo-placeholder {
  position: relative;
  z-index: 1;
  width: calc(100% - 34px);
  height: calc(100% - 30px);
  border-radius: 4px;
}

#accurex-homepage.ax-category-page .ax-product-photo {
  display: block;
  object-fit: contain;
  background: #fff;
}

#accurex-homepage.ax-category-page .ax-product-photo-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed #bcc4b6;
  background: #f3f4ef;
  color: #777d75;
  font: 10px/1.4 monospace;
  letter-spacing: .8px;
  text-transform: uppercase;
}

/* The navigation arrows sit in dedicated columns beside the card grid. */
#accurex-homepage.ax-category-page .ax-catalog-page-status {
  margin: 0 0 12px;
  color: var(--ax-muted);
  font-size: 12px;
  text-align: right;
}

#accurex-homepage.ax-category-page .ax-catalog-stage {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  gap: 14px;
  align-items: center;
  margin-left: -64px;
  margin-right: -64px;
}

#accurex-homepage.ax-category-page .ax-catalog-stage > .ax-tag-grid {
  min-width: 0;
}

#accurex-homepage.ax-category-page .ax-catalog-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  border: 1px solid var(--ax-line);
  border-radius: 50%;
  background: #fff;
  color: var(--ax-ink);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(35, 48, 27, .08);
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}

#accurex-homepage.ax-category-page .ax-catalog-arrow:hover:not(:disabled),
#accurex-homepage.ax-category-page .ax-catalog-arrow:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: #b7beb2;
  background: #f0f2eb;
}

#accurex-homepage.ax-category-page .ax-catalog-arrow:disabled {
  opacity: .28;
  cursor: default;
  box-shadow: none;
}

/* Product cards lead to the product page; the datasheet remains a secondary action. */
#accurex-homepage.ax-category-page .ax-product-card--clickable {
  cursor: pointer;
}

#accurex-homepage.ax-category-page .ax-product-title-link {
  color: inherit;
  text-decoration: none;
}

#accurex-homepage.ax-category-page .ax-product-title-link::after {
  content: ' ↗';
  color: var(--ax-orange);
  font-size: .75em;
}

#accurex-homepage.ax-category-page .ax-product-actions {
  align-items: stretch;
  gap: 10px;
}

#accurex-homepage.ax-category-page .ax-product-actions a {
  min-height: 42px;
  display: flex;
  align-items: center;
}

#accurex-homepage.ax-category-page .ax-product-actions .ax-view-product {
  justify-content: center;
  padding: 10px 12px;
  border-radius: 3px;
  background: var(--ax-orange);
  color: #fff;
  text-align: center;
  font-weight: 700;
}

#accurex-homepage.ax-category-page .ax-product-actions .ax-view-product:hover {
  color: #fff;
  filter: brightness(1.06);
}

#accurex-homepage.ax-category-page .ax-product-card.ax-page-enter {
  animation: ax-product-page-in .24s ease both;
}

@keyframes ax-product-page-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1180px) {
  #accurex-homepage.ax-category-page .ax-catalog-stage {
    margin-left: 0;
    margin-right: 0;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 10px;
  }
}

@media (max-width: 1050px) {
  #accurex-homepage.ax-category-page .ax-tag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #accurex-homepage.ax-category-page .ax-tag-aside {
    margin-top: 44px;
  }

  #accurex-homepage.ax-category-page .ax-sticky-contact {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 700px) {
  #accurex-homepage.ax-category-page .ax-tag-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  html {
    scroll-padding-top: 94px;
  }

  #accurex-homepage [id] {
    scroll-margin-top: 94px;
  }

  #accurex-homepage .ax-header {
    box-shadow: 0 6px 20px rgba(23, 27, 25, .08);
  }

  #accurex-homepage.ax-category-page .ax-tags-hero-art {
    background-size: min(105%, 430px) auto;
  }

  #accurex-homepage.ax-category-page .ax-catalog-page-status {
    text-align: left;
  }

  #accurex-homepage.ax-category-page .ax-catalog-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'cards cards'
      'previous next';
    gap: 16px 12px;
  }

  #accurex-homepage.ax-category-page .ax-catalog-stage > .ax-tag-grid {
    grid-area: cards;
  }

  #accurex-homepage.ax-category-page .ax-catalog-arrow--previous {
    grid-area: previous;
    justify-self: end;
  }

  #accurex-homepage.ax-category-page .ax-catalog-arrow--next {
    grid-area: next;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  #accurex-homepage .ax-card,
  #accurex-homepage .ax-card-top,
  #accurex-homepage .ax-card-number,
  #accurex-homepage .ax-card-link .ax-arrow,
  #accurex-homepage .ax-industrial-tag-small,
  #accurex-homepage .ax-reader,
  #accurex-homepage .ax-antenna,
  #accurex-homepage .ax-network {
    transition: none;
  }

  #accurex-homepage .ax-card:hover,
  #accurex-homepage .ax-card:focus-within {
    transform: none;
  }

  #accurex-homepage.ax-category-page .ax-product-card.ax-page-enter {
    animation: none;
  }
}

/* SEO editorial blocks: leitura confortável sem alterar os layouts existentes. */
#accurex-homepage .ax-seo-context {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(24px, 5vw, 80px);
  padding-top: 64px;
  padding-bottom: 64px;
  border-top: 1px solid var(--ax-line);
}
#accurex-homepage .ax-seo-context h2 {
  margin-top: 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 3vw, 39px);
  font-weight: 600;
  line-height: 1.14;
}
#accurex-homepage .ax-seo-context p {
  margin: 0 0 16px;
  color: var(--ax-muted);
  font-size: 15px;
  line-height: 1.75;
}
#accurex-homepage .ax-seo-context a {
  color: inherit;
  text-decoration-color: var(--ax-orange);
  text-underline-offset: 3px;
}
@media (max-width: 760px) {
  #accurex-homepage .ax-seo-context {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* Indice de referencias em HTML real, acessivel sem JavaScript. */
#accurex-homepage .ax-product-directory {
  padding-top: 26px;
  padding-bottom: 62px;
}
#accurex-homepage .ax-product-directory details {
  padding: 22px 26px;
  border: 1px solid var(--ax-line);
  border-radius: 8px;
}
#accurex-homepage .ax-product-directory summary {
  cursor: pointer;
  color: var(--ax-ink);
  font: 600 16px/1.4 'Space Grotesk', sans-serif;
}
#accurex-homepage .ax-product-directory p {
  margin-top: 14px;
  color: var(--ax-muted);
  line-height: 1.6;
}
#accurex-homepage .ax-product-directory ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 10px 20px;
  padding: 18px 0 0 18px;
  margin: 0;
  list-style: disc;
}
#accurex-homepage .ax-product-directory a {
  color: inherit;
  text-decoration-color: var(--ax-orange);
  text-underline-offset: 3px;
}
