.subcategory-row a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  font-weight: 600;
}

.subcategory-row a span {
  color: var(--teal);
  font-size: .65rem;
}

/* The source logo is white-on-transparent. Keep the original asset, but render
   a brand-dark version on light surfaces and the original on the dark footer. */
.logo {
  position: relative;
  width: 118px;
  height: 64px;
  overflow: visible;
}

.logo img,
.mobile-brand img,
.checkout-top img {
  filter: brightness(0) saturate(100%) invert(15%) sepia(23%) saturate(1630%) hue-rotate(141deg) brightness(91%) contrast(98%);
  object-fit: contain;
}

.footer-brand img {
  filter: none;
}

.checkout-top img {
  width: auto;
  height: auto;
}

/* Header utility bar: compact, legible and composed as two information groups. */
.service-bar {
  height: 38px;
  background: #062f37;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #dceae8;
}

.service-bar .container {
  gap: 28px;
  margin-inline: auto;
}

.service-status,
.service-contact {
  min-width: 0;
  gap: 10px !important;
}

.service-status p {
  gap: 9px !important;
  white-space: nowrap;
  line-height: 1;
}

.service-status strong,
.service-contact strong {
  color: #fff;
  font-weight: 700;
}

.service-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  border: 1px solid rgba(172,226,218,.3);
  border-radius: 50%;
  color: #a9ddd7;
}

.service-separator {
  width: 1px;
  height: 12px;
  flex: 0 0 1px;
  background: rgba(213,235,232,.24);
}

.service-contact a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f6fbfa;
  font-weight: 650;
  letter-spacing: -.01em;
}

.service-contact a > span {
  color: #92b9b6;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Search is treated as one control, with a contextual cue and a clear action. */
.search-box {
  height: 54px;
  gap: 12px;
  padding-left: 8px;
  overflow: visible;
  border-color: #e8eeea;
  border-radius: 6px;
  background: #f2f5f1;
}

.search-context-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 4px;
  background: rgba(8,123,131,.08);
  color: var(--teal-dark);
}

.search-box input {
  font-size: .94rem;
  color: var(--ink);
}

.search-box input::placeholder {
  color: #91a0a4;
  opacity: 1;
}

.search-box > .search-submit {
  display: grid;
  width: 58px;
  height: 54px;
  margin: -1px -1px -1px 0;
  place-items: center;
  border-radius: 0 6px 6px 0;
  background: var(--teal);
  color: #fff;
}

.search-submit svg {
  display: block;
  stroke-width: 2;
}

@media (min-width: 821px) {
  .header-main {
    height: 84px;
    grid-template-columns: 126px minmax(340px, 1fr) auto;
    gap: 24px;
  }

  .mega-wrap {
    top: 100%;
  }

  .search-popover {
    top: calc(100% + 63px);
    z-index: 60;
  }

  .hero,
  .hero-visual {
    min-height: clamp(548px, 64vh, 610px);
  }

  .hero-grid {
    grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    padding: 54px 34px 54px 0;
  }

  .hero h1 {
    max-width: 590px;
    margin-bottom: 20px;
    font-size: clamp(3.15rem, 4.1vw, 4.2rem);
    line-height: 1.01;
    letter-spacing: -.052em;
  }

  .hero h1 em {
    display: block;
    max-width: 570px;
    margin-top: .12em;
    font-size: .9em;
    line-height: 1.03;
    letter-spacing: -.045em;
  }

  .hero-copy > p:not(.eyebrow):not(.hero-note) {
    max-width: 520px;
    font-size: 1rem;
  }

  .hero-actions {
    margin: 23px 0;
  }
}

/* Homepage rhythm: slightly denser than inner pages, with consistent vertical
   pacing and component heights across sections. */
.home-page .section {
  padding-block: clamp(72px, 6.4vw, 88px);
}

.home-page .section-head {
  margin-bottom: 34px;
}

.home-page .section-head h2 {
  max-width: 780px;
  font-size: clamp(2.15rem, 3vw, 3.15rem);
  line-height: 1.04;
}

.home-page .section-head p:last-child {
  max-width: 650px;
  font-size: 1rem;
}

.home-page .category-card {
  min-height: 238px;
  padding: 25px;
}

.home-page .category-card h3 {
  margin-bottom: 9px;
  font-size: clamp(1.18rem, 1.5vw, 1.42rem);
}

.home-page .product-card-body {
  min-height: 258px;
  padding: 17px;
}

.home-page .product-card h3 {
  min-height: 38px;
}

.home-page .sector-card {
  min-height: 242px;
  padding: 25px;
}

.home-page .sector-card h3 {
  margin-top: 34px;
}

.home-page .sector-card b {
  left: 25px;
  bottom: 22px;
}

.home-page .machine-band {
  padding-block: clamp(72px, 6vw, 84px);
}

