/* ANBuyer — AliExpress-inspired layout (standalone, no external CDN) */

:root {
  --ae-bg: #f5f5f5;
  --ae-top: #191919;
  --ae-nav2: #fff;
  --ae-accent: #e43225;
  --ae-teal: #0d9488;
  --ae-blue: #1e40af;
  --ae-text: #222;
  --ae-muted: #666;
  --ae-card: #fff;
  --ae-radius: 8px;
  --ae-radius-lg: 12px;
  --ae-max: 1200px;
  --ae-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --ae-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ae-price: #e43225;
  --ae-price-was: #9ca3af;
  --ae-section-gap: 48px;
  --ae-section-gap-sm: 28px;
  --ae-card-padding: 20px;
  --ae-border-soft: 1px solid #e8e8e8;
  --ae-border-subtle: 1px solid #e8e8e8;
  --ae-tile-title-size: 12px;
  --ae-tile-title-size-lg: 14px;
  --ae-tile-title-lh: 1.4;
  --ae-price-size: 16px;
  --ae-price-size-sm: 15px;
  /* 层叠：sticky 顶栏 > mega（面板顶缘已由 JS 对齐头底，一般不叠在顶栏上） */
  --ae-z-header-sticky: 10050;
  --ae-z-mega-backdrop: 5990;
  --ae-z-mega-panel: 6005;
}

/* Skip link (keyboard / a11y) */
.ae-skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 10100;
  padding: 8px 16px;
  background: #222;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}

.ae-skip-link:focus,
.ae-skip-link:focus-visible {
  left: 16px;
  outline: 2px solid #f5a623;
  outline-offset: 2px;
}

.ae-home,
.ae-deals,
.ae-shipping-info,
.ae-business {
  --header-offset: 0px;
}

body.ae-home,
body.ae-deals,
body.ae-shipping-info,
body.ae-business {
  background: var(--ae-bg);
  font-family: var(--ae-font);
}

#main-content:focus {
  outline: none;
}

.ae-topbar a:focus-visible,
.ae-search .ae-search-submit:focus-visible,
.ae-topbar-tools a:focus-visible,
.ae-nav-links a:focus-visible,
.ae-nav-pill:focus-visible,
.ae-hero-cta:focus-visible,
.ae-deal-card .ae-tile:focus-visible,
.ae-card-lg .ae-tile:focus-visible,
.ae-shop-all-more:focus-visible,
.ae-local-cta:focus-visible {
  outline: 2px solid #f5a623;
  outline-offset: 2px;
}

/* ---- Sticky site header (logo + search + tools [+ optional nav row]) ---- */
.ae-header-sticky {
  position: sticky;
  top: 0;
  z-index: var(--ae-z-header-sticky, 10050);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ---- Top bar ---- */
.ae-topbar {
  background: var(--ae-top);
  color: #fff;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px;
}

.ae-topbar-inner {
  max-width: var(--ae-max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ae-logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.ae-logo span {
  color: var(--ae-accent);
}

.ae-search {
  flex: 1;
  min-width: 200px;
  max-width: 720px;
  display: flex;
  align-items: stretch;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  gap: 0;
}

.ae-search:focus-within {
  border-color: #f5a623;
}

.ae-search .ae-search-field-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  position: relative;
}

.ae-search .ae-search-field-wrap .ae-search-input-el {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 10px 38px 10px 16px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.ae-search .ae-search-input-el[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.ae-search .ae-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #333;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ae-search .ae-search-clear:hover {
  background: rgba(0, 0, 0, 0.14);
}

.ae-search .ae-search-clear[hidden] {
  display: none !important;
}

.ae-topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  flex-shrink: 0;
}
.ae-topbar-tools .ae-app-details {
  flex-shrink: 0;
}
.ae-topbar-tools .ae-app-summary {
  color: #fff;
}

.ae-topbar-tools a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.ae-topbar-tools a:hover {
  text-decoration: none;
}

.ae-topbar-tools .ae-tool,
.ae-topbar-tools .ae-account-link,
.ae-topbar-tools .ae-cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff !important;
  text-decoration: none !important;
}

.ae-topbar-tools .ae-tool:hover,
.ae-topbar-tools .ae-account-link:hover,
.ae-topbar-tools .ae-cart-link:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none !important;
}

