/* Оформление повторяет lacotton.ru: белый фон, коралловый акцент,
   кнопки-пилюли и крупные скруглённые плитки. */
:root {
  --ink: #14110f;
  --ink-soft: #6b6560;
  --line: #e7e4e1;
  --bg: #ffffff;
  --bg-soft: #f7f5f3;
  --accent: #ff5a45;
  --accent-dark: #e8432f;
  --radius: 16px;
  --radius-sm: 12px;
  --pill: 999px;
  --wrap: 1280px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

/* шапка */
.top {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.top-in { display: flex; align-items: center; gap: 18px; min-height: 70px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  font-weight: 800; letter-spacing: 0.04em; font-size: 15px; color: #fff;
  background: var(--accent); padding: 9px 14px; border-radius: var(--pill);
}
.brand-text { font-size: 11.5px; line-height: 1.3; color: var(--ink-soft); }
.nav { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; font-size: 14px; }
.nav a {
  color: var(--ink); white-space: nowrap; padding: 8px 14px;
  border-radius: var(--pill); font-weight: 500;
}
.nav a:hover { background: var(--bg-soft); }
.nav a.on { background: var(--ink); color: #fff; }
.cart-link {
  flex: 0 0 auto; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--pill);
}
.cart-link:hover { border-color: var(--ink); }
.cart-count {
  background: var(--accent); color: #fff; min-width: 22px; height: 22px; border-radius: var(--pill);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; padding: 0 6px;
}

/* главная */
.hero { padding: 24px 0 0; }
.hero-in {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0; align-items: stretch;
  background: var(--bg-soft); border-radius: 24px; overflow: hidden;
}
.hero-text { padding: 56px 48px; align-self: center; }
.hero h1 { font-size: clamp(30px, 4.2vw, 48px); }
.hero p { color: var(--ink-soft); font-size: 16px; max-width: 44ch; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 0;
  padding: 13px 26px; border-radius: var(--pill); font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 34px auto; }
.cat {
  background: var(--bg-soft); border-radius: var(--radius); padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.cat:hover { background: #f0ece9; }
.cat-name { font-weight: 600; font-size: 15px; }
.cat-n { color: var(--ink-soft); font-size: 13px; }

/* сетка товаров */
.block { margin: 48px auto; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.block-head h1 { font-size: clamp(26px, 3vw, 34px); }
.block-head h2 { font-size: 24px; }
.more { color: var(--accent); font-size: 14px; font-weight: 600; }
.more::after { content: " →"; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chips a {
  background: var(--bg-soft); border-radius: var(--pill); padding: 9px 18px;
  font-size: 14px; font-weight: 500;
}
.chips a:hover { background: #ece8e5; }
.chips a.on { background: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.card-img { background: var(--bg-soft); border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 12px 2px 0; }
.card-cat { font-size: 12px; color: var(--ink-soft); }
.card-name { font-size: 15px; margin: 4px 0 7px; font-weight: 500; }
.card-price { font-weight: 700; font-size: 16px; }

/* карточка товара */
.pdp { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; margin: 32px auto; align-items: start; }
.pdp-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pdp-gallery img { border-radius: var(--radius); background: var(--bg-soft); aspect-ratio: 3/4; object-fit: cover; }
.pdp-gallery img:first-of-type { grid-column: 1 / -1; aspect-ratio: 4/3; }
.pdp-info h1 { font-size: clamp(22px, 2.6vw, 30px); margin: 8px 0 14px; }
.pdp-price { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.pdp-desc { color: var(--ink-soft); }
.pdp-label { font-size: 13px; margin-bottom: 9px; font-weight: 500; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.size {
  border: 1px solid var(--line); background: #fff; border-radius: var(--pill);
  padding: 9px 16px; font: inherit; font-size: 14px; cursor: pointer; min-width: 50px;
}
.size:hover { border-color: var(--ink); }
.size.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.add { width: 100%; }
.pdp-note { margin-top: 10px; color: #0f7a45; font-size: 14px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 7px 20px; margin: 28px 0 0; font-size: 14px; }
.specs dt { color: var(--ink-soft); }
.specs dd { margin: 0; }

/* корзина */
.cart { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 36px; align-items: start; margin-top: 24px; }
.cart-items { display: grid; gap: 12px; }
.ci { display: grid; grid-template-columns: 82px 1fr auto; gap: 16px; align-items: center;
      background: var(--bg-soft); border-radius: var(--radius); padding: 12px; }
.ci img { width: 82px; height: 104px; object-fit: cover; border-radius: var(--radius-sm); background: #fff; }
.ci-name { font-size: 15px; font-weight: 500; }
.ci-size { font-size: 13px; color: var(--ink-soft); }
.ci-qty { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.ci-qty button { width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: var(--pill); cursor: pointer; font: inherit; }
.ci-price { font-weight: 700; white-space: nowrap; }
.ci-del { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font-size: 13px; padding: 4px 0; }

.cart-form { background: var(--bg-soft); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.cart-total { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.cart-form label { display: grid; gap: 5px; font-size: 13px; color: var(--ink-soft); }
.cart-form input, .cart-form textarea {
  font: inherit; font-size: 15px; color: var(--ink); padding: 11px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%; resize: vertical;
}
.cart-empty { grid-column: 1 / -1; }
.cart-done { grid-column: 1 / -1; background: var(--bg-soft); border-radius: var(--radius); padding: 28px; }

/* подвал */
.foot { background: var(--bg-soft); color: var(--ink-soft); margin-top: 64px; }
.foot-in { display: flex; justify-content: space-between; gap: 20px; padding: 32px 24px; font-size: 13.5px; flex-wrap: wrap; }
.foot-title { color: var(--ink); font-weight: 600; margin-bottom: 3px; }

/* живое превью надписи */
.mock { grid-column: 1 / -1; position: relative; }
.mock canvas { width: 100%; height: auto; display: block; border-radius: var(--radius); background: var(--bg-soft); }
.mock-hint {
  position: absolute; left: 14px; bottom: 14px; background: rgba(20, 17, 15, .72); color: #fff;
  font-size: 12px; padding: 6px 12px; border-radius: var(--pill); backdrop-filter: blur(3px);
}
.pdp-personal { margin-bottom: 20px; }
.personal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.personal-grid input:nth-child(3) { grid-column: 1 / -1; }
.personal-grid input {
  font: inherit; font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%;
}
.personal-grid input:focus { outline: none; border-color: var(--ink); }
.personal-grid input.need { border-color: var(--accent); background: #fff5f3; }

@media (max-width: 900px) {
  .hero-in, .pdp, .cart { grid-template-columns: 1fr; }
  .hero-text { padding: 32px 24px; }
  .hero-img { order: -1; }
  .hero-img img { min-height: 260px; }
  .top-in { min-height: auto; }
  .brand-text { display: none; }
}

/* полноэкранный редактор надписи */
.personal-open { width: 100%; margin-top: 4px; }
.editor {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 17, 15, .55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(4px);
}
.editor[hidden] { display: none; }
.editor-box {
  position: relative; background: #fff; border-radius: 24px; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0;
  width: min(1100px, 100%); max-height: 92vh;
}
.editor-view { background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.editor-view canvas { width: 100%; height: auto; display: block; }
.editor-side { padding: 32px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.editor-side h2 { font-size: 22px; }
.editor-field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.editor-field input {
  font: inherit; font-size: 17px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink);
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%;
}
.editor-field input:focus { outline: none; border-color: var(--ink); }
.editor-size .sizes { margin-bottom: 0; }
.editor-close {
  position: absolute; right: 14px; top: 10px; z-index: 2; width: 38px; height: 38px;
  border: 0; background: rgba(255, 255, 255, .9); border-radius: var(--pill);
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink);
}
.editor-close:hover { background: #fff; }

@media (max-width: 900px) {
  .editor { padding: 0; }
  .editor-box { grid-template-columns: 1fr; border-radius: 0; max-height: 100vh; height: 100%; overflow-y: auto; }
  .editor-side { padding: 20px; }
}
