/* ==========================================================================
   Asystir App Store  -  light, Apple App Store inspired layout
   Self-contained styles scoped under .ASStore (top nav keeps using Home.css)
   ========================================================================== */

/* --- Top bar: thin + dark, matching the home page (overrides Home.css) --- */
.AppStorePage .TopBar {
  height: 58px !important;
  background: #0b0b0d !important;
  background-image: none !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.AppStorePage .TopBar:after {
  display: none !important;
}

.AppStorePage .TopMenu {
  height: 58px !important;
  line-height: 58px !important;
  background: transparent !important;
}

.AppStorePage .Logo {
  height: 30px !important;
  width: auto !important;
  margin: 14px 26px !important;
  top: 0 !important;
}

.AppStorePage .LogoSentence,
.AppStorePage .callusbtn,
.AppStorePage .AiWorkerHeaderVideoSlot,
.AppStorePage .TopSecondMenuWrap {
  display: none !important;
}

/* Clear the fixed top bar so store content is not hidden under it */
.AppStorePage .ASStore {
  padding-top: 58px;
}

.ASStore {
  --as-bg: #f5f5f7;
  --as-surface: #ffffff;
  --as-text: #1d1d1f;
  --as-muted: #6e6e73;
  --as-line: #e3e3e6;
  --as-accent: #0071e3;
  --as-accent-dark: #0058b8;
  --as-radius: 18px;
  --as-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--as-text);
  background: var(--as-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.ASStore *,
.ASStore *::before,
.ASStore *::after {
  box-sizing: border-box;
}

.ASLayout {
  display: flex;
  align-items: flex-start;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 22px 60px;
  gap: 26px;
}

/* ------------------------------ Sidebar ------------------------------ */
.ASSidebar {
  flex: 0 0 236px;
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

.ASSidebarTitle {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 6px 18px;
}

.ASNavGroup {
  margin-bottom: 22px;
}

.ASNavGroupLabel {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--as-muted);
  padding: 0 12px;
  margin-bottom: 6px;
}

.ASNavItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--as-text);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ASNavItem svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--as-accent);
}

.ASNavItem:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ASNavItem.is-active {
  background: var(--as-accent);
  color: #fff;
}

.ASNavItem.is-active svg {
  color: #fff;
}

/* ------------------------------ Main ------------------------------ */
.ASMain {
  flex: 1 1 auto;
  min-width: 0;
}

/* Hero carousel */
.ASHero {
  position: relative;
  border-radius: var(--as-radius);
  overflow: hidden;
  min-height: 340px;
  box-shadow: var(--as-shadow);
  margin-bottom: 34px;
}

.ASHeroSlide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 44px 48px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 6s ease;
  pointer-events: none;
}

.ASHeroSlide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.ASHeroSlide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 22, 40, 0.72) 0%, rgba(6, 22, 40, 0.35) 45%, rgba(6, 22, 40, 0.05) 100%);
}

.ASHeroSlide > * {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 560px;
}

.ASHeroKicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 10px;
}

.ASHeroTitle {
  font-size: 40px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.ASHeroText {
  font-size: 18px;
  line-height: 1.4;
  opacity: 0.92;
  margin: 0;
}

.ASHeroDots {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.ASHeroDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.ASHeroDot.is-active {
  background: #fff;
  width: 22px;
  border-radius: 5px;
}

/* Section title */
.ASSectionHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 4px 16px;
}

.ASSectionTitle {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ASSectionSub {
  font-size: 14px;
  color: var(--as-muted);
}

/* App grid */
.ASAppGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px 26px;
}

.ASAppCard {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--as-surface);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.ASAppCard:hover {
  transform: translateY(-2px);
  box-shadow: var(--as-shadow);
}

.ASAppIcon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 15px;
  object-fit: cover;
  background: #f0f0f2;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* Gradient badge icon (AI agents) - shares sizing with the img icon classes */
.ASGlyphIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: none;
}

.ASGlyphIcon svg {
  width: 52%;
  height: 52%;
}

.ASAppInfo {
  flex: 1 1 auto;
  min-width: 0;
}