.ae-topbar-tools .ae-currency-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: #fff !important;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.ae-topbar-tools .ae-currency-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ae-topbar-tools .ae-currency-trigger .header-store-right-icon-span,
.ae-topbar-tools .ae-currency-trigger-label {
  color: #fff !important;
}

.ae-cart-badge {
  background: var(--ae-accent);
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  margin-left: 4px;
}

/* Top bar mega trigger (not using .ae-nav-pill) */
.ae-mega-trigger.ae-mega-trigger--topbar,
a.ae-mega-trigger.ae-mega-trigger--topbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  box-sizing: border-box;
}

button.ae-mega-trigger.ae-mega-trigger--topbar {
  -webkit-appearance: none;
  appearance: none;
}

/* ---- Mobile topbar: 2 rows (categories + logo + search | tools), no locale ---- */
@media (max-width: 768px) {
  .ae-topbar {
    padding: calc(8px + env(safe-area-inset-top, 0px)) 0 8px;
  }

  .ae-topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    gap: 8px 6px;
    align-items: center;
    padding: 0 10px;
  }

  .ae-topbar-lead {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .ae-topbar-lead .ae-mega {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .ae-logo {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
  }

  .ae-search {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    max-width: none;
    width: 100%;
    border-radius: 18px;
    border-width: 1px;
  }

  .ae-search .ae-search-field-wrap .ae-search-input-el {
    padding: 6px 34px 6px 10px;
    font-size: 12px;
  }

  .ae-search .ae-search-clear {
    width: 24px;
    height: 24px;
    font-size: 15px;
    right: 4px;
  }

  .ae-search .ae-search-submit {
    width: 36px;
    min-width: 36px;
    background-size: 18px;
  }

  .ae-topbar-tools {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    margin-left: 0;
    justify-content: flex-end;
    gap: 0;
    flex-wrap: nowrap;
    box-sizing: border-box;
  }

  .ae-topbar-tools .ae-app-summary {
    padding: 4px 8px;
    font-size: 10px;
  }

  .ae-account-text {
    max-width: 64px;
  }

  .ae-mega-trigger.ae-mega-trigger--topbar,
  a.ae-mega-trigger.ae-mega-trigger--topbar {
    padding: 4px 6px;
    font-size: 10px;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ae-mega-trigger--topbar .ae-mega-trigger-chev {
    display: none;
  }

  .ae-mega-trigger--topbar .ae-mega-trigger-icon {
    flex-shrink: 0;
  }
}

/* ---- Secondary nav ---- */
.ae-nav-row {
  background: var(--ae-nav2);
  border-bottom: 1px solid #eee;
}

/* Full-width mega flyout anchors to this row (AliExpress-style) */
.ae-nav-row--mega {
  position: relative;
  z-index: 6000;
}

.ae-nav-row--mega .ae-mega {
  position: static;
}

.ae-nav-row-inner {
  max-width: var(--ae-max);
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ae-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--ae-text);
  text-decoration: none;
  border: 1px solid #ddd;
  background: #fafafa;
}

.ae-nav-pill:hover {
  border-color: var(--ae-accent);
  color: var(--ae-accent);
}

.ae-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.ae-nav-links a {
  color: #333;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 4px;
}

.ae-nav-links a:hover {
  color: var(--ae-accent);
  background: #fff5f5;
}

/* ---- Hero carousel ---- */
.ae-hero-wrap {
  width: 100%;
}

.ae-hero-slide {
  display: none;
  min-height: 280px;
  padding: 36px 16px 28px;
  color: #fff;
  align-items: center;
  justify-content: center;
}

.ae-hero-slide.is-active {
  display: flex;
}

.ae-hero-inner {
  max-width: var(--ae-max);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.ae-hero-text h2 {
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 8px;
  font-weight: 700;
}

.ae-hero-text p {
  opacity: 0.95;
  font-size: 15px;
  margin-bottom: 12px;
}

.ae-hero-text .ae-end {
  font-size: 13px;
  opacity: 0.85;
}

.ae-hero-coupons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
  max-width: 520px;
}

.ae-hero-coupon {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.3;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
}

.ae-hero-cta {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 22px;
  background: #fff;
  color: #111 !important;
  border-radius: 24px;
  font-weight: 600;
  text-decoration: none;
}

.ae-hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.ae-hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
}

