.portal-home {
  background: var(--portal-bg);
  color: var(--portal-ink);
}

.portal-home .portal-header { top: 0; }
.portal-home .portal-header-main { min-height: 98px; }
.portal-home .portal-header-actions { white-space: nowrap; }
.portal-home .portal-nav-groups {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 12px;
}
.portal-home .portal-qq-group {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 5px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}
.portal-home .portal-qq-group span { color: rgba(255, 255, 255, .74); font-weight: 700; }
.portal-home .portal-qq-group strong { font-weight: 850; }
.portal-home .portal-logo { min-width: 190px; font-size: 27px; }
.portal-home .portal-logo-mark { width: 50px; height: 50px; font-size: 23px; }
.portal-home .portal-header-search { max-width: 650px; }
.home-order-link { color: #3f4858; font-size: 13px; font-weight: 720; }
.home-order-link:hover { color: var(--portal-blue); }
.home-category-nav { min-width: 225px; justify-content: flex-start; gap: 12px; padding-left: 28px; background: #245f9d; font-size: 15px; }
.home-category-nav span { font-size: 21px; }

.home-portal-main {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 0 76px;
}

.home-hero-shell {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 14% 25%, rgba(113, 174, 231, .18) 0 42px, transparent 43px),
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, .07) 0 60px, transparent 61px),
    radial-gradient(circle at 85% 72%, rgba(112, 177, 235, .12) 0 72px, transparent 73px),
    linear-gradient(115deg, #10223a 0%, #203f5b 44%, #10233b 100%);
  color: #fff;
}

.home-hero {
  min-height: 470px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 64px 20px 126px;
  text-align: center;
}

.home-hero h1 {
  max-width: 920px;
  margin: 0;
  color: #e7f3c2;
  background: linear-gradient(90deg, #d8f3c6, #ffe4a5 52%, #f5c993);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(42px, 5.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.home-hero-copy {
  max-width: 820px;
  margin: 18px auto 0;
  color: rgba(235, 244, 255, .76);
  font-size: 16px;
  line-height: 1.9;
}

.home-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.home-benefit {
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .92);
  text-align: left;
  backdrop-filter: blur(10px);
}

.home-benefit-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 9px;
  background: linear-gradient(145deg, #ff9d52, #f26732);
  color: #fff;
  font-size: 18px;
  font-weight: 850;
}

