/* Store — mall-style category + product grid */
.ae-page-store {
  --st-blue: #1e73be;
  --st-blue-deep: #1862a3;
  --st-text: #141820;
  --st-muted: #6b7684;
  --st-line: #eceff3;
  --st-soft: #f4f7fb;
  --st-card: #e8f1fb;
  background: #fff;
  color: var(--st-text);
}

.ae-page-store .ae-main {
  padding-top: 0;
}

.st-shop {
  padding: calc(var(--ae-header-h, 88px) + 40px) 0 clamp(72px, 10vw, 120px);
}

.st-shop__layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.st-cat {
  position: sticky;
  top: calc(var(--ae-header-h, 88px) + 20px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}

.st-cat__btn {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 14px;
  margin: 0;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--st-muted);
  cursor: pointer;
  border-radius: 4px;
  border-left: 3px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.st-cat__btn:hover {
  color: var(--st-text);
  background: var(--st-soft);
}

.st-cat__btn.is-active {
  color: var(--st-blue);
  background: transparent;
  border-left-color: var(--st-blue);
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 32px) clamp(16px, 2vw, 28px);
}

.st-grid__empty {
  grid-column: 1 / -1;
  margin: 48px 0;
  color: var(--st-muted);
  font-size: 1rem;
}

.st-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.st-card__media {
  margin: 0;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}

.st-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.st-card:hover .st-card__media img {
  transform: scale(1.04);
}

.st-card__title {
  margin: 14px 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--st-text);
}

.st-card__price {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--st-blue);
  letter-spacing: -0.02em;
}

.st-cta {
  padding: clamp(64px, 8vw, 96px) 0;
  background: linear-gradient(135deg, #1e73be 0%, #155a96 55%, #0f4472 100%);
  color: #fff;
  text-align: center;
}

.st-cta h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.st-cta p {
  margin: 14px 0 0;
  font-size: 1.02rem;
  opacity: 0.88;
}

.st-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

@media (max-width: 1100px) {
  .st-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .st-shop__layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .st-cat {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 0;
  }

  .st-cat__btn {
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
  }

  .st-cat__btn.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--st-blue);
  }

  .st-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .st-card__title {
    font-size: 0.92rem;
  }

  .st-card__price {
    font-size: 0.94rem;
  }
}

/* —— Product detail —— */
.st-detail {
  padding: calc(var(--ae-header-h, 88px) + 28px) 0 clamp(72px, 10vw, 120px);
}

.st-detail__crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 0.92rem;
  color: var(--st-muted);
}

.st-detail__crumb a {
  color: inherit;
  text-decoration: none;
}

.st-detail__crumb a:hover {
  color: var(--st-blue);
}

.st-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.st-detail__loading {
  grid-column: 1 / -1;
  margin: 48px 0;
  color: var(--st-muted);
}

.st-detail__media {
  margin: 0;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--st-card);
}

.st-detail__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-detail__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.st-detail__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.st-detail__price {
  margin: 18px 0 0;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: var(--st-text);
  letter-spacing: -0.03em;
}

.st-detail__points {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--st-muted);
}

.st-detail__summary {
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--st-muted);
}

.st-detail__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
}

.st-detail__label {
  font-size: 0.95rem;
  font-weight: 700;
}

.st-detail__label em {
  color: #e11d48;
  font-style: normal;
}

.st-detail__select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #d5dde7;
  border-radius: 6px;
  font: inherit;
  font-size: 0.98rem;
  background: #fff;
  color: var(--st-text);
}

.st-detail__actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.st-detail__btn {
  appearance: none;
  border: 0;
  min-height: 52px;
  border-radius: 6px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
}

.st-detail__btn--buy {
  background: var(--st-blue);
  color: #fff;
}

.st-detail__btn--buy:hover {
  background: var(--st-blue-deep);
}

.st-detail__btn--cart {
  background: #fff;
  color: var(--st-text);
  border: 1px solid #cfd7e2;
}

.st-detail__btn--cart:hover {
  background: var(--st-soft);
}

.st-detail__note {
  margin: 14px 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--st-muted);
}

.st-detail__info {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--st-line);
}

.st-detail__info-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.st-detail__info-text {
  margin: 12px 0 0;
  font-size: 1rem;
  color: var(--st-muted);
}

@media (max-width: 860px) {
  .st-detail__layout {
    grid-template-columns: 1fr;
  }

  .st-detail__actions {
    grid-template-columns: 1fr;
  }
}