.ae-hero-dots button.is-active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

.ae-hero-right {
  width: min(280px, 36vw);
  height: 200px;
  flex-shrink: 0;
  border-radius: var(--ae-radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
}

.ae-hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Trust bar ---- */
.ae-trust {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 14px 16px;
}

.ae-trust-inner {
  max-width: var(--ae-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

@media (min-width: 600px) and (max-width: 991px) {
  .ae-trust-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }

  .ae-trust-item {
    align-items: flex-start;
  }
}

.ae-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #333;
}

.ae-trust-icon {
  font-size: 20px;
  line-height: 1;
}

/* ---- Section titles ---- */
.ae-section-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: var(--ae-section-gap) 0 20px;
  color: var(--ae-text);
}

/* ---- Deals two columns ---- */
.ae-deals-wrap {
  max-width: var(--ae-max);
  margin: 0 auto;
  padding: 0 16px var(--ae-section-gap);
}

.ae-deals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .ae-deals-grid {
    grid-template-columns: 1fr;
  }
}

.ae-deal-card {
  background: var(--ae-card);
  border-radius: var(--ae-radius-lg);
  border: var(--ae-border-subtle);
  padding: 20px;
  box-shadow: var(--ae-shadow);
}

.ae-deal-card__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 480px) {
  .ae-deal-card__head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
}

.ae-deal-card__head h3 {
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--ae-text);
}

.ae-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.ae-badge--green {
  background: #ecfdf3;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.ae-badge--red {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.ae-badge--pill {
  justify-content: flex-start;
  margin: 0;
  max-width: 100%;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ae-badge__icon {
  flex-shrink: 0;
}

.ae-badge__chev {
  opacity: 0.6;
  margin-left: 2px;
}

.ae-badge--countdown {
  font-variant-numeric: tabular-nums;
}

.ae-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
}

.ae-deal-card .ae-mini-grid .ae-tile,
.ae-local-right .ae-mini-grid .ae-tile {
  height: 100%;
}

@media (max-width: 600px) {
  .ae-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Product mini tile ---- */
.ae-tile {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.ae-tile-img {
  aspect-ratio: 1;
  border-radius: var(--ae-radius);
  overflow: hidden;
  background: #f3f4f6;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ae-tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ae-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ae-tile-title {
  font-size: var(--ae-tile-title-size);
  line-height: var(--ae-tile-title-lh);
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(var(--ae-tile-title-lh) * 2 * 1em);
}

.ae-tile-price-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.ae-tile-price {
  font-size: var(--ae-price-size-sm);
  font-weight: 700;
  color: var(--ae-price);
}

.ae-tile-was {
  font-size: 12px;
  color: var(--ae-price-was);
  text-decoration: line-through;
}

.ae-tile-badges {
  margin-top: 8px;
  min-height: 22px;
}

.ae-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.3;
}

.ae-pill--soft {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.ae-pill--deal {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.ae-tile-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ae-muted);
  line-height: 1.3;
}

.ae-tile-meta-sep {
  margin: 0 4px;
  opacity: 0.7;
}

.ae-tile-rating {
  color: #b45309;
  font-weight: 600;
}

/* ---- Local shipping split ---- */
.ae-local {
  max-width: var(--ae-max);
  margin: var(--ae-section-gap) auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--ae-radius-lg);
  overflow: hidden;
  box-shadow: var(--ae-shadow);
}

@media (max-width: 768px) {
  .ae-local {
    grid-template-columns: 1fr;
  }
}

.ae-local-left {
  padding: 0;
  color: #fff;
  display: flex;
  align-items: stretch;
}

.ae-local-left__inner {
  padding: 32px 28px;
  width: 100%;
}

.ae-local-left h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.ae-local-left p {
  opacity: 0.92;
  font-size: 14px;
  margin-bottom: 16px;
  max-width: 28em;
}

.ae-local-cta {
  display: inline-block;
  padding: 10px 22px;
  background: #fff;
  color: #111 !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ae-local-cta:hover {
  filter: brightness(1.02);
}

.ae-local-right {
  padding: 18px;
}

.ae-local-right .ae-mini-grid {
  align-items: stretch;
}

/* ---- Shop all + main product grid ---- */
.ae-section-divider {
  max-width: var(--ae-max);
  margin: 0 auto;
  padding: 0 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddd 15%, #ddd 85%, transparent);
}