.home-benefit strong,
.home-benefit small { display: block; }
.home-benefit strong { font-size: 14px; }
.home-benefit small { margin-top: 2px; color: rgba(255, 255, 255, .58); font-size: 11px; }

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.home-platform-panel {
  width: min(1240px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin: -64px auto 0;
  position: relative;
  z-index: 3;
  overflow: hidden;
  border: 1px solid rgba(219, 226, 235, .94);
  border-radius: 15px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 50px rgba(12, 34, 58, .18);
}

.home-platform-link {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #4a5669;
  font-size: 13px;
  font-weight: 760;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.home-platform-link + .home-platform-link { border-left: 1px solid #edf0f4; }
.home-platform-link:hover,
.home-platform-link:focus-visible {
  z-index: 1;
  color: var(--portal-blue-dark);
  background: #f4f9ff;
  outline: none;
  transform: translateY(-3px);
}

.home-platform-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #718096, #455164);
  color: #fff;
  box-shadow: 0 10px 24px rgba(52, 68, 91, .18);
  font-size: 21px;
  font-weight: 850;
}

.home-platform-icon.red { background: linear-gradient(145deg, #ff6657, #ef3128); }
.home-platform-icon.orange { background: linear-gradient(145deg, #ffb044, #f2742d); }
.home-platform-icon.pink { background: linear-gradient(145deg, #f45fab, #db2784); }
.home-platform-icon.gold { background: linear-gradient(145deg, #ffd250, #e4aa18); }

.home-search-panel {
  width: min(1240px, calc(100% - 40px));
  margin: 28px auto 0;
  padding: 24px 24px 0;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--portal-shadow);
}

.home-search-dock {
  position: relative;
  z-index: 4;
  margin-top: 28px;
}

.home-search-panel .home-search-toolbar {
  grid-template-columns: auto minmax(260px, 1fr) 210px 170px;
  gap: 12px;
  padding: 0;
}

.home-search-panel .segmented { min-height: 58px; align-items: center; }
.home-search-panel .segment { min-height: 48px; padding: 0 15px; }
.home-search-panel #searchInput { min-height: 58px; font-size: 15px; }
.home-search-panel .sort-select { min-height: 58px; background-color: #fff; }

.home-select-field {
  position: relative;
  min-width: 0;
}

.home-category-trigger {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--portal-ink);
  cursor: pointer;
  text-align: left;
}

.home-category-trigger:hover,
.home-category-trigger[aria-expanded="true"] {
  border-color: var(--portal-blue);
  box-shadow: 0 0 0 3px rgba(49, 134, 232, .1);
}

.home-category-trigger-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf4ff;
  color: var(--portal-blue);
  font-size: 18px;
  font-weight: 850;
}

.home-category-trigger-copy { min-width: 0; display: grid; gap: 2px; }
.home-category-trigger-copy small { color: var(--portal-muted); font-size: 9px; }
.home-category-trigger-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.home-category-trigger-arrow { color: var(--portal-blue); font-size: 18px; transition: transform 180ms ease; }
.home-category-trigger[aria-expanded="true"] .home-category-trigger-arrow { transform: rotate(180deg); }

.home-category-menu {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #d9e7f5;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8fcff);
}

.home-category-menu-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid #e4edf6;
}

.home-category-menu-header strong,
.home-category-menu-header span { display: block; }
.home-category-menu-header strong { font-size: 15px; }
.home-category-menu-header span { margin-top: 3px; color: var(--portal-muted); font-size: 10px; }
.home-category-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef3f8; color: #657184; cursor: pointer; font-size: 20px; }

.home-category-grid {
  max-height: 342px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0;
  overflow-y: auto;
  scrollbar-color: #b8c7d7 transparent;
  scrollbar-width: thin;
}

.home-category-option {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 146px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 16px 8px;
  border: 0;
  border-right: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
  color: #4d5869;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.home-category-option:hover,
.home-category-option:focus-visible,
.home-category-option.is-active {
  z-index: 1;
  background: #edf6ff;
  color: #1769b4;
  outline: none;
  transform: translateY(-2px);
}

.home-category-option-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(145deg, #4da1f3, #2368b7);
  color: #fff;
  box-shadow: 0 10px 24px rgba(42, 104, 166, .18);
  font-size: 23px;
  font-weight: 850;
}

.home-category-option-icon img { width: 100%; height: 100%; object-fit: cover; }
.home-category-option-icon.tone-1 { background: linear-gradient(145deg, #6d7c93, #3f4d63); }
.home-category-option-icon.tone-2 { background: linear-gradient(145deg, #ffad46, #ef762d); }
.home-category-option-icon.tone-3 { background: linear-gradient(145deg, #f15ca9, #d72a84); }
.home-category-option-icon.tone-4 { background: linear-gradient(145deg, #ffd04b, #e0a51b); }
.home-category-option-icon.tone-5 { background: linear-gradient(145deg, #5ccda4, #27966f); }
.home-category-option-icon.tone-6 { background: linear-gradient(145deg, #8b76e8, #5944b7); }
.home-category-option-icon.tone-7 { background: linear-gradient(145deg, #ff6d61, #e43a31); }
.home-category-option-name { max-width: 100%; overflow: hidden; font-size: 11px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.home-category-option-count { color: var(--portal-muted); font-size: 9px; }

.portal-home .product-service-badges {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}

.portal-home .product-service-badges span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(33, 119, 205, .93);
  color: #fff;
  box-shadow: 0 4px 12px rgba(23, 89, 153, .22);
  font-size: 8px;
  font-weight: 800;
}

.home-select-field span {
  position: absolute;
  top: 8px;
  left: 14px;
  z-index: 1;
  color: var(--portal-muted);
  font-size: 9px;
  font-weight: 760;
  pointer-events: none;
}

.home-select-field select {
  width: 100%;
  min-height: 58px;
  padding: 15px 38px 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: var(--portal-ink);
  font-size: 13px;
  font-weight: 680;
}

.home-select-field select:focus {
  border-color: var(--portal-blue);
  box-shadow: 0 0 0 3px rgba(49, 134, 232, .12);
}

.home-search-panel .hot-searches {
  margin-top: 24px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--portal-line);
  border-bottom: 0;
}

.home-catalog-container { padding-top: 30px; }

.portal-home .catalog-intro {
  align-items: center;
  padding: 30px 34px;
  border: 1px solid var(--portal-line);
  border-radius: 14px 14px 0 0;
  background: #fff;
  box-shadow: var(--portal-shadow);
}

.portal-home .catalog-intro h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
  color: var(--portal-ink);
}

.portal-home .catalog-intro .intro-copy { margin-top: 8px; font-size: 12px; }
.portal-home #products { margin-top: -1px; border-color: var(--portal-line); border-radius: 0 0 14px 14px; box-shadow: var(--portal-shadow); }
.portal-home .catalog-stats { box-shadow: none; }
.portal-home footer { margin-top: 0; border-top: 1px solid #dce2e9; background: #e8ecf1; }
.portal-home .footer-inner { width: min(1240px, calc(100% - 40px)); min-height: 92px; }

@media (max-width: 1020px) {
  .portal-home .portal-header-search { display: none; }
  .home-platform-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-platform-link:nth-child(5) { border-left: 0; }
  .home-platform-link:nth-child(n + 5) { border-top: 1px solid #edf0f4; }
  .home-search-panel .home-search-toolbar { grid-template-columns: 1fr 1fr; }
  .home-search-panel .search-wrap { grid-column: 1 / -1; grid-row: 1; }
  .home-category-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .portal-home .portal-header-main,
  .portal-home .portal-nav-inner,
  .home-platform-panel,
  .home-search-panel,
  .home-catalog-container,
  .portal-home .footer-inner { width: min(100% - 24px, 1240px); }
  .portal-home .portal-header-actions .portal-button:not(.dark) { display: none; }
  .portal-home .portal-header-main { min-height: 74px; }
  .portal-home .portal-nav-groups { margin-left: 0; padding: 0 10px; }
  .portal-home .portal-qq-group { min-height: 28px; padding: 0 8px; font-size: 10px; }
  .portal-home .portal-logo { min-width: 0; font-size: 20px; }
  .portal-home .portal-logo-mark { width: 40px; height: 40px; font-size: 18px; }
  .home-category-nav { min-width: 170px; padding-left: 18px; }
  .home-hero { min-height: 470px; padding: 58px 16px 110px; }
  .home-benefit { min-width: 0; width: calc(50% - 6px); }
  .home-platform-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-platform-link { min-height: 112px; border-top: 1px solid #edf0f4; }
  .home-platform-link:nth-child(odd) { border-left: 0; }
  .home-platform-link:nth-child(-n + 2) { border-top: 0; }
  .home-search-panel { padding: 18px 14px 0; }
  .home-search-panel .home-search-toolbar { grid-template-columns: 1fr; }
  .home-search-panel .search-wrap { grid-column: auto; grid-row: auto; }
  .home-search-panel .segmented { overflow-x: auto; }
  .home-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 390px; }
  .home-category-option { min-height: 126px; }
  .portal-home .catalog-intro { padding: 24px; }
}

@media (max-width: 460px) {
  .portal-home .portal-logo span:last-child { display: none; }
  .home-benefit { width: 100%; }
  .home-hero-actions .portal-button { flex: 1; }
}

/* Use the same purple palette for the storefront and its product cards. */
.home-category-nav { background: var(--portal-blue-dark); }
.home-order-link { color: var(--portal-ink); }
.home-hero-shell {
  background:
    radial-gradient(circle at 14% 25%, rgba(167, 139, 250, .18) 0 42px, transparent 43px),
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, .07) 0 60px, transparent 61px),
    radial-gradient(circle at 85% 72%, rgba(139, 92, 246, .16) 0 72px, transparent 73px),
    linear-gradient(115deg, #24123d 0%, #4c1d95 48%, #24123d 100%);
}
.home-hero h1 {
  color: #f4edff;
  background: linear-gradient(90deg, #ffffff, #e9d5ff 52%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
}
.home-benefit-icon { background: linear-gradient(145deg, #8b5cf6, #6d28d9); }
.home-platform-link:hover,
.home-platform-link:focus-visible { color: var(--portal-blue-dark); background: #faf7ff; }
.home-platform-icon,
.home-platform-icon.red,
.home-platform-icon.orange,
.home-platform-icon.pink,
.home-platform-icon.gold { background: linear-gradient(145deg, #8b5cf6, #5b21b6); }
.home-category-trigger:hover,
.home-category-trigger[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(109, 40, 217, .1); }
.home-category-trigger-icon { background: #f0e8fc; }
.home-category-menu { border-color: #e2d6f3; background: linear-gradient(145deg, #fff, #faf7ff); }
.home-category-option:hover,
.home-category-option:focus-visible,
.home-category-option.is-active { background: #f5efff; color: var(--portal-blue-dark); }
.home-category-option-icon,
.home-category-option-icon.tone-1,
.home-category-option-icon.tone-2,
.home-category-option-icon.tone-3,
.home-category-option-icon.tone-4,
.home-category-option-icon.tone-5,
.home-category-option-icon.tone-6,
.home-category-option-icon.tone-7 { background: linear-gradient(145deg, #8b5cf6, #5b21b6); }
.portal-home .product-service-badges span { background: rgba(109, 40, 217, .93); box-shadow: 0 4px 12px rgba(91, 33, 182, .22); }
.portal-home .product-card { border-color: var(--portal-line); }
.portal-home .product-card:hover,
.portal-home .product-card.is-selected { border-color: var(--portal-blue); box-shadow: 0 18px 42px rgba(91, 33, 182, .16); }
.portal-home .product-visual { background: linear-gradient(145deg, #f3edff, #e7dafa); }
.portal-home .product-placeholder { background: linear-gradient(145deg, #8b5cf6, #5b21b6); }
.portal-home .series-badge { background: #f0e8fc; color: var(--portal-blue-dark); }
.portal-home .series-badge.is-special-offer {
  border-color: #ffaaa6;
  background: #fff0ef;
  color: #d91f18;
  font-weight: 950;
}
.portal-home .product-title { color: var(--portal-ink); }
.portal-home .product-price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.portal-home .product-card .price { color: #e1251b; font-weight: 900; }
.portal-home .product-card.is-special-offer .price { font-weight: 950; }
.portal-home .price-marker {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border: 1px solid #e1251b;
  border-radius: 4px;
  background: #e1251b;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.portal-home .product-card.is-lowest-price .product-title { font-weight: 800; }
.portal-home .buy-button,
.portal-home .buy-button:hover,
.portal-home .buy-button:focus-visible {
  background: transparent !important;
  color: transparent !important;
  box-shadow: none !important;
}
.portal-home .buy-button:hover,
.portal-home .buy-button:focus-visible { outline-color: #8b5cf6; }
.portal-home .product-card.is-unavailable { border-color: #e2d6f3; }
.portal-home .product-card.is-unavailable .product-placeholder { background: #d8cbed; }
