*{box-sizing:border-box} :root{--bg:#f5f5f3;--card:#fff;--ink:#111;--muted:#747474;--line:#e6e6e2;--radius:22px}
html{scroll-behavior:smooth} body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.topbar{position:sticky;top:0;z-index:20;height:72px;padding:0 clamp(20px,5vw,64px);display:flex;align-items:center;justify-content:space-between;background:rgba(245,245,243,.9);backdrop-filter:blur(18px);border-bottom:1px solid rgba(0,0,0,.05)}
.brand{font-size:20px;font-weight:800;letter-spacing:.22em}.topbar__right{font-size:13px;color:var(--muted)}
.wrap{width:min(1280px,calc(100% - 32px));margin:0 auto}.hero{padding:72px 0 38px}.eyebrow{font-size:12px;font-weight:700;letter-spacing:.18em;color:#7c7c77;margin:0 0 14px}
.hero h1{font-size:clamp(42px,8vw,88px);line-height:.95;letter-spacing:-.055em;margin:0;max-width:900px}.hero__text{font-size:clamp(16px,2vw,20px);line-height:1.6;color:var(--muted);max-width:620px;margin:24px 0 0}
.controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:30px}.search{flex:1;min-width:250px;height:52px;display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:0 18px}
.search svg{width:19px;height:19px;fill:none;stroke:#888;stroke-width:1.8}.search input{width:100%;border:0;outline:0;background:transparent;font:inherit;font-size:14px}
.filters{display:flex;gap:8px;overflow:auto;padding:2px}.filter-btn{border:1px solid var(--line);background:#fff;border-radius:999px;padding:12px 16px;font:inherit;font-size:13px;white-space:nowrap;cursor:pointer}
.filter-btn.active{background:#111;color:#fff;border-color:#111}.catalog{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding-bottom:70px}
.card{background:var(--card);border-radius:var(--radius);overflow:hidden;border:1px solid rgba(0,0,0,.045);cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}
.card:hover{transform:translateY(-3px);box-shadow:0 18px 45px rgba(0,0,0,.07)}.card__image{aspect-ratio:1/1;background:#f0f0ee;display:flex;align-items:center;justify-content:center;overflow:hidden}
.card__image img{width:100%;height:100%;object-fit:cover}.placeholder{font-size:12px;color:#999;letter-spacing:.08em}.card__body{padding:18px 18px 20px}.card__category{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:#999;margin-bottom:8px}
.card__title{font-weight:650;font-size:18px;line-height:1.3;margin:0 0 12px}.card__meta{font-size:13px;color:var(--muted);line-height:1.5;min-height:40px}.card__footer{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-top:18px}
.price{font-weight:750;font-size:22px;letter-spacing:-.03em}.status{font-size:11px;border:1px solid var(--line);padding:6px 9px;border-radius:999px;color:#666}
.empty{padding:70px 0 120px;text-align:center}.hidden{display:none!important}footer{border-top:1px solid var(--line);padding:26px clamp(20px,5vw,64px) 44px;display:flex;justify-content:space-between;gap:20px;font-size:13px}.muted{color:var(--muted)}
.modal{width:min(900px,calc(100% - 24px));border:0;border-radius:26px;padding:0;background:#fff;box-shadow:0 30px 100px rgba(0,0,0,.25)}.modal::backdrop{background:rgba(0,0,0,.56);backdrop-filter:blur(6px)}
.modal__close{position:absolute;right:14px;top:14px;width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.92);font-size:28px;line-height:1;cursor:pointer;z-index:3}
.modal-grid{display:grid;grid-template-columns:1.1fr .9fr}.modal-gallery{background:#f3f3f1;min-height:500px;display:flex;align-items:center;justify-content:center;overflow:hidden}.modal-gallery img{width:100%;height:100%;object-fit:cover}.modal-info{padding:54px 38px}.modal-info h2{font-size:34px;letter-spacing:-.04em;line-height:1.05;margin:10px 0 16px}.modal-info .price{font-size:30px;margin:26px 0}.modal-desc{color:var(--muted);line-height:1.65}.specs{margin:26px 0 0;padding:0;list-style:none;border-top:1px solid var(--line)}.specs li{display:flex;justify-content:space-between;gap:18px;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px}.specs span:first-child{color:var(--muted)}
@media(max-width:900px){.catalog{grid-template-columns:repeat(2,minmax(0,1fr))}.modal-grid{grid-template-columns:1fr}.modal-gallery{min-height:360px}.modal-info{padding:30px 24px 34px}}
@media(max-width:580px){.topbar{height:62px}.wrap{width:min(100% - 20px,1280px)}.hero{padding:46px 4px 28px}.hero h1{font-size:46px}.catalog{grid-template-columns:1fr;gap:12px}.card{border-radius:18px}.card__body{padding:16px}.card__image{aspect-ratio:1.2/1}.controls{position:sticky;top:72px;z-index:10;background:var(--bg);padding:10px 0 12px;margin-bottom:12px}.filters{width:100%}footer{flex-direction:column}.modal{border-radius:22px}.modal-gallery{min-height:300px}.modal-info h2{font-size:28px}}


/* ===== Mobile-first polish ===== */
html{
  -webkit-text-size-adjust:100%;
}
body{
  overflow-x:hidden;
}
button,input{
  -webkit-tap-highlight-color:transparent;
}
.card,
.filter-btn,
.search,
.modal__close{
  touch-action:manipulation;
}

/* Телефон: интерфейс проектируется прежде всего под него */
@media(max-width:580px){
  .topbar{
    height:58px;
    padding:0 14px;
  }

  .brand{
    font-size:18px;
    letter-spacing:.18em;
  }

  .wrap{
    width:calc(100% - 16px);
  }

  .hero{
    padding:34px 2px 22px;
  }

  .eyebrow{
    font-size:10px;
    margin-bottom:10px;
  }

  .hero h1{
    font-size:40px;
    line-height:.98;
  }

  .hero__text{
    font-size:15px;
    line-height:1.5;
    margin-top:14px;
  }

  .controls{
    top:58px;
    padding:8px 0 10px;
    gap:8px;
  }

  .search{
    min-width:100%;
    height:48px;
    padding:0 15px;
    border-radius:16px;
  }

  .search input{
    font-size:16px; /* не даёт iPhone автоматически зумить поле */
  }

  .filters{
    width:100%;
    gap:7px;
    padding:0;
  }

  .filter-btn{
    flex:1;
    min-height:44px;
    padding:10px 12px;
    border-radius:14px;
    text-align:center;
  }

  .catalog{
    grid-template-columns:1fr;
    gap:10px;
    padding-bottom:40px;
  }

  .card{
    border-radius:18px;
  }

  .card:hover{
    transform:none;
    box-shadow:none;
  }

  .card__image{
    aspect-ratio:1.08 / 1;
  }

  .card__image img{
    object-fit:contain;
    background:#f3f3f1;
    padding:10px;
  }

  .card__body{
    padding:14px 14px 16px;
  }

  .card__category{
    font-size:10px;
    margin-bottom:6px;
  }

  .card__title{
    font-size:19px;
    margin-bottom:8px;
  }

  .card__meta{
    font-size:13px;
    min-height:auto;
  }

  .card__footer{
    margin-top:14px;
    align-items:center;
  }

  .price{
    font-size:23px;
  }

  .status{
    font-size:10px;
    padding:6px 8px;
  }

  footer{
    padding:22px 14px 34px;
    font-size:12px;
  }

  .modal{
    width:100%;
    max-width:none;
    height:100dvh;
    max-height:100dvh;
    margin:0;
    border-radius:0;
  }

  .modal-grid{
    min-height:100%;
    display:block;
  }

  .modal-gallery{
    min-height:42dvh;
    height:42dvh;
  }

  .modal-gallery img{
    object-fit:contain;
    background:#f3f3f1;
    padding:14px;
  }

  .modal-info{
    padding:22px 18px 34px;
  }

  .modal-info h2{
    font-size:27px;
    line-height:1.08;
    margin:8px 0 12px;
  }

  .modal-info .price{
    font-size:28px;
    margin:18px 0;
  }

  .modal__close{
    position:fixed;
    top:max(10px, env(safe-area-inset-top));
    right:10px;
    width:42px;
    height:42px;
  }

  .specs li{
    font-size:12px;
  }
}

/* Небольшие планшеты */
@media(min-width:581px) and (max-width:900px){
  .catalog{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .card__image img{
    object-fit:contain;
    background:#f3f3f1;
    padding:12px;
  }
}