.ae-shop-all-wrap {
  padding-top: 8px;
}

.ae-shop-all {
  padding-top: var(--ae-section-gap);
}

.ae-shop-all-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .ae-shop-all-head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

.ae-shop-all-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ae-text);
  text-align: left;
}

.ae-shop-all-query {
  font-weight: 400;
  color: var(--ae-muted);
}

.ae-shop-all-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 14px;
  color: var(--ae-muted);
}

.ae-shop-all-more {
  color: var(--ae-blue);
  font-weight: 600;
  text-decoration: none;
}

.ae-shop-all-more:hover {
  text-decoration: underline;
}

.ae-shop-all-cap {
  font-size: 13px;
  color: #888;
}

.ae-main-grid-wrap {
  max-width: var(--ae-max);
  margin: 0 auto;
  padding: 0 16px 40px;
}

.ae-main-grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.ae-main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.ae-card-lg {
  background: var(--ae-card);
  border-radius: var(--ae-radius-lg);
  overflow: hidden;
  box-shadow: var(--ae-shadow);
  transition: box-shadow 0.2s;
  border: var(--ae-border-subtle);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ae-card-lg:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ae-card-lg .ae-tile {
  flex: 1;
}

.ae-card-lg .ae-tile-img {
  aspect-ratio: 1;
  border-radius: var(--ae-radius);
  margin: 12px 12px 0;
}

.ae-card-lg .ae-tile-body {
  padding: 10px 12px 14px;
}

.ae-card-lg .ae-tile-title {
  font-size: var(--ae-tile-title-size-lg);
  line-height: var(--ae-tile-title-lh);
  min-height: calc(var(--ae-tile-title-lh) * 2 * 1em);
  padding: 0;
}

.ae-card-lg .ae-tile-price {
  font-size: var(--ae-price-size);
}

.ae-card-lg .ae-tile-price-row {
  margin-top: 8px;
  padding: 0;
}

.ae-empty-hint {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--ae-muted);
}

/* ---- Footer note ---- */
.ae-foot-note {
  max-width: var(--ae-max);
  margin: 0 auto 32px;
  padding: 0 16px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

/* ---- Float widgets ---- */
.ae-float {
  position: fixed;
  right: 12px;
  bottom: 80px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ae-float button,
.ae-float a {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: var(--ae-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  color: #333;
}

.ae-float a:hover,
.ae-float button:hover {
  border-color: var(--ae-accent);
}

/* ---- Business page ---- */
body.ae-business .ae-topbar {
  background: #0a0a0a;
}

.ae-biz-hero {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 40%, #134e4a 100%);
  color: #fff;
  padding: 40px 16px 48px;
}

.ae-biz-hero-inner {
  max-width: var(--ae-max);
  margin: 0 auto;
}

.ae-biz-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 12px;
  margin-bottom: 12px;
}

.ae-biz-hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 10px;
}

.ae-biz-hero p {
  opacity: 0.92;
  margin-bottom: 20px;
}

.ae-biz-search {
  max-width: 560px;
  display: flex;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
}

.ae-biz-search input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
}

.ae-biz-search button {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
}

