/* Public creator page. Admin styles remain in style.css. */
.link-page {
  --color-primary: #252525;
  --color-primary-hover: #414141;
  --color-text: #252525;
  --color-muted: #686868;
  --color-border: #e8e8e8;
  --color-bg: #fff;
  --color-soft: #f5f5f5;
  --button-bg: var(--color-primary);
  --catalog-accent: #a8422d;
  min-height: 100svh;
  background: #f5f5f5;
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
}
.link-page ::selection { background: #ffe4d8; color: #252525; }
.link-page h1, .link-page h2, .link-page h3 { letter-spacing: -.025em; }
.link-page a:focus-visible, .link-page button:focus-visible, .link-page input:focus-visible {
  outline: 2px solid var(--catalog-accent);
  outline-offset: 4px;
}
.link-page #main, .link-page-bar, .link-page-footer {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  background: var(--color-bg);
}
.link-page #main { min-height: calc(100svh - 152px); }
.link-page-bar { height: 72px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; }
.link-page-brand { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .8125rem; font-weight: 750; letter-spacing: -.025em; }
.link-page-brand .icon { width: 17px; height: 17px; }
.link-page-bar .icon-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--color-soft); }
.link-page-bar .icon-button:hover { background: #eaeaea; }
.catalog-shell { padding: 8px 22px 0; }
.creator-banner { position: relative; aspect-ratio: 3 / 1; margin: -8px -22px 0; overflow: hidden; background: var(--color-soft); }
.creator-banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-edit { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 24px; background: #fff; color: var(--color-text); font-size: .8125rem; font-weight: 650; }
.banner-edit .icon { width: 17px; height: 17px; }
.banner-edit:hover { background: #eee; }
.banner-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 3 / 1; min-height: 120px; margin: 0 0 24px; padding: 16px; border: 1px dashed #bcbcbc; border-radius: 12px; background: var(--color-soft); }
.banner-add > .icon { width: 24px; height: 24px; color: var(--color-muted); }
.banner-add > span { font-size: .875rem; font-weight: 650; }
.banner-add > small { color: var(--color-muted); font-size: .75rem; }
.banner-add:hover { background: #ededed; }
.creator-profile.has-banner { position: relative; padding-top: 0; }
.has-banner .creator-avatar { margin-top: -42px; border: 4px solid white; }
.creator-profile { text-align: center; padding: 4px 8px 30px; }
.creator-avatar { width: 84px; height: 84px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: #fff0e8; color: var(--catalog-accent); font-size: 2rem; font-weight: 700; }
.creator-profile h1 { margin: 0 0 9px; font-size: 1.5rem; line-height: 1.4; overflow-wrap: anywhere; }
.creator-bio { margin: 0 auto; max-width: 44ch; color: var(--color-muted); font-size: .9375rem; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.creator-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.creator-socials a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--color-border); border-radius: 24px; font-size: .8125rem; font-weight: 600; }
.creator-socials .icon { width: 14px; height: 14px; color: var(--color-muted); }
.creator-socials a:hover { background: var(--color-soft); }
.affiliate-notice { margin: 0 0 24px; padding: 14px 16px; border-radius: 12px; background: #f7f7f7; color: #606060; font-size: .8125rem; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.catalog-search { display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 3px 4px 3px 14px; border: 1px solid #dedede; border-radius: 12px; background: #fff; }
.catalog-search:focus-within { border-color: #777; }
.catalog-search > .icon { width: 19px; height: 19px; color: var(--color-muted); }
.link-page .catalog-search input { min-width: 0; flex: 1; width: 0; padding: 10px 0; border: 0; background: transparent; border-radius: 0; font-size: .875rem; caret-color: var(--catalog-accent); }
.catalog-search input::placeholder { color: #737373; opacity: 1; }
.catalog-search button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 9px; background: #f3f3f3; font-size: .8125rem; font-weight: 650; white-space: nowrap; }
.catalog-search button:hover { background: #e7e7e7; }
.catalog-categories { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #ccc transparent; padding: 16px 6px 6px; margin-inline: -6px; }
.catalog-categories a { flex: 0 0 auto; display: inline-flex; justify-content: center; align-items: center; min-height: 44px; max-width: 100%; padding: 8px 16px; border: 1px solid var(--color-border); border-radius: 24px; font-size: .8125rem; overflow-wrap: anywhere; }
.catalog-categories a[aria-current] { background: var(--color-primary); border-color: var(--color-primary); color: white; font-weight: 650; }
.catalog-categories a:not([aria-current]):hover { background: var(--color-soft); }
.catalog-results { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-results > p { min-width: 0; margin: 0; font-size: .8125rem; color: var(--color-muted); overflow-wrap: anywhere; }
.catalog-results strong { color: var(--color-text); font-weight: 650; }
.catalog-results p > a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 8px; text-decoration: underline; text-underline-offset: 3px; }
.link-page .view-switch { flex-shrink: 0; padding: 0; gap: 4px; border: 0; background: transparent; }
.link-page .view-switch button { width: 44px; height: 44px; border-radius: 9px; color: #777; }
.link-page .view-switch button.selected { background: #f1f1f1; color: #252525; }
.link-page .view-switch button:hover { background: #eaeaea; }
.link-page .view-switch .icon { width: 18px; height: 18px; }
.link-page .product-grid { gap: 16px 12px; }
.link-page .product-card { min-width: 0; }
.catalog-product { display: flex; flex-direction: column; min-width: 0; height: 100%; border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; transition: border-color 180ms, transform 180ms cubic-bezier(.2,.8,.2,1); }
.catalog-photo { position: relative; flex-shrink: 0; aspect-ratio: 1; background: #f5f5f5; overflow: hidden; }
.catalog-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(.2,.8,.2,1); }
.catalog-photo-empty { display: grid; place-items: center; width: 100%; height: 100%; color: #999; }
.catalog-photo-empty .icon { width: 40px; height: 40px; stroke-width: 1.25; }
.catalog-number { position: absolute; top: 10px; left: 10px; min-width: 30px; padding: 3px 7px; border-radius: 6px; background: #fff; color: #252525; font-size: .75rem; line-height: 1.6; font-weight: 750; font-variant-numeric: tabular-nums; }
.catalog-product-info { display: flex; flex: 1; flex-direction: column; padding: 14px 12px 8px; }
.catalog-category { margin: 0 0 5px; color: var(--color-muted); font-size: .75rem; overflow-wrap: anywhere; }
.catalog-product-info h3 { margin: 0 0 8px; font-size: .9375rem; font-weight: 650; line-height: 1.5; text-wrap: pretty; overflow-wrap: anywhere; }
.catalog-description { margin: 0 0 12px; color: var(--color-muted); font-size: .8125rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.catalog-product-action { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; margin-top: auto; font-size: .75rem; color: #606060; }
.catalog-product-action .icon { width: 14px; height: 14px; }
.link-page .product-grid.list-view { gap: 12px; }
.link-page .list-view .product-card { display: block; padding: 0; border: 0; }
.list-view .catalog-product { display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: start; }
.list-view .catalog-photo { height: 100%; min-height: 112px; aspect-ratio: auto; }
.list-view .catalog-photo img { position: absolute; inset: 0; }
.list-view .catalog-product-info { min-width: 0; padding: 12px 14px 6px; }
.list-view .catalog-product-info h3 { font-size: .9375rem; }
.catalog-empty { min-height: 268px; padding: 44px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.catalog-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 50%; background: var(--color-soft); color: #777; }
.catalog-empty-icon .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.catalog-empty h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 650; }
.catalog-empty p { margin: 0; color: var(--color-muted); font-size: .875rem; line-height: 1.7; }
.catalog-empty .button { margin-top: 20px; font-size: .875rem; }
.catalog-footnote { margin: 30px 0 0; color: var(--color-muted); text-align: center; font-size: .75rem; }
.link-page-footer { min-height: 80px; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 24px 22px; }
.link-page-footer .link-page-brand { color: #606060; }
.manage-page { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; color: var(--color-muted); font-size: .75rem; }
.manage-page .icon { width: 13px; height: 13px; }
.manage-page:hover { color: #252525; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .catalog-product:hover { border-color: #bfbfbf; transform: translateY(-2px); }
  .catalog-product:hover .catalog-photo img { transform: scale(1.03); }
}
.catalog-product:active { transform: translateY(1px); }
@media (max-width: 640px) {
  .link-page { background: #fff; }
  .link-page-bar { height: 64px; padding: 10px 16px; }
  .catalog-shell { padding: 8px 16px 0; }
  .creator-banner { margin-inline: -16px; }
  .creator-profile { padding-top: 4px; padding-bottom: 28px; }
  .creator-avatar { width: 80px; height: 80px; }
  .link-page #main { min-height: calc(100svh - 144px); }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-product, .catalog-product:hover, .catalog-product:active, .catalog-product:hover .catalog-photo img { transform: none; }
}
