:root {
  --bg: #faf9f6;
  --surface: #f2f0eb;
  --ink: #1a1918;
  --muted: #6e6b66;
  --line: #e2dfd9;
  --sale: #8b1e24;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
header {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
}
.logo-wrap img {
  height: 32px;
  width: auto;
  display: block;
}
.nav-links {
  display: contents;
}
.nav-links a[href^="tel:"] {
  order: 3;
  width: 100%;
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.nav-links a:not([href^="tel:"]) {
  order: 2;
  text-decoration: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Hero (Mobile First) */
.hero {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sale);
  margin-bottom: 8px;
}
h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 10px;
}
.subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Manifesto swipe on mobile */
.manifesto {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 4px;
  border-top: 1px solid var(--line);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.manifesto::-webkit-scrollbar {
  display: none;
}
.manifesto-item {
  min-width: 230px;
  background: var(--surface);
  padding: 14px;
  border-radius: 6px;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.manifesto-item h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.manifesto-item p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* Filters */
.filters-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.catalog-search-input {
  grid-column: 1 / -1;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
  border-radius: 4px;
}
.catalog-search-input:focus {
  outline: none;
  border-color: var(--ink);
}
.gender-switch {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.g-btn {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.g-btn.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
select {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 10px;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
  border-radius: 4px;
}
.counter {
  grid-column: 1 / -1;
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Catalog Grid */
.catalog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 12px;
  padding-bottom: 48px;
}
.item {
  display: flex;
  flex-direction: column;
}
.item-photo {
  aspect-ratio: 3 / 4;
  background: var(--surface);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.item-photo span {
  font-size: 11px;
  color: var(--muted);
}
.item-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg);
  padding: 2px 6px;
}
.item-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.item-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}
.item-sizes {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.item-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.prices {
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.p-sale {
  font-size: 15px;
  font-weight: 600;
  color: var(--sale);
}
.p-old {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
}
.link-take {
  display: block;
  width: 100%;
  text-align: center;
  padding: 9px 0;
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 3px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 12px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Desktop */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
  header {
    padding: 16px 0;
  }
  .logo-wrap img {
    height: 42px;
  }
  .header-actions {
    gap: 20px;
  }
  .header-phone {
    display: inline-block;
  }
  .nav-links {
    display: none;
  }
  .nav-links a,
  .nav-links a[href^="tel:"],
  .nav-links a:not([href^="tel:"]) {
    order: initial;
    width: auto;
    font-size: 13px;
    text-transform: uppercase;
  }
  .hero {
    padding: 56px 0 44px;
  }
  .eyebrow {
    font-size: 11px;
    margin-bottom: 14px;
  }
  h1 {
    font-size: 54px;
    margin-bottom: 18px;
  }
  .subtitle {
    font-size: 16px;
    max-width: 640px;
    margin-bottom: 36px;
  }
  .manifesto {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    overflow: visible;
    padding-top: 28px;
  }
  .manifesto-item {
    min-width: auto;
    background: transparent;
    padding: 0;
  }
  .manifesto-item h3 {
    font-size: 20px;
    margin-bottom: 6px;
  }
  .manifesto-item p {
    font-size: 13.5px;
  }
  .filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 24px 0;
    margin-bottom: 36px;
  }
  .catalog-search-input {
    width: 260px;
    flex: 1 1 240px;
    max-width: 340px;
  }
  .gender-switch {
    border-bottom: none;
    padding-bottom: 0;
    gap: 16px;
    margin-right: 12px;
  }
  select {
    width: auto;
    min-width: 170px;
    background: transparent;
  }
  .counter {
    margin-left: auto;
    font-size: 12px;
  }
  .catalog {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 28px;
    padding-bottom: 72px;
  }
  .item-brand {
    font-size: 12px;
  }
  .item-name {
    font-size: 19px;
  }
  .item-sizes {
    font-size: 12px;
  }
  .item-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 10px;
  }
  .link-take {
    display: inline;
    width: auto;
    padding: 0 0 1px 0;
    background: transparent;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
  }
  .link-take:hover {
    color: var(--sale);
    border-color: var(--sale);
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    font-size: 13px;
  }
}
@media (min-width: 1024px) {
  .catalog {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* Выпадающее меню для смартфона и строка для десктопа */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E4F1F2;
    border: 1px solid #C2DCDE;
    color: var(--ink);
    padding: 8px 13px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.menu-toggle.active {
    background: #D4E8EA;
    border-color: #A8CDD0;
    color: var(--ink);
}

.nav-accent {
    color: var(--sale) !important;
}

@media (max-width: 767px) {
    .header-inner {
        position: relative;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: 220px;
        background: #E4F1F2;
        border: 1px solid #C2DCDE;
        border-radius: 6px;
        padding: 6px 14px;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 24px rgba(32, 78, 82, 0.12);
        z-index: 100;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a,
    .nav-links a[href^="tel:"],
    .nav-links a:not([href^="tel:"]) {
        order: initial;
        width: 100%;
        text-align: left;
        font-size: 13px;
        color: var(--ink);
        padding: 12px 2px;
        border-bottom: 1px solid #CBE1E3;
    }
    .nav-links a.nav-accent {
        color: var(--sale) !important;
    }
    .nav-links a:last-child {
        border-bottom: none;
    }
}

.header-inner {
    position: relative;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.header-phone {
    display: none;
    text-decoration: none;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.header-user-login {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.header-auth-link {
    text-decoration: none;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: inline-flex !important;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 24px;
        left: auto;
        width: 230px;
        background: #E4F1F2;
        border: 1px solid #C2DCDE;
        border-radius: 6px;
        padding: 6px 14px;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 24px rgba(32, 78, 82, 0.12);
        z-index: 100;
    }
    .nav-links.open {
        display: flex !important;
    }
    .nav-links a,
    .nav-links a:not([href^="tel:"]) {
        order: initial;
        width: 100%;
        text-align: left;
        font-size: 13px;
        color: var(--ink);
        padding: 12px 2px;
        border-bottom: 1px solid #CBE1E3;
    }
    .nav-links a.nav-accent {
        color: var(--sale) !important;
    }
    .nav-links a:last-child {
        border-bottom: none;
    }
}
/* Страница Приемка (/photo-intake) */
.intake-wrap {
    max-width: 540px;
    margin: 0 auto;
    padding: 20px 0 48px;
}

.session-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.session-meta {
    font-size: 12px;
    color: var(--muted);
}

.session-meta strong {
    color: var(--ink);
    font-size: 14px;
    display: block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: var(--ink);
}

.btn-sale {
    background: var(--sale);
    border-color: var(--sale);
    color: #fff;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 11px;
}

.btn-block {
    width: 100%;
}

.scan-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.scan-box label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 8px;
}

.scan-row {
    display: flex;
    gap: 8px;
}

.scan-input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: inherit;
}

.scan-input:focus {
    outline: none;
    border-color: var(--ink);
}

.alert {
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-error {
    background: #FDECEA;
    color: var(--sale);
    border: 1px solid #F5C2C7;
}

.alert-warn {
    background: #FFF8E6;
    color: #7A5200;
    border: 1px solid #FFE69C;
}

.alert-ok {
    background: #EAF6EE;
    color: #195E32;
    border: 1px solid #BADBCC;
}

.item-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    display: none;
}

.item-panel.show {
    display: block;
}

.status-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
}

.badge-lock {
    background: var(--sale);
    color: #fff;
}

.badge-ok {
    background: var(--surface);
    color: var(--ink);
}

.item-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 12px;
}

.attr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
    padding: 12px;
    background: var(--surface);
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}

.attr-grid span {
    color: var(--muted);
    font-size: 11px;
    display: block;
}

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.thumb-card {
    aspect-ratio: 3 / 4;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--line);
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-main {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--ink);
    color: #fff;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 2px;
    text-transform: uppercase;
}

.photo-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.complete-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