.ae-biz-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ae-biz-quick span {
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.ae-biz-benefits {
  max-width: var(--ae-max);
  margin: -24px auto 0;
  padding: 0 16px 32px;
  position: relative;
  z-index: 2;
}

.ae-biz-benefits-inner {
  background: #1e40af;
  color: #fff;
  border-radius: var(--ae-radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.ae-biz-benefits-inner h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.ae-biz-benefits-inner p {
  font-size: 12px;
  opacity: 0.9;
}

.ae-biz-section-title {
  max-width: var(--ae-max);
  margin: 32px auto 12px;
  padding: 0 16px;
  font-size: 18px;
  font-weight: 700;
}

/* ---- Shipping info static ---- */
.ae-static {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  background: #fff;
  border-radius: var(--ae-radius-lg);
  box-shadow: var(--ae-shadow);
}

.ae-static h1 {
  font-size: 24px;
  margin-bottom: 16px;
}

.ae-static p,
.ae-static li {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 10px;
}

.ae-static ul {
  padding-left: 20px;
}

/* ---- Deals page ---- */
.ae-deals-page-head {
  max-width: var(--ae-max);
  margin: 0 auto;
  padding: 20px 16px 8px;
}

/* Hide default container padding clash */
body.ae-home .main-wrap,
body.ae-deals .main-wrap,
body.ae-business .main-wrap,
body.ae-shipping-info .main-wrap {
  padding-top: 0;
  max-width: none;
}

body.ae-home .container.main-wrap,
body.ae-deals .container.main-wrap,
body.ae-business .container.main-wrap,
body.ae-shipping-info .container.main-wrap,
body.ae-pdp .container.main-wrap {
  padding-left: 0;
  padding-right: 0;
}

body.ae-pdp {
  background: var(--ae-bg);
  font-family: var(--ae-font);
}

body.ae-pdp .main-wrap {
  padding-top: 0;
  max-width: none;
}

/* ---- Header: search button, app, locale, account ---- */
.ae-search .ae-search-submit {
  position: relative;
  z-index: 2;
  width: 44px;
  min-width: 44px;
  flex-shrink: 0;
  align-self: stretch;
  padding: 0;
  border: none;
  border-left: none;
  cursor: pointer;
  background-color: #222;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}

.ae-app-details {
  position: relative;
}

.ae-app-summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 600;
}

.ae-app-summary::-webkit-details-marker {
  display: none;
}

.ae-app-details[open] .ae-app-summary {
  background: rgba(255, 255, 255, 0.18);
}

.ae-app-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, 92vw);
  padding: 14px 16px;
  background: #fff;
  color: #222;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  font-size: 13px;
  line-height: 1.5;
}

.ae-app-panel-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.ae-app-panel-text {
  color: #555;
  margin-bottom: 10px;
}

.ae-app-link {
  word-break: break-all;
  color: var(--ae-blue);
  font-size: 12px;
}

.ae-account-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff !important;
  text-decoration: none;
}

.ae-account-link:hover {
  text-decoration: none;
}

.ae-account-icon {
  display: block;
  flex-shrink: 0;
}

.ae-account-text {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ae-topbar-muted {
  opacity: 0.75;
  font-size: 11px;
}

/* ---- Today's deals: horizontal carousels ---- */
.ae-deal-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin: 0 -4px;
}

.ae-carousel-track-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--ae-radius);
}

.ae-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
}

.ae-carousel-track:focus {
  outline: 2px solid var(--ae-blue);
  outline-offset: 2px;
}

.ae-carousel-item {
  flex: 0 0 42%;
  max-width: 200px;
  min-width: 140px;
  scroll-snap-align: start;
}

@media (min-width: 520px) {
  .ae-carousel-item {
    flex: 0 0 31%;
  }
}

@media (min-width: 900px) {
  .ae-carousel-item {
    flex: 0 0 23%;
  }
}

.ae-carousel-arrow {
  flex: 0 0 36px;
  width: 36px;
  align-self: center;
  height: 72px;
  border: var(--ae-border-subtle);
  border-radius: var(--ae-radius);
  background: #fff;
  box-shadow: var(--ae-shadow);
  cursor: pointer;
  color: #374151;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, background 0.15s;
}

.ae-carousel-arrow:hover:not(:disabled) {
  background: #f9fafb;
}

.ae-carousel-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.ae-carousel-arrow--prev::before {
  content: "\2039";
}

.ae-carousel-arrow--next::before {
  content: "\203A";
}

.ae-tile--carousel .ae-tile-title {
  font-size: 11px;
  min-height: 2.8em;
}

.ae-tile-img--contain img {
  object-fit: contain;
}

.ae-carousel-empty {
  padding: 16px;
  margin: 0;
}

/* ---- Mega menu (AliExpress-style full-width flyout) ---- */
.ae-mega {
  position: relative;
  display: inline-block;
}

.ae-mega-trigger {
  font-weight: 600;
  gap: 8px;
}

.ae-mega-trigger-chev {
  font-size: 10px;
  opacity: 0.65;
  margin-left: 2px;
  transition: transform 0.15s ease;
}

.ae-mega.is-open .ae-mega-trigger-chev {
  transform: rotate(-180deg);
}

/* Mega 打开时禁止背后页面滚动（与 JS body.ae-mega-open 配套） */
body.ae-mega-open {
  overflow: hidden;
}

