/* Landing (/), product page (/buy/:slug), AML policy and 404. */

/* ---- landing header ---------------------------------------------------------------------- */

.store-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 0 4px;
}

.store-brand {
  min-width: 0;
}

.store-name {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.store-intro {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 22px;
}

.store-header .contact-links {
  flex: none;
  gap: 12px;
  padding-top: 2px;
}

.is-loading {
  color: transparent;
  border-radius: var(--radius-sm);
  background: var(--color-divider);
}

.store-name.is-loading {
  width: 160px;
}

.store-intro.is-loading {
  width: 280px;
  max-width: 100%;
}

/* ---- product list ------------------------------------------------------------------------ */

.products {
  padding-top: 8px;
  padding-bottom: 8px;
}

.product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.product + .product {
  border-top: 1px solid var(--color-divider);
}

.product-info {
  min-width: 0;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  overflow-wrap: anywhere;
}

.product-desc {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 20px;
}

.product-buy {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.product-price {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
}

.product-skeleton {
  display: grid;
  gap: 10px;
  padding: 24px 0;
}

.product-skeleton + .product-skeleton {
  border-top: 1px solid var(--color-divider);
}

.product-skeleton .skeleton:first-child {
  width: 40%;
  height: 22px;
}

.product-skeleton .skeleton:last-child {
  width: 75%;
  height: 16px;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 32px 0;
  text-align: center;
}

.empty-title {
  font-weight: 600;
}

.empty-text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.empty .btn {
  margin-top: 12px;
}

/* ---- product page ------------------------------------------------------------------------ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--color-text);
}

.back-link .icon {
  width: 16px;
  height: 16px;
}

.buy .checkout-meta {
  margin-bottom: 4px;
}

.buy-title {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.buy-desc {
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 22px;
}

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.total-label {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.total-amount {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.buy-form .btn {
  margin-top: 20px;
}

/* ---- AML policy -------------------------------------------------------------------------- */

.policy-title {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.policy-content {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  color: var(--color-text-body);
  font-size: 15px;
  line-height: 24px;
}

.policy-content p {
  white-space: pre-line;
}

.policy-content .btn {
  justify-self: start;
}

.policy-content .skeleton {
  height: 16px;
}

.policy-content .skeleton:nth-child(2) {
  width: 85%;
}

.policy-content .skeleton:nth-child(3) {
  width: 60%;
}

/* ---- small screens ----------------------------------------------------------------------- */

@media (max-width: 520px) {
  .product {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .product-buy {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .store-header {
    margin-bottom: 20px;
  }
}