.home-page .machine-image {
  height: clamp(400px, 35vw, 465px);
}

.home-page .machine-grid h2 {
  font-size: clamp(2.3rem, 3.25vw, 3.25rem);
  line-height: 1.03;
}

.home-page .service-intro {
  gap: clamp(40px, 6vw, 78px);
}

.home-page .service-grid {
  margin-top: 42px;
}

.home-page .service-grid > div {
  min-height: 185px;
  padding: 24px;
}

.home-page .service-grid h3 {
  margin-top: 38px;
}

.home-page .guide-grid > a {
  min-height: 270px;
  padding: 22px;
}

.home-page .guide-grid > a > p {
  margin-top: 36px;
}

.home-page .expert-cta {
  padding-block: 64px;
}

@media (min-width: 900px) and (max-width: 1050px) {
  .home-page .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-page .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-page .product-grid .product-card:nth-child(4) {
    display: block;
  }

  .home-page .product-card-body {
    min-height: 270px;
  }

  .home-page .hero-float {
    display: none;
  }

  .home-page .machine-grid {
    gap: 34px;
  }

  .home-page .machine-grid h2 {
    font-size: 2.45rem;
  }
}

@media (max-width: 820px) {
  .header-main {
    position: relative;
    min-width: 0;
  }

  .search-box {
    min-width: 0;
    width: auto;
    height: 44px;
    gap: 0;
    padding-left: 10px;
  }

  .search-context-icon {
    display: none;
  }

  .search-box > .search-submit {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .logo {
    width: 82px;
    height: 52px;
  }

  .hero-copy {
    padding-top: 48px;
  }

  .hero h1 {
    line-height: 1.02;
    letter-spacing: -.048em;
  }

  .hero h1 em {
    display: block;
    max-width: 310px;
    margin-top: .12em;
    font-size: .82em;
    line-height: 1.04;
  }

  .home-page .section {
    padding-block: 56px;
  }

  .home-page .section-head {
    margin-bottom: 24px;
  }

  .home-page .section-head h2 {
    max-width: 100%;
    font-size: clamp(1.85rem, 8.4vw, 2.35rem);
    line-height: 1.04;
  }

  .home-page .section-head p:last-child {
    font-size: .92rem;
  }

  .home-page .category-card {
    min-height: 192px;
    padding: 22px;
  }

  .home-page .product-grid {
    grid-auto-columns: 82%;
  }

  .home-page .sector-card {
    min-height: 210px;
    padding: 22px;
  }

  .home-page .sector-card h3 {
    margin-top: 24px;
  }

  .home-page .sector-card b {
    left: 22px;
    bottom: 18px;
  }

  .home-page .machine-band {
    padding-block: 58px;
  }

  .home-page .machine-image {
    height: 340px;
  }

  .home-page .service-intro {
    gap: 10px;
  }

  .home-page .service-grid {
    margin-top: 30px;
  }

  .home-page .service-grid > div {
    min-height: 170px;
    padding: 21px;
  }

  .home-page .service-grid h3 {
    margin-top: 28px;
  }

  .home-page .guide-grid > a {
    min-height: 248px;
  }

  .home-page .expert-cta {
    padding-block: 54px;
  }
}

@media (max-width: 520px) {
  .home-page .hero-copy {
    min-width: 0;
    padding: 46px 20px 38px;
  }

  .home-page .hero h1 {
    max-width: 340px;
    font-size: clamp(2.35rem, 10.5vw, 2.65rem);
  }

  .home-page .hero h1 em {
    max-width: 285px;
    font-size: .8em;
  }

  .home-page .hero-copy > p:not(.eyebrow):not(.hero-note) {
    max-width: 330px;
    font-size: .94rem;
  }

  .home-page .category-card > div {
    max-width: 66%;
  }

  .home-page .sector-grid {
    grid-template-columns: 1fr;
  }

  .home-page .brand-band {
    padding-block: 34px;
  }
}

/* Premium motion system --------------------------------------------------- */
:root {
  --ease-premium: cubic-bezier(.22, 1, .36, 1);
  --ease-snappy: cubic-bezier(.2, .8, .2, 1);
  --motion-fast: 180ms;
  --motion-base: 320ms;
  --motion-panel: 520ms;
}

@keyframes egi-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes egi-reveal-up {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes egi-panel-left {
  from { transform: translate3d(-100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes egi-panel-right {
  from { transform: translate3d(100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes egi-pop-in {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    position: relative;
    overflow: hidden;
    transition: color var(--motion-fast) ease,
                background-color var(--motion-fast) ease,
                border-color var(--motion-fast) ease,
                box-shadow var(--motion-base) var(--ease-premium),
                transform var(--motion-base) var(--ease-premium);
  }

  .btn::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.22) 48%, transparent 70%);
    transform: translateX(-125%);
    transition: transform 620ms var(--ease-premium);
  }

  .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(8,47,56,.14);
  }

  .btn:hover::after {
    transform: translateX(125%);
  }

  .btn:active {
    transform: translateY(0) scale(.975);
    transition-duration: 90ms;
  }

  .btn svg,
  .text-link svg,
  .category-card b svg,
  .sector-card b svg,
  .guide-grid b svg {
    transition: transform var(--motion-base) var(--ease-premium);
  }

  .btn:hover svg,
  .text-link:hover svg,
  .category-card:hover b svg,
  .sector-card:hover b svg,
  .guide-grid a:hover b svg {
    transform: translateX(4px);
  }

  .search-box {
    transition: background-color var(--motion-base) ease,
                border-color var(--motion-base) ease,
                box-shadow var(--motion-base) var(--ease-premium),
                transform var(--motion-base) var(--ease-premium);
  }

  .search-box:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(8,47,56,.11), 0 0 0 3px rgba(8,123,131,.1);
  }

  .search-box > button,
  .header-actions > a,
  .header-actions > button,
  .mobile-toggle {
    transition: color var(--motion-fast) ease,
                background-color var(--motion-fast) ease,
                transform var(--motion-base) var(--ease-premium);
  }

  .header-actions > a:hover,
  .header-actions > button:hover,
  .mobile-toggle:hover {
    transform: translateY(-2px);
    color: var(--teal);
  }

  .search-box > button:hover {
    transform: translateY(-1px);
    background: var(--teal-dark);
    color: #fff;
  }

  .search-popover {
    transform-origin: top center;
    animation: egi-pop-in 360ms var(--ease-premium) both;
  }

  .search-popover > a,
  .search-popover .search-chips,
  .search-popover .search-empty {
    animation: egi-reveal-up 360ms var(--ease-premium) both;
  }

  .search-popover > a:nth-of-type(2) { animation-delay: 35ms; }
  .search-popover > a:nth-of-type(3) { animation-delay: 70ms; }
  .search-popover > a:nth-of-type(4) { animation-delay: 105ms; }
  .search-popover > a:nth-of-type(5) { animation-delay: 140ms; }

  .search-chips button {
    transition: color var(--motion-fast) ease,
                border-color var(--motion-fast) ease,
                background-color var(--motion-fast) ease,
                transform var(--motion-fast) var(--ease-snappy);
  }

  .search-chips button:hover {
    transform: translateY(-2px);
    border-color: var(--teal);
    background: var(--mint);
    color: var(--teal-dark);
  }

  .main-nav a,
  .main-nav button {
    position: relative;
    transition: color var(--motion-fast) ease;
  }

  .main-nav a::after,
  .main-nav button::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 7px;
    left: 0;
    height: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--motion-base) var(--ease-premium);
  }

  .main-nav a:hover::after,
  .main-nav button:hover::after,
  .main-nav button.active::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .main-nav button svg {
    transition: transform var(--motion-base) var(--ease-premium);
  }

  .main-nav button.active svg {
    transform: rotate(180deg);
  }

  .mega-wrap {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -12px, 0);
    transform-origin: top center;
    transition: opacity 220ms ease,
                visibility 0s linear 300ms,
                transform var(--motion-base) var(--ease-premium);
  }

  .mega-wrap.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition: opacity var(--motion-base) ease,
                visibility 0s linear 0s,
                transform var(--motion-panel) var(--ease-premium);
  }

  .mega-wrap .mega > div,
  .mega-wrap .mega > aside,
  .mega-wrap .mega-all {
    opacity: 0;
    transform: translate3d(0, -8px, 0);
    transition: opacity 180ms ease,
                transform 240ms var(--ease-premium);
  }

  .mega-wrap.is-open .mega > div,
  .mega-wrap.is-open .mega > aside,
  .mega-wrap.is-open .mega-all {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-duration: 360ms;
  }

  .mega-wrap.is-open .mega > div:nth-child(1) { transition-delay: 45ms; }
  .mega-wrap.is-open .mega > div:nth-child(2) { transition-delay: 75ms; }
  .mega-wrap.is-open .mega > div:nth-child(3) { transition-delay: 105ms; }
  .mega-wrap.is-open .mega > div:nth-child(4) { transition-delay: 135ms; }
  .mega-wrap.is-open .mega > aside { transition-delay: 165ms; }
  .mega-wrap.is-open .mega-all { transition-delay: 195ms; }

  .mega > div > a,
  .footer-grid a {
    transition: color var(--motion-fast) ease,
                transform var(--motion-base) var(--ease-premium);
  }

  .mobile-overlay,
  .drawer-overlay,
  .modal-wrap {
    animation: egi-fade-in 260ms ease both;
  }

  .mobile-panel {
    animation: egi-panel-left var(--motion-panel) var(--ease-premium) both;
    box-shadow: 24px 0 70px rgba(3,28,34,.2);
  }

  .mobile-panel nav a,
  .mobile-categories,
  .mobile-panel > .btn {
    animation: egi-reveal-up 420ms var(--ease-premium) both;
  }

  .mobile-panel nav a:nth-child(1) { animation-delay: 90ms; }
  .mobile-panel nav a:nth-child(2) { animation-delay: 120ms; }
  .mobile-panel nav a:nth-child(3) { animation-delay: 150ms; }
  .mobile-panel nav a:nth-child(4) { animation-delay: 180ms; }
  .mobile-panel nav a:nth-child(5) { animation-delay: 210ms; }
  .mobile-panel nav a:nth-child(6) { animation-delay: 240ms; }
  .mobile-panel nav a:nth-child(7) { animation-delay: 270ms; }
  .mobile-categories { animation-delay: 300ms; }
  .mobile-panel > .btn { animation-delay: 340ms; }

  .overlay-close,
  .drawer-head button,
  .modal-close {
    transition: color var(--motion-fast) ease,
                background-color var(--motion-fast) ease,
                transform var(--motion-base) var(--ease-premium);
  }

  .overlay-close:hover,
  .drawer-head button:hover,
  .modal-close:hover {
    transform: rotate(90deg) scale(1.05);
    color: var(--teal);
  }

  .drawer-backdrop,
  .modal-backdrop {
    animation: egi-fade-in 280ms ease both;
    backdrop-filter: blur(3px);
  }

  .cart-drawer {
    animation: egi-panel-right var(--motion-panel) var(--ease-premium) both;
    box-shadow: -24px 0 70px rgba(3,28,34,.2);
  }

  .drawer-line,
  .drawer-empty > * {
    animation: egi-reveal-up 420ms var(--ease-premium) both;
  }

  .drawer-line:nth-child(1) { animation-delay: 90ms; }
  .drawer-line:nth-child(2) { animation-delay: 130ms; }
  .drawer-line:nth-child(3) { animation-delay: 170ms; }
  .drawer-line:nth-child(4) { animation-delay: 210ms; }

  .drawer-line > div > div button,
  .quantity button {
    transition: color var(--motion-fast) ease,
                background-color var(--motion-fast) ease,
                transform 100ms ease;
  }

  .drawer-line > div > div button:hover,
  .quantity button:hover {
    background: var(--mint);
    color: var(--teal-dark);
  }

  .drawer-line > div > div button:active,
  .quantity button:active {
    transform: scale(.88);
  }

  .modal {
    transform-origin: center;
    animation: egi-pop-in var(--motion-panel) var(--ease-premium) both;
  }

  .cookie {
    animation: egi-reveal-up var(--motion-panel) var(--ease-premium) 180ms both;
  }

  .product-card,
  .category-card,
  .sector-card,
  .service-grid > div,
  .guide-grid > a {
    transition: border-color var(--motion-fast) ease,
                background-color var(--motion-base) ease,
                box-shadow var(--motion-base) var(--ease-premium),
                transform var(--motion-base) var(--ease-premium);
  }

  .product-card:hover,
  .category-card:hover,
  .sector-card:hover,
  .service-grid > div:hover,
  .guide-grid > a:hover {
    z-index: 2;
    transform: translateY(-5px);
    box-shadow: 0 18px 45px rgba(8,47,56,.11);
  }

  .category-card:hover,
  .service-grid > div:hover,
  .guide-grid > a:hover {
    border-color: rgba(8,123,131,.35);
  }

  .machine-image img {
    transition: transform 700ms var(--ease-premium);
  }

  .machine-image:hover img {
    transform: scale(1.035);
  }

  .brand-band span {
    transition: color var(--motion-fast) ease,
                transform var(--motion-base) var(--ease-premium);
  }

  .brand-band span:hover {
    color: var(--teal-dark);
    transform: translateY(-2px);
  }

  .home-page .hero-copy > * {
    animation: egi-reveal-up 680ms var(--ease-premium) both;
  }

  .home-page .hero-copy > .eyebrow { animation-delay: 60ms; }
  .home-page .hero-copy > h1 { animation-delay: 120ms; }
  .home-page .hero-copy > h1 + p { animation-delay: 200ms; }
  .home-page .hero-copy > .hero-actions { animation-delay: 280ms; }
  .home-page .hero-copy > .hero-note { animation-delay: 350ms; }

  .home-page .hero-visual {
    animation: egi-fade-in 900ms ease 100ms both;
  }

  .home-page .hero-visual > img {
    animation: egi-pop-in 1100ms var(--ease-premium) 80ms both;
  }

  .home-page .trust-wrap {
    animation: egi-reveal-up 620ms var(--ease-premium) 420ms both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mega-wrap {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .mega-wrap.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