/* PDP：All Categories 打开时压低移动采购底栏，避免 z-index:12000 盖住 mega backdrop/panel */
body.ae-mega-open.ae-pdp .pdp-mobile-dock {
  z-index: 5000;
}

.ae-mega-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--ae-z-mega-backdrop, 5990);
  background: rgba(0, 0, 0, 0.35);
  border: none;
  padding: 0;
  margin: 0;
}

.ae-mega-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: var(--ae-z-mega-panel, 6005);
  width: 100%;
  max-width: none;
  min-height: 320px;
  max-height: min(72vh, 560px);
  background: #fff;
  border-radius: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  border: none;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  overflow: hidden;
}

/* 打开态：固定在视口、顶缘锚定 sticky 顶栏底部（由 JS 写入 --ae-mega-panel-top） */
.ae-mega.is-open .ae-mega-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--ae-mega-panel-top, 0px);
  z-index: var(--ae-z-mega-panel, 6005);
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--ae-mega-panel-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
  max-height: calc(100dvh - var(--ae-mega-panel-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
}

.ae-mega.is-open .ae-mega-panel-inner {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.ae-mega-panel-inner {
  display: flex;
  align-items: stretch;
  min-height: 320px;
  max-height: min(72vh, 560px);
  max-width: var(--ae-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.ae-mega-col--roots {
  flex: 0 0 min(260px, 34vw);
  max-width: 280px;
  border-right: 1px solid #ebebeb;
  background: #f7f7f7;
  overflow-y: auto;
  overflow-x: hidden;
}

.ae-mega-roots {
  list-style: none;
  margin: 0;
  padding: 6px 0 10px;
}

/* 左侧大类与右侧子链共用同一行样式 */
.ae-mega-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 11px 12px 11px 10px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--ae-text);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.ae-mega-row-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.ae-mega-row-thumb--ph {
  display: inline-block;
  background: linear-gradient(135deg, #e8e8e8 0%, #f0f0f0 100%);
  border: 1px solid #e0e0e0;
}

.ae-mega-row-label {
  flex: 1;
  min-width: 0;
}

.ae-mega-row-chev {
  margin-left: auto;
  font-size: 14px;
  font-weight: 400;
  color: #9ca3af;
  flex-shrink: 0;
}

.ae-mega-row--tab:hover,
.ae-mega-row--tab:focus-visible {
  background: #ececec;
}

.ae-mega-row--tab.is-active {
  background: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--ae-accent);
  color: #111;
}

.ae-mega-row--tab.is-active .ae-mega-row-chev {
  color: var(--ae-accent);
}

.ae-mega-row--link {
  color: #222;
  border-radius: 2px;
}

.ae-mega-row--link:hover,
.ae-mega-row--link:focus-visible {
  background: #ececec;
  color: #111;
  text-decoration: none;
}

.ae-mega-row--link:hover .ae-mega-row-chev,
.ae-mega-row--link:focus-visible .ae-mega-row-chev {
  color: var(--ae-accent);
}

.ae-mega-see-all.ae-mega-row--link {
  font-weight: 700;
}

/* 右侧：与 AliExpress 类似，白底多列子类目（一级仅在左侧） */
.ae-mega-col--detail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 12px 14px 24px;
  background: #fff;
  border-left: 1px solid #ebebeb;
}

.ae-mega-detail--hidden {
  display: none !important;
}

.ae-mega-detail-head {
  flex-shrink: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 14px;
}

.ae-mega-detail-grid {
  display: grid;
  grid-template-columns: 1fr minmax(132px, 168px);
  gap: 20px 24px;
  align-items: start;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

/* 子类目：多列栅格，每列一组竖排链接（对标 AliExpress 右侧） */
.ae-mega-groups-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 28px;
  align-items: start;
  min-width: 0;
}

@media (max-width: 1100px) {
  .ae-mega-groups-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .ae-mega-groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ae-mega-group {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.ae-mega-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  margin: 0 0 8px;
  padding: 0 4px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
  min-height: 2.6em;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.ae-mega-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.ae-mega-links li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ae-mega-sublink {
  display: block;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  padding: 5px 4px;
  margin: 0;
  line-height: 1.4;
  border-radius: 2px;
}

.ae-mega-sublink:hover,
.ae-mega-sublink:focus-visible {
  color: var(--ae-accent);
  background: #fff5f5;
}

/* 默认（full）模式：子类缩略图 + 名称同行，右侧不再单独展示 promo 大图 */
.ae-mega:not(.ae-mega--storefront) .ae-mega-sublink--row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}

/* 窄屏保持较小缩略图，避免抽屉里一行过高 */
.ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-thumbwrap {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #ebebeb;
}

@media (min-width: 769px) {
  /* 与 ae-mega--storefront 瓷砖 ae-mega-tile-img-wrap（76×76）同尺寸，电脑端与首页子类图一致 */
  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink--row {
    gap: 12px;
    padding: 8px 6px;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-thumbwrap {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    border-radius: 8px;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-txt {
    font-size: 14px;
  }
}

.ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-thumbwrap--ph {
  border-style: dashed;
  opacity: 0.65;
}

.ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-txt {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.ae-mega:not(.ae-mega--storefront) .ae-mega-promo {
  display: none;
}

.ae-mega:not(.ae-mega--storefront) .ae-mega-detail-grid {
  grid-template-columns: 1fr;
}

.ae-mega-promo-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--ae-radius);
  overflow: hidden;
  border: 1px solid #ebebeb;
  background: #fafafa;
}

.ae-mega-promo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.ae-mega-promo-cap {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: #333;
}

.ae-mega-close {
  position: absolute;
  top: 10px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  z-index: 2;
}

.ae-mega-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Storefront mega（详情页镜像 WP 主页）：横向标签 + 小图卡片类目 */
.ae-mega--storefront .ae-mega-panel-inner {
  flex-direction: column;
  max-height: min(78vh, 640px);
}

.ae-mega--storefront .ae-mega-col--roots {
  flex: none;
  width: 100%;
  max-width: none;
  border-right: none;
  border-bottom: 1px solid #ebebeb;
  background: #fff;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.ae-mega--storefront .ae-mega-roots {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 10px 8px 12px;
}

.ae-mega--storefront .ae-mega-roots li {
  flex: 0 0 auto;
}

.ae-mega--storefront .ae-mega-col--roots .ae-mega-row-thumb,
.ae-mega--storefront .ae-mega-col--roots .ae-mega-row-thumb--ph {
  display: none !important;
}

.ae-mega--storefront .ae-mega-col--roots .ae-mega-row {
  padding: 10px 14px;
  white-space: nowrap;
  border-radius: 8px;
}

.ae-mega--storefront .ae-mega-col--roots .ae-mega-row-chev {
  display: none;
}

.ae-mega--storefront .ae-mega-row--tab.is-active {
  background: rgba(237, 28, 36, 0.08);
  font-weight: 700;
  color: var(--ae-accent);
  box-shadow: inset 0 -3px 0 var(--ae-accent);
}

.ae-mega--storefront .ae-mega-col--detail {
  border-left: none;
  flex: 1;
  min-height: 0;
}

.ae-mega--storefront .ae-mega-detail-head {
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.ae-mega--storefront .ae-mega-detail-grid {
  grid-template-columns: 1fr;
}

.ae-mega--storefront .ae-mega-promo {
  display: none;
}

.ae-mega--storefront .ae-mega-groups-grid {
  display: block;
}

.ae-mega--storefront .ae-mega-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  align-items: start;
}

.ae-mega--storefront .ae-mega-links--tiles {
  display: contents;
  margin: 0;
  padding: 0;
}

.ae-mega--storefront .ae-mega-links--tiles li {
  display: contents;
}

.ae-mega--storefront .ae-mega-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: #222;
  border-radius: 10px;
  padding: 10px 6px;
  border: 1px solid #ececec;
  background: #fafafa;
  min-height: 118px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ae-mega--storefront .ae-mega-tile:hover,
.ae-mega--storefront .ae-mega-tile:focus-visible {
  border-color: var(--ae-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  color: var(--ae-accent);
  outline: none;
}

.ae-mega--storefront .ae-mega-tile-img-wrap {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  background: #e8e8e8;
  flex-shrink: 0;
}

.ae-mega--storefront .ae-mega-tile-img-wrap--ph {
  background: linear-gradient(135deg, #e8e8e8 0%, #f2f2f2 100%);
}

.ae-mega--storefront .ae-mega-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ae-mega--storefront .ae-mega-tile-cap {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
}

@media (max-width: 768px) {
  /* storefront：保持原有移动端行为 */
  .ae-mega--storefront .ae-mega-panel-inner {
    max-height: min(82vh, 620px);
  }

  .ae-mega--storefront .ae-mega-col--roots {
    max-height: none;
    border-bottom: 1px solid #ebebeb;
  }

  .ae-mega--storefront .ae-mega-col--detail {
    border-top: none;
    padding-left: 4px;
    padding-right: 4px;
  }

  .ae-mega--storefront .ae-mega-group {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }

  /* full（默认 PDP）：与首页 Mega V2 — 左侧根类 + 右侧 3 列卡片网格 */
  .ae-mega:not(.ae-mega--storefront).is-open .ae-mega-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: calc(100vh - var(--ae-mega-panel-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
    max-height: calc(100dvh - var(--ae-mega-panel-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
    border-radius: 10px;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-panel-inner {
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    max-height: none;
    min-height: 0;
  }

  .ae-mega:not(.ae-mega--storefront).is-open .ae-mega-panel-inner {
    flex: 1 1 auto;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-col--roots {
    flex: 0 0 102px;
    width: 102px;
    max-width: 102px;
    max-height: none;
    min-height: 0;
    border-right: 1px solid #ebebeb;
    border-bottom: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-col--roots .ae-mega-row {
    padding: 9px 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-col--roots .ae-mega-row-thumb,
  .ae-mega:not(.ae-mega--storefront) .ae-mega-col--roots .ae-mega-row-thumb--ph,
  .ae-mega:not(.ae-mega--storefront) .ae-mega-col--roots .ae-mega-row-chev {
    display: none !important;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-col--roots .ae-mega-row-label {
    flex: 1;
    min-width: 0;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-col--detail {
    flex: 1;
    min-width: 0;
    min-height: 0;
    border-left: none;
    border-top: none;
    padding: 8px 8px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-detail-head {
    display: none;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-promo {
    display: none;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-detail-grid {
    display: flex;
    flex-direction: column;
    grid-template-columns: unset;
    gap: 0;
    overflow: visible;
    padding-right: 0;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-groups-grid {
    display: block;
    grid-template-columns: unset;
    min-width: 0;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-group {
    margin-bottom: 12px;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-group:last-child {
    margin-bottom: 0;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-group-title {
    font-size: 12px;
    min-height: 0;
    padding: 0 2px 6px;
    margin-bottom: 8px;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink--row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    color: #0f172a;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink--row:hover,
  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink--row:focus-visible {
    border-color: var(--ae-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: inherit;
    background: #fff;
    outline: none;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-thumbwrap {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    border: none;
    background: #e8eaed;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .ae-mega:not(.ae-mega--storefront) .ae-mega-sublink-txt {
    flex: none;
    padding: 5px 5px 6px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  @media (max-width: 360px) {
    .ae-mega:not(.ae-mega--storefront) .ae-mega-links {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .ae-mega.is-open .ae-mega-panel-inner {
    max-height: none;
  }

  .ae-mega-close {
    right: 12px;
  }
}

.ae-nav-pill--muted {
  opacity: 0.75;
  cursor: default;
}

/* ---- More to love lazy load ---- */
.ae-moretolove-sentinel {
  height: 1px;
  margin-top: 24px;
}

.ae-moretolove-status {
  text-align: center;
  font-size: 13px;
  color: var(--ae-muted);
  margin: 12px 0 24px;
  min-height: 1.2em;
}

/* ---- Search mode: results under top bar, marketing below ---- */
.ae-shop-all-wrap--search-first {
  padding-top: 4px;
}

.ae-home-secondary {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8e8e8;
}

.ae-home-secondary-kicker {
  max-width: var(--ae-max);
  margin: 0 auto;
  padding: 12px 16px 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ae-muted);
}

.ae-search-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 15px;
}

.ae-search-page-link {
  color: var(--ae-blue);
  font-weight: 600;
  text-decoration: none;
  min-width: 5em;
  text-align: center;
}

.ae-search-page-link:hover {
  text-decoration: underline;
}

.ae-search-page-link--disabled {
  color: #bbb;
  font-weight: 500;
  cursor: default;
}

.ae-search-page-status {
  color: var(--ae-muted);
  font-size: 14px;
}
