/* Shared link feedback and the homepage layout confirmed on 2026-10-14. */
:root { --ali-category: 184px; --ali-section-space: 20px; }
/* One header search and recommendation renderer across all frontend pages. */
.as-header-search { flex:1; min-width:0; max-width:600px; }
.as-header-search .site-search { width:100%; max-width:none; }
.as-suggestions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:8px; font-size:12px; color:#626976; }
.as-suggestion { display:inline-flex; padding:3px 9px; border-radius:7px; background:#efebfd; color:#6033b3; overflow-wrap:anywhere; max-width:100%; }
.as-suggestion:is(:hover, :focus) { background:#ffe8d2; color:#674327; }
.as-suggestion:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
@media(max-width:1024px) { .as-header-search { max-width:none; } }
@media(max-width:640px) { .as-header-search { order:3; flex-basis:100%; } .as-suggestions { font-size:11px; gap:6px; } }
/* Center the logo, actual search input and contact button on one shared row. */
@media(min-width:641px) {
  .site-header .header-top { display:grid;grid-template-columns:212px minmax(0,600px) minmax(max-content,1fr);grid-template-rows:auto auto;align-items:center;align-content:center;column-gap:42px;row-gap:4px;padding-block:12px; }
  .header-top .as-header-search { display:contents; }
  .header-top .logo-link { grid-column:1;grid-row:1; }
  .header-top .site-search { grid-column:2;grid-row:1;min-width:0; }
  .header-top .contact-link { grid-column:3;grid-row:1;justify-self:end; }
  .header-top .as-suggestions { grid-column:2;grid-row:2;margin-top:0; }
}
@media(min-width:641px) and (max-width:1200px) {
  .site-header .header-top { grid-template-columns:190px minmax(0,600px) minmax(max-content,1fr);column-gap:26px; }
}
.action-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 38px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ali-lilac);
  color: var(--ali-purple);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  transition: color .2s, box-shadow .2s, background-color .2s;
}
.action-link::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -75% -20%;
  border-radius: 48%;
  background: var(--ali-purple);
  transform: translateY(85%) scale(.5);
  transition: transform .38s cubic-bezier(.2,.7,.25,1);
}
.action-link:hover, .action-link:focus-visible {
  color: #fff;
  box-shadow: 0 5px 18px #623cef28;
}
.action-link:hover::before, .action-link:focus-visible::before {
  transform: translateY(0) scale(1.12);
}
.button-primary.action-link { background: var(--ali-purple); color: #fff; }
.button-primary.action-link::before { background: #4822cf; }
.button-wave {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: var(--wave-size);
  height: var(--wave-size);
  left: var(--wave-x);
  top: var(--wave-y);
  border-radius: 50%;
  background: #ffffff70;
  animation: ali-wave .55s ease-out forwards;
}
@keyframes ali-wave {
  from { opacity: .7; transform: translate(-50%,-50%) scale(0); }
  to { opacity: 0; transform: translate(-50%,-50%) scale(1); }
}
.contact-link.action-link { font-size: 13px; }
.nav-line { border: 0; }
.category-toggle::after, .nav-group::after, .category-entry summary::after { content: none; }
.category-toggle { justify-content: center; align-items: center; gap: 9px; padding-inline: 16px; line-height: 1.2; }
.category-toggle .category-heading-icon { width: 17px; height: 17px; flex-shrink: 0; }
.category-entry + .category-entry { border-top: 1px solid #e9e4f5; }
.category-entry summary { padding-inline: 16px; -webkit-tap-highlight-color: transparent; }
.category-entry summary .category-chevron { display: inline-flex; flex-shrink: 0; margin-left: auto; color: #a095c4; }
.category-chevron svg { display: block; width: 13px; height: 13px; }
.category-entry[open] summary .category-chevron { color: var(--ali-purple); }
.hero-layout .category-menu .subcategory-panel { background: rgb(255 255 255 / 90%); backdrop-filter: blur(5px); }
.hero-section { padding-top: 0; padding-bottom: 5px; }
.hero-layout { gap: 0; }
.hero-layout > .category-menu { border-top: 0; }
.banner-carousel { align-self: start; border-radius: 0 0 var(--ali-radius) var(--ali-radius); touch-action: pan-y pinch-zoom; }
.banner-slides { position: relative; height: auto; aspect-ratio: var(--banner-desktop-ratio, auto); }
.banner-carousel .banner-slide { position: absolute; inset: 0; min-height: 0; height: 100%; display: block; }
.banner-carousel .banner-slide .banner-image { aspect-ratio: auto; width: 100%; height: 100%; object-fit: contain; }
.banner-slide picture { height: 100%; }
.banner-image-link { display: block; height: 100%; cursor: pointer; }
.banner-image-link:focus-visible { outline-offset: -4px; }
.banner-controls { pointer-events: none; left: 5%; bottom: 18px; }
.banner-controls button { pointer-events: auto; }
.banner-actions { gap: 9px; }
.banner-actions button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  background: #fffffff0;
  color: var(--ali-purple);
  box-shadow: 0 3px 12px #623cef16;
  transition: background-color .2s, color .2s;
}
.banner-actions button svg { width: 18px; height: 18px; stroke-width: 3.2; }
.banner-actions button:hover { background: var(--ali-purple); color: #fff; }
.subcategory-links a:hover, .subcategory-links a:focus-visible, .subcategory-links a:active, .subcategory-links a[aria-current=page] {
  background: #ffe8d2;
  color: #8a470d;
}
.brand-strip { gap: 24px; padding-block: 14px; margin-block: 9px 5px; }
.brand-section { padding-block: var(--ali-section-space) calc(var(--ali-section-space) + 2px); }
.strip-label { flex-basis: 128px; }
.strip-track { scroll-behavior: auto; }
.strip-track > a { padding: 4px 8px; border-radius: 7px; transition: background-color .2s; }
.strip-track > a:hover { background: var(--ali-lilac); }
.brand-heading {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  grid-template-areas: "title index all";
  align-items: center;
  column-gap: 28px;
  border-bottom: 1px solid var(--ali-border);
  padding-bottom: 18px;
  margin-bottom: 21px;
}
.brand-heading h2 { grid-area: title; }
.brand-heading > .action-link { grid-area: all; }
.brand-heading .brand-index {
  grid-area: index;
  min-width: 0;
  justify-content: safe center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  border: 0;
  padding: 4px;
  margin: 0;
}
.brand-heading .brand-index::-webkit-scrollbar { display: none; }
.brand-index button { flex-shrink: 0; }
.brand-tag { background: #ffe8d2; color: var(--ali-ink); font-size: 11px; font-weight: 500; }
.discovery-section {
  padding-block: var(--ali-section-space) calc(var(--ali-section-space) + 4px);
  background-image:
    linear-gradient(180deg, #fff 0, #ffffff00 clamp(72px,9vw,128px)),
    linear-gradient(130deg, #f4f0ff, #f6f5fe 65%, #faf6f0);
}
.discovery-heading { display: flex; align-items: center; gap: 28px; border-bottom: 1px solid #dbd4f1; margin-bottom: 24px; }
.discovery-heading > .action-link { flex-shrink: 0; }
.discovery-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); flex: 1; min-width: 0; max-width: none; border: 0; margin: 0; }
.discovery-tabs button { justify-self: start; min-width: 0; padding: 12px 4px; font-size: 17px; white-space: nowrap; color: #70667f; }
.discovery-tabs #tab-categories { font-size: 20px; }
.discovery-tabs button[aria-selected=true]::after { left: 4px; right: 4px; }
.brand-card { transition: border-color .2s, box-shadow .2s; }
.brand-card:hover, .brand-card:focus-visible {
  border-color: var(--ali-purple);
  box-shadow: 0 7px 24px #623cef22, 0 0 0 1px #623cef12;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 17px 18px;
  background: #fff;
  border: 1px solid #ede8fa;
  border-radius: 10px;
  box-shadow: 0 5px 22px #3d2e6409;
  transition: border-color .2s, box-shadow .2s;
}
.category-card:hover { border-color: #c4b4fa; box-shadow: 0 8px 25px #623cef15; }
.category-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin-bottom: 12px;
  background: var(--ali-purple);
  color: #fff;
  box-shadow: 0 7px 22px #623cef30;
}
.category-symbol:hover { color: #fff; background: #4822cf; }
.category-symbol svg { width: 28px; height: 28px; }
.category-card-body { display: flex; flex-direction: column; align-items: center; width: 100%; flex: 1; padding: 0; text-align: center; }
.category-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 15px; }
.category-tags { justify-content: center; gap: 7px 5px; margin-bottom: 24px; }
.category-tags a { border-radius: 999px; padding: 3px 9px; font-size: 10px; }
.category-tags a:hover, .category-tags a:focus-visible, .category-tags a:active { background: #ffe8d2; color: #8a470d; border-color: #f5c697; }
.category-more.action-link { align-self: center; margin-top: auto; font-size: 11px; min-height: 29px; padding: 6px 15px; }
.product-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.product-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; background: #fff; border: 1px solid #eeeaf7; border-radius: 8px; box-shadow: 0 5px 22px #3d2e640b; transition: border-color .2s, box-shadow .2s; }
.product-card:hover { border-color: #c4b4fa; box-shadow: 0 8px 25px #623cef18; }
.product-card .product-visual { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12px; border-bottom: 1px solid #f4f1fa; overflow: hidden; }
.product-visual .product-image, .product-visual .brand-logo { width: 100%; max-width: 100%; height: 100%; max-height: 150px; object-fit: contain; }
.product-visual .brand-wordmark { font-size: 26px; }
.product-image-missing { font-size: 12px; color: #8c80a8; }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 13px 14px 12px; }
.product-card h3 { font-size: 13px; font-weight: 600; line-height: 1.6; margin: 0 0 8px; overflow-wrap: anywhere; }
.product-summary { font-size: 11px; line-height: 1.8; color: #827a94; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.product-detail { align-self: flex-start; color: var(--ali-purple); font-size: 11px; padding-block: 5px; margin-bottom: 8px; }
.product-detail:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 9px; margin-top: auto; font-size: 10px; color: #a39caf; }
.product-meta .product-sku { margin: 0; color: inherit; font-size: inherit; overflow-wrap: anywhere; }
.application-list { grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-flow: row; padding: 0; gap: 8px 28px; background: transparent; border: 0; border-radius: 0; }
.application-list li { border-bottom: 0; }
/* Homepage recommendation selection and order are shared at every breakpoint. */
.application-list a { gap: 12px; padding: 21px 28px; font-size: 14px; border-bottom: 0; }
.application-list .application-title { min-width: 0; flex-shrink: 1; color: inherit; overflow-wrap: anywhere; }
.application-tag { flex-shrink: 0; max-width: 45%; padding: 3px 10px; border-radius: 999px; background: #e6defb; color: var(--ali-purple); font-size: 10px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.application-list a:hover { color: var(--ali-purple); background: #ffffff80; }
@media (max-width: 1024px) {
  :root { --ali-category: clamp(126px,36vw,164px); }
  .category-toggle { flex-basis: var(--ali-category); }
  .contact-link.action-link { display: none; }
  .brand-heading { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "title all" "index index"; row-gap: 17px; }
  .brand-heading .brand-index { justify-content: flex-start; padding-inline: 0; }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hero-layout.mobile-categories-open > .category-menu, .inner-categories .category-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: min(100%,calc(var(--category-slots,6)*48px));
    min-height: 0;
    max-height: 100%;
    padding: 0;
    margin: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    pointer-events: none;
    z-index: 25;
    border-radius: 0;
    box-shadow: none;
  }
  .inner-categories .category-menu { height: min(65vh,calc(var(--category-slots,6)*48px)); max-height: 65vh; }
  .category-entries { width: var(--ali-category); height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: #fff; border: 1px solid var(--ali-border); border-top: 0; border-radius: 0 0 9px 9px; box-shadow: 0 10px 24px #3d2e6420; pointer-events: auto; }
  .category-entry summary { min-height: 48px; gap: 6px; padding: 10px; font-size: 12px; }
  .hero-layout .category-menu .subcategory-panel, .inner-categories .subcategory-panel {
    position: absolute;
    left: var(--ali-category);
    top: var(--category-row-top,0px);
    width: calc(100% - var(--ali-category));
    max-width: calc(100% - var(--ali-category));
    max-height: calc(100% - var(--category-row-top,0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 12px;
    margin: 0;
    background: rgb(255 255 255 / 90%);
    backdrop-filter: blur(5px);
    border: 1px solid var(--ali-border);
    border-radius: 0 9px 9px 9px;
    box-shadow: 5px 8px 22px #3d2e6418;
    pointer-events: auto;
  }
}
@media (min-width: 1025px) {
  .hero-layout > .category-menu { height: 100%; min-height: 0; padding: 0; }
  .hero-layout .category-entries { display: grid; height: 100%; grid-template-rows: repeat(var(--category-slots,6),minmax(0,1fr)); }
  .hero-layout .category-entry { min-height: 0; }
  .hero-layout .category-entry summary { height: 100%; padding-block: 9px; }
  /* Round only the row background; flyouts must remain outside the menu. */
  .hero-layout .category-entry:last-child > summary { border-radius: 0 0 9px 9px; }
  .hero-layout .subcategory-panel, .inner-categories .subcategory-panel { top: var(--category-row-top, 0px); }
  .hero-layout .category-entry summary { cursor: default; }
  .category-toggle { cursor: default; }
}
@media (max-width: 900px) {
  .application-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-card { padding: 16px 13px; }
  .brand-strip { gap: 12px; }
  .strip-label { flex-basis: 100px; }
}
@media (max-width: 640px) {
  .brand-tag { font-size: 10px; }
  .discovery-heading { gap: 10px; margin-bottom: 19px; }
  .discovery-tabs { grid-template-columns: max-content max-content max-content repeat(2,minmax(0,1fr)); gap: 6px; }
  .discovery-tabs button { padding: 12px 0; font-size: 12px; }
  .discovery-tabs #tab-categories { font-size: 14px; }
  .discovery-tabs button[aria-selected=true]::after { left: 0; right: 0; }
  .category-symbol { width: 40px; height: 40px; }
  .category-symbol svg { width: 26px; height: 26px; }
  :root { --ali-section-space: 14px; }
  .brand-section { padding-block: var(--ali-section-space) calc(var(--ali-section-space) + 2px); }
  .discovery-section { padding-block: var(--ali-section-space) calc(var(--ali-section-space) + 2px); }
  .brand-strip { padding-block: 12px; margin-top: 6px; }
  .action-link { min-height: 32px; padding: 7px 12px; font-size: 10px; }
  .section-heading { align-items: center; }
  .banner-controls { bottom: 6px; left: 12px; right: 10px; }
  .banner-actions { gap: 6px; }
  .banner-actions button { width: 24px; height: 24px; }
  .banner-actions button svg { width: 12px; height: 12px; stroke-width: 2.5; }
  .banner-dots { gap: 0; }
  .banner-dots button { position: relative; width: 24px; height: 24px; padding: 0; background: transparent; border: 0; }
  .banner-dots button::after { content: ''; position: absolute; width: 4px; height: 4px; left: 10px; top: 10px; border-radius: 3px; background: #c6b2ef; }
  .banner-dots button[aria-current=true] { width: 24px; background: transparent; }
  .banner-dots button[aria-current=true]::after { width: 16px; left: 4px; background: var(--ali-purple, #6635ce); }
  .brand-strip { gap: 9px; }
  .strip-label { flex-basis: 84px; }
  .category-grid .category-card:last-child:nth-child(odd) { grid-column: auto; display: flex; }
  .category-card { padding: 16px 11px; }
  .category-card h3 { font-size: 15px; }
  .category-tags a { padding: 3px 7px; font-size: 9px; }
  .category-more.action-link { font-size: 10px; }
  .product-card-body { padding: 11px; }
  .product-card h3 { font-size: 12px; }
  .product-visual .brand-wordmark { font-size: 22px; }
  .product-meta { font-size: 9px; }
  .application-list { grid-template-columns: 1fr; gap: 8px 0; }
  .application-list a { padding: 18px 24px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .action-link, .action-link::before, .brand-card, .category-card, .product-card { transition: none; }
  .button-wave { display: none; }
}

/* Compact section rhythm is shared by future pages; card internals keep their spacing. */
.site-footer { padding-top: calc(var(--ali-section-space) + 3px); }
@media (max-width: 640px) { .site-footer { padding-top: calc(var(--ali-section-space) + 2px); } }

/* All primary destinations stay visible at narrow widths and on touch devices. */
@media (max-width: 1024px) { .contact-link.action-link { display: inline-flex; margin-left: auto; } }
.mobile-toggle { display: none; }
@media (max-width: 640px) {
  .contact-link.action-link { font-size: 11px; }
  .nav-inner { flex-wrap: wrap; gap: 6px 0; }
  .nav-inner > .category-toggle { flex: 0 0 112px; height: 36px; gap: 7px; padding-inline: 12px; border-radius: 14px 14px 0 0; }
  .category-toggle .category-heading-icon { width: 16px; height: 16px; }
  .primary-nav {
    display: block; position: relative; top: auto; right: auto; left: auto;
    flex: 0 0 100%; width: 100%; height: 42px; max-height: none;
    margin: 0; padding: 5px; overflow: visible;
  }
  .nav-list { display: flex; flex-wrap: nowrap; gap: 4px; }
  .nav-list > li { display: flex; flex: 1 1 auto; min-width: 0; height: 100%; }
  .nav-list > li > a, .nav-group {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; padding: 0 4px;
    font-size: clamp(10px, 2.8vw, 12px);
  }
  .nav-list .sub-menu {
    position: absolute; top: 100%; right: 0; left: auto;
    min-width: 170px; max-width: calc(100vw - 36px); padding: 8px;
    border: 1px solid var(--ali-border); border-radius: 12px;
  }
}
