:root {
  --teal: #00aeb2;
  --teal-dark: #087f85;
  --pink: #ff2764;
  --yellow: #ffba31;
  --ink: #173337;
  --muted: #617477;
  --line: #d9e7e8;
  --soft: #eefafa;
  --surface: #ffffff;
  --shadow: 0 18px 48px rgba(13, 79, 83, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8fcfc;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% 0%, rgba(255, 186, 49, .12), transparent 28rem), #f8fcfc; }

button, input { font: inherit; }

a { color: inherit; }

.site-header {
  min-height: 82px;
  padding: 10px clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.brand img { width: 62px; height: 62px; object-fit: contain; }
.brand span { padding-left: 14px; border-left: 1px solid var(--line); }

.store-link { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-dark); font-weight: 750; text-decoration: none; }
.store-link svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

main { width: min(1380px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 76px; }

.catalog-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.eyebrow { color: var(--pink); text-transform: uppercase; font-weight: 850; letter-spacing: .11em; font-size: .8rem; margin: 0 0 7px; }
h1 { font-size: clamp(2rem, 4.5vw, 3.9rem); line-height: .98; letter-spacing: -.055em; margin: 0 0 14px; max-width: 780px; }
.catalog-intro > div > p:last-child { color: var(--muted); font-size: 1.05rem; margin: 0; }
.trust-note { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; background: var(--soft); color: var(--teal-dark); padding: 11px 15px; border-radius: 999px; font-weight: 750; font-size: .9rem; }
.trust-icon { display: grid; place-items: center; width: 22px; height: 22px; background: var(--teal); color: white; border-radius: 50%; }

.catalog-controls { background: var(--surface); border: 1px solid var(--line); padding: 18px; border-radius: 22px; box-shadow: 0 8px 26px rgba(13,79,83,.06); }
.search-box { height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-radius: 15px; border: 2px solid transparent; background: #f2f7f7; transition: .2s ease; }
.search-box:focus-within { border-color: var(--teal); background: white; box-shadow: 0 0 0 4px rgba(0,174,178,.11); }
.search-box svg { width: 23px; fill: none; stroke: var(--teal-dark); stroke-width: 2; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
.search-box input::placeholder { color: #839396; }
.search-box button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.65rem; line-height: 1; padding: 4px; }
.category-list { display: flex; gap: 9px; overflow-x: auto; padding-top: 14px; scrollbar-width: thin; }
.category-chip { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: white; color: var(--ink); font-size: .9rem; font-weight: 700; cursor: pointer; transition: .18s ease; }
.category-chip:hover { border-color: var(--teal); color: var(--teal-dark); }
.category-chip.active { background: var(--teal); border-color: var(--teal); color: white; }

.catalog-summary { min-height: 56px; display: flex; align-items: center; }
.catalog-summary p { margin: 0; color: var(--muted); font-size: .94rem; }

.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 26px rgba(13,79,83,.06); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.product-card:not(.skeleton-card):hover { transform: translateY(-5px); border-color: rgba(0,174,178,.45); box-shadow: var(--shadow); }
.product-image-button { border: 0; width: 100%; padding: 0; background: #fff; cursor: pointer; display: block; position: relative; overflow: hidden; aspect-ratio: 1 / 1.05; }
.product-image-button img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.product-card:hover .product-image-button img { transform: scale(1.035); }
.card-badge { position: absolute; left: 12px; top: 12px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--teal-dark); font-size: .76rem; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.product-info { padding: 17px 17px 18px; }
.product-info h2 { font-size: 1rem; line-height: 1.35; margin: 0 0 11px; min-height: 2.7em; }
.product-meta { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.product-price { margin: 0; font-weight: 850; font-size: 1.18rem; color: var(--ink); }
.product-price small { display: block; color: var(--muted); font-weight: 600; font-size: .7rem; margin-bottom: 1px; }
.variant-count { color: var(--muted); font-size: .78rem; text-align: right; }
.view-product { width: 100%; border: 0; border-radius: 12px; padding: 11px 12px; background: var(--soft); color: var(--teal-dark); font-weight: 800; cursor: pointer; transition: .18s ease; }
.view-product:hover { background: var(--teal); color: white; }

.empty-state { text-align: center; padding: 72px 20px; }
.empty-state > span { display: grid; place-items: center; margin: 0 auto 16px; width: 52px; height: 52px; border-radius: 50%; background: var(--soft); color: var(--teal); font-weight: 900; font-size: 1.5rem; }
.empty-state h2 { margin: 0 0 8px; font-size: 1.5rem; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }
.empty-state button { border: 0; border-radius: 12px; padding: 11px 16px; background: var(--teal); color: white; font-weight: 800; cursor: pointer; }

.skeleton-card { padding-bottom: 20px; }
.skeleton { background: linear-gradient(100deg, #eef3f3 30%, #f9fbfb 50%, #eef3f3 70%); background-size: 300% 100%; animation: shimmer 1.35s infinite; }
.skeleton.image { aspect-ratio: 1 / 1.05; }
.skeleton.line { height: 14px; border-radius: 8px; margin: 12px 16px 0; width: 55%; }
.skeleton.line.wide { margin-top: 18px; width: 80%; }
@keyframes shimmer { to { background-position-x: -150%; } }

footer { border-top: 1px solid var(--line); background: white; min-height: 116px; padding: 22px clamp(18px,5vw,72px); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
footer img { width: 58px; height: 58px; object-fit: contain; }
footer div { display: flex; flex-direction: column; gap: 2px; }
footer div span, footer p { color: var(--muted); font-size: .83rem; }
footer p { max-width: 360px; text-align: right; }

.product-dialog { width: min(980px, calc(100% - 28px)); max-height: min(88vh, 780px); padding: 0; border: 0; border-radius: 24px; overflow: auto; box-shadow: 0 30px 90px rgba(6,47,50,.28); }
.product-dialog::backdrop { background: rgba(7, 38, 41, .62); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; right: 14px; top: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.94); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.dialog-layout { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); min-height: 600px; }
.dialog-image-wrap { position: sticky; top: 0; align-self: start; min-height: 600px; display: grid; place-items: center; background: #f5fafa; }
.dialog-image-wrap img { width: 100%; height: 600px; object-fit: contain; }
.available-badge { position: absolute; left: 20px; top: 20px; padding: 8px 12px; border-radius: 999px; background: white; color: var(--teal-dark); font-size: .78rem; font-weight: 850; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.dialog-content { padding: 46px 34px 32px; }
.dialog-content h2 { font-size: clamp(1.45rem,3vw,2rem); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 10px; padding-right: 28px; }
.dialog-price { font-size: 1.45rem; font-weight: 900; margin: 0 0 25px; }
.dialog-content fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.dialog-content legend { font-weight: 800; margin-bottom: 10px; }
.variant-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; max-height: 196px; overflow: auto; padding: 2px; }
.variant-option { position: relative; }
.variant-option input { position: absolute; opacity: 0; pointer-events: none; }
.variant-option label { display: flex; flex-direction: column; justify-content: center; min-height: 54px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; cursor: pointer; font-weight: 760; font-size: .84rem; line-height: 1.25; }
.variant-option label small { font-weight: 550; color: var(--muted); margin-top: 3px; }
.variant-option input:checked + label { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,174,178,.14); color: var(--teal-dark); background: var(--soft); }
.variant-option input:focus-visible + label { outline: 3px solid rgba(0,174,178,.28); outline-offset: 2px; }
.measurements { background: #f5fafa; border-radius: 14px; padding: 14px; margin-bottom: 20px; }
.measurements h3 { margin: 0 0 10px; font-size: .95rem; }
.measurements p { color: var(--muted); font-size: .78rem; margin: 9px 0 0; }
.measurement-row { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: .8rem; padding: 6px 0; border-top: 1px solid var(--line); }
.measurement-row:first-child { border-top: 0; }
.measurement-row strong { color: var(--teal-dark); }
.dialog-actions { display: grid; gap: 9px; }
.primary-action, .secondary-action { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 13px; text-decoration: none; font-weight: 850; text-align: center; padding: 12px 16px; }
.primary-action { background: #1faa59; color: white; }
.primary-action:hover { background: #158246; }
.primary-action svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secondary-action { color: var(--teal-dark); border: 1px solid var(--teal); }
.shipping-note { color: var(--muted); font-size: .77rem; line-height: 1.45; text-align: center; margin: 14px 0 0; }

@media (max-width: 1050px) { .catalog-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) {
  .site-header { min-height: 70px; }
  .brand img { width: 50px; height: 50px; }
  .brand span { display: none; }
  .catalog-intro { align-items: start; flex-direction: column; gap: 17px; }
  main { padding-top: 30px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .product-info { padding: 13px; }
  .product-info h2 { font-size: .91rem; }
  .product-meta { display: block; }
  .variant-count { text-align: left; margin-top: 5px; }
  footer { grid-template-columns: auto 1fr; }
  footer p { grid-column: 1 / -1; text-align: left; margin: 0; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-image-wrap { position: relative; min-height: 330px; }
  .dialog-image-wrap img { height: 330px; }
  .dialog-content { padding: 27px 20px 24px; }
}

@media (max-width: 430px) {
  main { width: min(100% - 24px, 1380px); }
  .store-link { font-size: .86rem; }
  .catalog-controls { padding: 12px; border-radius: 17px; }
  .catalog-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .product-card { border-radius: 15px; }
  .product-info { padding: 11px; }
  .product-info h2 { font-size: .83rem; min-height: 3.9em; }
  .product-price { font-size: 1rem; }
  .variant-count { font-size: .7rem; }
  .view-product { font-size: .78rem; padding-inline: 8px; }
  .variant-list { grid-template-columns: 1fr; }
}

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