:root {
  color-scheme: light;
  --color-page: #efcfc8;
  --color-background: #f9e3de;
  --color-category-card: #fff7f5;
  --color-product-card: #f8ece8;
  --color-panel: #fff9f7;
  --color-accent: #edb1af;
  --color-accent-strong: #dc8f8d;
  --color-product-image: #dfa09c;
  --color-primary-text: #3d2c2a;
  --color-secondary-text: #7a6663;
  --color-contact-text: #6e5552;
  --color-focus: #8f4f4b;
  --color-white: #ffffff;
  --radius-card: 20px;
  --radius-large: 28px;
  --radius-image: 14px;
  --app-max-width: 430px;
  --shadow-soft: 0 12px 32px rgb(82 44 40 / 9%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--color-page);
  color: var(--color-primary-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.app-shell {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100dvh;
  margin-inline: auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: var(--color-background);
}
.app-shell--home { max-width: 390px; }
.app-shell--catalog, .app-shell--detail { padding-inline: 20px; }

.profile { display: flex; align-items: center; gap: 16px; min-height: 80px; padding: 8px; }
.profile__avatar { flex: 0 0 auto; width: 64px; height: 64px; border: 2px solid rgb(255 255 255 / 75%); border-radius: 50%; object-fit: cover; }
.profile__content { min-width: 0; }
.profile__name, .profile__tagline, .profile__contact { margin: 0; }
.profile__name { font-size: 1.125rem; font-weight: 700; line-height: 1.2; }
.profile__tagline, .profile__contact { font-size: .875rem; font-weight: 600; }
.profile__tagline { margin-top: 5px; color: var(--color-secondary-text); }
.profile__contact { margin-top: 3px; color: var(--color-contact-text); }

.section { margin-top: 10px; }
.section__title { margin: 0 0 10px; font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.section__title--center { text-align: center; }
.category-list { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.category-row {
  display: flex; align-items: center; gap: 12px;
  width: min(290px, 100%); min-height: 90px; padding: 16px 28px;
  background: var(--color-category-card); border-radius: var(--radius-card); text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.category-row--left { margin-right: auto; }
.category-row--right { margin-left: auto; }
.category-row__image { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.category-row__name { font-size: 1.125rem; font-weight: 700; }
.section--latest { margin-top: 10px; }
.product-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.product-list--home { align-items: center; }
.product-list article { width: min(290px, 100%); }
.product-card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 98px; padding: 12px;
  background: var(--color-product-card); border-radius: var(--radius-card); text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.product-card__image { flex: 0 0 auto; width: 64px; height: 74px; border-radius: 11px; background: var(--color-product-image); object-fit: cover; }
.product-card__content { min-width: 0; }
.product-card__name, .product-card__price, .product-card__description { margin: 0; }
.product-card__name { color: #261d1c; font-size: .875rem; font-weight: 700; line-height: 1.25; }
.product-card__price { margin-top: 4px; color: #b96563; font-size: .8125rem; font-weight: 800; }
.product-card__description { margin-top: 4px; color: var(--color-secondary-text); font-size: .75rem; font-weight: 600; }
.footer { padding: 20px 0 8px; color: var(--color-secondary-text); text-align: center; }

.topbar { display: flex; align-items: center; min-height: 52px; margin-bottom: 14px; }
.topbar--detail { margin-bottom: 10px; }
.icon-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: rgb(255 255 255 / 75%); border-radius: 50%; text-decoration: none;
  box-shadow: 0 6px 18px rgb(61 44 42 / 6%);
}
.category-hero { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 18px; padding: 10px 8px 24px; }
.category-hero__image { width: 88px; height: 88px; border: 7px solid rgb(237 177 175 / 65%); border-radius: 50%; object-fit: cover; }
.category-hero__title { margin: 0; font-size: 1.75rem; line-height: 1.1; }
.category-hero__description { margin: 8px 0 0; color: var(--color-secondary-text); font-size: .95rem; }
.catalog-panel { margin-inline: -4px; padding: 22px 14px 18px; background: rgb(255 249 247 / 70%); border-radius: var(--radius-large); box-shadow: var(--shadow-soft); }
.catalog-panel__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.catalog-panel__heading h2, .catalog-panel__heading p { margin: 0; }
.catalog-panel__heading h2 { font-size: 1.125rem; }
.catalog-panel__heading p { color: var(--color-secondary-text); font-size: .8rem; }
.filter-bar { display: flex; gap: 8px; margin: 16px 0 18px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto; min-height: 40px; padding: 8px 14px;
  border: 1px solid transparent; border-radius: 999px; background: #f7e3df; color: var(--color-primary-text);
  cursor: pointer;
}
.filter-chip.is-active { background: var(--color-accent-strong); color: var(--color-white); font-weight: 700; }
.catalog-list { display: flex; flex-direction: column; gap: 12px; }
.catalog-card { margin: 0; }
.catalog-card__link {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 36px; align-items: center; gap: 14px;
  min-height: 136px; padding: 10px; background: var(--color-panel); border-radius: 22px;
  text-decoration: none; box-shadow: 0 8px 22px rgb(61 44 42 / 6%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.catalog-card__image { width: 112px; height: 112px; border-radius: 16px; object-fit: cover; background: var(--color-product-card); }
.catalog-card__content { min-width: 0; }
.catalog-card__name, .catalog-card__price, .catalog-card__description { margin: 0; }
.catalog-card__name { font-size: .98rem; line-height: 1.25; }
.catalog-card__price { margin-top: 7px; color: #df7775; font-weight: 800; }
.catalog-card__description { margin-top: 7px; color: var(--color-secondary-text); font-size: .82rem; }
.catalog-card__arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f7d6d1; color: #d75f5d; font-size: 1.7rem; line-height: 1; }

.product-gallery { padding: 18px 16px 12px; background: rgb(255 249 247 / 75%); border-radius: var(--radius-large); box-shadow: var(--shadow-soft); }
.product-gallery__image { width: 100%; aspect-ratio: 1; border-radius: 22px; object-fit: cover; background: var(--color-product-card); }
.gallery-dots { display: flex; justify-content: center; gap: 8px; padding-top: 12px; }
.gallery-dots span { width: 8px; height: 8px; border-radius: 50%; background: #eed6d1; }
.gallery-dots .is-active { background: var(--color-accent-strong); }
.product-summary { padding: 24px 2px 18px; }
.product-summary__name, .product-summary__price { margin: 0; }
.product-summary__name { font-size: 1.65rem; line-height: 1.2; }
.product-summary__price { margin-top: 8px; color: #df7775; font-size: 1.35rem; font-weight: 800; }
.category-pill { display: inline-flex; margin-top: 12px; padding: 6px 12px; border-radius: 999px; background: #f6d6d2; color: #c85f5c; font-size: .82rem; font-weight: 700; text-decoration: none; }
.product-facts { padding: 18px; background: rgb(255 249 247 / 75%); border-radius: 22px; box-shadow: var(--shadow-soft); }
.product-facts dl { display: grid; gap: 14px; margin: 0; }
.product-facts dl > div { display: flex; justify-content: space-between; gap: 12px; }
.product-facts dt { color: var(--color-secondary-text); }
.product-facts dd { margin: 0; font-weight: 700; text-align: right; }
.product-description { padding: 24px 2px 120px; }
.product-description h2 { margin: 0 0 10px; font-size: 1.1rem; }
.product-description p { margin: 0; color: #513d3a; }
.highlight-list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.highlight-list li { position: relative; padding-left: 28px; }
.highlight-list li::before { content: "✓"; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--color-accent); color: white; font-size: .72rem; font-weight: 800; }
.purchase-bar {
  position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5;
  display: flex; margin: -92px 0 0; padding: 14px; background: rgb(255 249 247 / 88%);
  border: 1px solid rgb(255 255 255 / 70%); border-radius: 24px; box-shadow: 0 16px 35px rgb(74 37 34 / 17%);
  backdrop-filter: blur(12px);
}
.purchase-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; border-radius: 16px; background: linear-gradient(135deg, #e9918f, #df7775); color: white; font-weight: 800; text-decoration: none; }
.empty-state { padding: 80px 18px; text-align: center; }
.empty-state h1 { margin: 0; }
.empty-state p { color: var(--color-secondary-text); }
.primary-link { display: inline-flex; margin-top: 12px; padding: 12px 18px; border-radius: 14px; background: var(--color-accent-strong); color: white; font-weight: 700; text-decoration: none; }
.is-disabled { opacity: .55; pointer-events: none; }

.category-row:hover, .product-card:hover, .catalog-card__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(61 44 42 / 9%); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
a:active, button:active { transform: scale(.985); }

@media (max-width: 359px) {
  .app-shell--catalog, .app-shell--detail { padding-inline: 14px; }
  .category-row { width: 270px; padding-inline: 20px; }
  .catalog-card__link { grid-template-columns: 90px minmax(0, 1fr) 32px; gap: 10px; }
  .catalog-card__image { width: 90px; height: 96px; }
  .category-hero { grid-template-columns: 72px 1fr; }
  .category-hero__image { width: 72px; height: 72px; }
  .category-hero__title { font-size: 1.45rem; }
}

@media (min-width: 700px) {
  body { padding-block: 24px; }
  .app-shell { min-height: calc(100dvh - 48px); border-radius: 32px; box-shadow: 0 28px 70px rgb(81 45 41 / 18%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Social links category */
.social-panel {
  margin-inline: -4px;
  padding: 24px 14px 18px;
  background: rgb(255 249 247 / 72%);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}
.social-panel__intro { padding: 0 4px; }
.social-panel__eyebrow,
.social-panel__intro h2,
.social-panel__intro p,
.social-panel__note { margin: 0; }
.social-panel__eyebrow {
  color: #c76c69;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.social-panel__intro h2 {
  margin-top: 5px;
  font-size: 1.35rem;
  line-height: 1.2;
}
.social-panel__intro > p:last-child {
  margin-top: 8px;
  color: var(--color-secondary-text);
  font-size: .9rem;
}
.social-link-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.social-link-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 14px;
  background: var(--color-panel);
  border: 1px solid rgb(237 177 175 / 34%);
  border-radius: 22px;
  color: var(--color-primary-text);
  text-decoration: none;
  box-shadow: 0 8px 22px rgb(61 44 42 / 6%);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.social-link-card__icon-wrap {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: #f8e3df;
}
.social-link-card__icon {
  width: 56px;
  height: 56px;
}
.social-link-card__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.social-link-card__name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}
.social-link-card__label {
  margin-top: 4px;
  color: var(--color-secondary-text);
  font-size: .82rem;
  font-weight: 600;
}
.social-link-card__handle {
  margin-top: 5px;
  color: #bd6966;
  font-size: .75rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-link-card__arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f7d6d1;
  color: #c85f5c;
  font-size: 1.15rem;
  font-weight: 800;
}
.social-link-card.is-disabled {
  opacity: .72;
  pointer-events: none;
}
.social-link-card.is-disabled .social-link-card__arrow {
  color: var(--color-secondary-text);
}
.social-panel__note {
  margin-top: 16px;
  padding: 0 8px;
  color: var(--color-secondary-text);
  font-size: .75rem;
  text-align: center;
}
.social-link-card:hover {
  transform: translateY(-2px);
  border-color: rgb(220 143 141 / 56%);
  box-shadow: 0 11px 26px rgb(61 44 42 / 9%);
}

@media (max-width: 359px) {
  .social-link-card {
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 12px;
  }
  .social-link-card__icon-wrap {
    width: 54px;
    height: 54px;
  }
  .social-link-card__icon {
    width: 50px;
    height: 50px;
  }
}

/* Dynamic CMS states */
.profile__heading-row { display: flex; align-items: center; gap: 8px; }
.mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgb(197 104 101 / 28%);
  border-radius: 999px;
  background: rgb(255 247 245 / 72%);
  color: #a45250;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.status-message {
  min-height: 0;
  margin: 0;
  color: var(--color-secondary-text);
  font-size: .8125rem;
  text-align: center;
}
.status-message:not(:empty) { min-height: 22px; padding: 3px 0 5px; }
.status-message--error { color: #9f3f3d; font-weight: 700; }
.empty-note { margin: 16px 0; color: var(--color-secondary-text); font-size: .875rem; text-align: center; }
.footer p { max-width: 340px; margin: 0 auto 10px; font-size: .6875rem; line-height: 1.5; }