.ASAppName {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.ASAppSub {
  font-size: 13px;
  color: var(--as-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ASGetBtn {
  flex: 0 0 auto;
  padding: 6px 20px;
  border: none;
  border-radius: 999px;
  background: #e8e8ed;
  color: var(--as-accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ASGetBtn:hover {
  background: #dcdce2;
}

/* ------------------------------ App detail ------------------------------ */
.ASView {
  display: none;
}

.ASView.is-active {
  display: block;
}

.ASDetailHead {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--as-line);
  margin-bottom: 26px;
}

.ASDetailIcon {
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  border-radius: 26px;
  object-fit: cover;
  background: #f0f0f2;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ASDetailMeta {
  flex: 1 1 auto;
  min-width: 0;
}

.ASDetailName {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ASDetailSub {
  font-size: 16px;
  color: var(--as-muted);
  margin-top: 4px;
}

.ASDetailTags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ASTag {
  font-size: 12px;
  font-weight: 600;
  color: var(--as-muted);
  background: #ececf0;
  padding: 4px 10px;
  border-radius: 999px;
}

.ASDownloadBtn {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 9px 30px;
  border: none;
  border-radius: 999px;
  background: var(--as-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ASDownloadBtn:hover {
  background: var(--as-accent-dark);
  transform: translateY(-1px);
}

.ASBackBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--as-accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 14px;
}

.ASBackBtn svg {
  width: 16px;
  height: 16px;
}

/* Detail header banner (apps without screenshots) */
.ASDetailHero[hidden] {
  display: none;
}

.ASDetailHero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 300px;
  margin-bottom: 26px;
  background-color: #0b1220;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.ASDetailHeroOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 28px 32px;
  background: linear-gradient(
    90deg,
    rgba(6, 10, 20, 0.82) 0%,
    rgba(6, 10, 20, 0.55) 45%,
    rgba(6, 10, 20, 0.1) 100%
  );
}

.ASDetailHeroKicker {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.ASDetailHeroName {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ASDetailHeroLegend {
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  font-weight: 500;
  max-width: 620px;
  line-height: 1.4;
}

/* Screenshots */
.ASShots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.ASShots img {
  flex: 0 0 auto;
  height: 420px;
  border-radius: 16px;
  scroll-snap-align: start;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
  background: #f0f0f2;
}

.ASDetailDescWrap {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--as-line);
}

.ASDetailDescTitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ASDetailDesc {
  font-size: 16px;
  line-height: 1.55;
  color: #3a3a3c;
  max-width: 820px;
  white-space: pre-line;
}

.ASDetailFooter {
  margin-top: 34px;
  display: flex;
  justify-content: center;
}

.ASDetailFooter .ASDownloadBtn {
  padding: 12px 54px;
  font-size: 16px;
}

/* ------------------------------ Solution pages ------------------------------ */
.ASSolution {
  background: var(--as-surface);
  border-radius: var(--as-radius);
  box-shadow: var(--as-shadow);
  overflow: hidden;
}

.ASSolutionHero {
  padding: 56px 48px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.ASSolutionHero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6, 22, 40, 0.78), rgba(6, 22, 40, 0.35));
}

.ASSolutionHero > * {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 640px;
}

.ASSolutionKicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 10px;
}

.ASSolutionTitle {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 14px;
}

.ASSolutionLead {
  font-size: 18px;
  line-height: 1.45;
  opacity: 0.95;
  margin: 0;
}

.ASSolutionBody {
  padding: 40px 48px 48px;
}

.ASSolutionIntro {
  font-size: 17px;
  line-height: 1.6;
  color: #3a3a3c;
  max-width: 820px;
  margin: 0 0 32px;
}

.ASFeatureGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.ASFeatureCard {
  background: var(--as-bg);
  border-radius: 14px;
  padding: 22px;
}

.ASFeatureIcon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--as-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.ASFeatureIcon svg {
  width: 22px;
  height: 22px;
}

.ASFeatureTitle {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.ASFeatureText {
  font-size: 14px;
  line-height: 1.5;
  color: var(--as-muted);
}

.ASContactCard {
  background: linear-gradient(120deg, #06284a, #0a3d73);
  border-radius: 16px;
  padding: 30px 34px;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ASContactCard h4 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.ASContactCard p {
  margin: 0;
  opacity: 0.9;
  font-size: 15px;
  line-height: 1.5;
}

.ASContactLines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}

.ASContactLines a {
  color: #7fc0ff;
  text-decoration: none;
}

.ASContactLines a:hover {
  text-decoration: underline;
}

/* ------------------------------ Download modal ------------------------------ */
.ASModal {
  /* Modal lives outside .ASStore, so redeclare the tokens it relies on */
  --as-surface: #ffffff;
  --as-text: #1d1d1f;
  --as-muted: #6e6e73;
  --as-line: #e3e3e6;
  --as-accent: #0071e3;
  --as-accent-dark: #0058b8;
  --as-bg: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--as-text);
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ASModal *,
.ASModal *::before,
.ASModal *::after {
  box-sizing: border-box;
}

.ASModal.is-open {
  display: flex;
}

.ASModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.ASModalDialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 30px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.ASModalClose {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #ececf0;
  color: #555;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ASModalClose:hover {
  background: #ddd;
}

.ASModalIcon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  margin: 0 auto 14px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ASModalTitle {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
}

.ASModalText {
  font-size: 14px;
  line-height: 1.5;
  color: var(--as-muted);
  margin-bottom: 18px;
}

.ASField {
  text-align: left;
  margin-bottom: 12px;
}

.ASField label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--as-muted);
  margin-bottom: 5px;
}

.ASField input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--as-line);
  border-radius: 11px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ASField input:focus {
  border-color: var(--as-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.ASPrimaryBtn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--as-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 4px;
}

.ASPrimaryBtn:hover {
  background: var(--as-accent-dark);
}

.ASDivider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--as-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ASDivider::before,
.ASDivider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--as-line);
}

.ASOauthRow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ASOauthBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--as-line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--as-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ASOauthBtn:hover {
  background: #f5f5f7;
  border-color: #d0d0d5;
}

.ASOauthBtn img,
.ASOauthBtn svg {
  width: 18px;
  height: 18px;
}

/* Platform selector (first step) */
.ASPlatformGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.ASPlatformBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 6px;
  border: 1px solid var(--as-line);
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--as-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.ASPlatformBtn:hover {
  background: #f5f5f7;
  border-color: var(--as-accent);
  transform: translateY(-1px);
}

.ASPlatformBtn svg {
  width: 30px;
  height: 30px;
}

/* Step visibility: platform -> form -> result */
.ASModalPlatform {
  display: block;
}

.ASModalForm {
  display: none;
}

.ASModalResult {
  display: none;
}

.ASModal.show-form .ASModalPlatform {
  display: none;
}

.ASModal.show-form .ASModalForm {
  display: block;
}

.ASModal.show-result .ASModalPlatform,
.ASModal.show-result .ASModalForm {
  display: none;
}

.ASModal.show-result .ASModalResult {
  display: block;
}

/* Loading (simulated back-end check) */
.ASModalLoading {
  display: none;
  text-align: center;
  padding: 12px 0 4px;
}

.ASModal.show-loading .ASModalPlatform,
.ASModal.show-loading .ASModalForm {
  display: none;
}

.ASModal.show-loading .ASModalLoading {
  display: block;
}

.ASSpinner {
  width: 56px;
  height: 56px;
  margin: 6px auto 18px;
  border-radius: 50%;
  border: 5px solid #e6e8ec;
  border-top-color: var(--as-accent, #0071e3);
  animation: ASSpin 0.8s linear infinite;
}

@keyframes ASSpin {
  to {
    transform: rotate(360deg);
  }
}

/* OAuth note step */
.ASModalOauth {
  display: none;
}

.ASModal.show-oauth .ASModalPlatform,
.ASModal.show-oauth .ASModalForm {
  display: none;
}

.ASModal.show-oauth .ASModalOauth {
  display: block;
  text-align: center;
}

.ASResultIconInfo {
  color: #0071e3;
  background: #e8f1fe;
}

.ASResultIcon {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  background: #fff4e5;
  box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.12);
}

.ASResultIcon svg {
  width: 32px;
  height: 32px;
}

.ASResultText {
  font-size: 15px;
  line-height: 1.55;
  color: var(--as-text);
  margin-bottom: 18px;
}

.ASResultContact {
  background: var(--as-bg);
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--as-muted);
  margin-bottom: 18px;
}

.ASResultContact a {
  color: var(--as-accent);
  text-decoration: none;
}

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 900px) {
  .ASLayout {
    flex-direction: column;
    padding: 16px 14px 50px;
  }

  .ASSidebar {
    position: static;
    flex: 1 1 auto;
    width: 100%;
  }

  .ASSidebarTitle {
    display: none;
  }

  .ASNavGroups {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .ASNavGroup {
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  .ASNavItem {
    white-space: nowrap;
  }

  .ASHeroTitle {
    font-size: 28px;
  }

  .ASHeroSlide {
    padding: 30px 26px;
  }

  .ASShots img {
    height: 320px;
  }

  .ASDetailHead {
    flex-wrap: wrap;
  }

  .ASDetailHero {
    min-height: 220px;
  }

  .ASDetailHeroOverlay {
    padding: 20px 22px;
  }

  .ASDetailHeroName {
    font-size: 26px;
  }

  .ASDetailHeroLegend {
    font-size: 15px;
  }
}
