:root {
  --ink: #080301;
  --hide: #2b0f05;
  --hide-soft: #5b2610;
  --cognac: #a95324;
  --cognac-light: #d08343;
  --brass: #c99b4b;
  --cream: #fff0d8;
  --sand: #d9bd8e;
  --muted: #a7835e;
  --thread: rgba(255, 219, 154, 0.50);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  --max: 1160px;
  --ui-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
  --display-font: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--ui-font);
  font-weight: 500;
  background:
    url("assets/textures/crumpled-leather.svg"),
    radial-gradient(circle at 18% 0%, rgba(210, 117, 54, 0.22), transparent 28rem),
    linear-gradient(145deg, #050201, #160704 52%, #260d04);
  background-size: 760px 760px, auto, auto;
  background-blend-mode: soft-light, normal, normal;
}

.leather-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(88deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(3deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 10px);
  opacity: 0.42;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.leather-plate,
.leather-sheet,
.product-card,
.photo-card,
.leather-piece,
.admin-login,
.admin-form {
  position: relative;
  border: 1px solid rgba(255, 224, 170, 0.18);
  background:
    url("assets/textures/crumpled-leather.svg"),
    radial-gradient(circle at 18% 10%, rgba(255, 226, 168, 0.13), transparent 12rem),
    radial-gradient(circle at 88% 90%, rgba(0,0,0,0.30), transparent 15rem),
    linear-gradient(145deg, rgba(107, 43, 16, 0.97), rgba(27, 9, 3, 0.98));
  background-size: cover, auto, auto, auto;
  background-repeat: no-repeat;
  background-blend-mode: soft-light, normal, normal, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 190, 0.12),
    inset 0 -28px 55px rgba(0, 0, 0, 0.22),
    var(--shadow);
}

.leather-plate::after,
.leather-sheet::after,
.product-card::after,
.photo-card::after,
.leather-piece::after,
.admin-login::after,
.admin-form::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--thread);
  border-radius: inherit;
  pointer-events: none;
}

.site-head,
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px 15px 9px 9px;
  border-radius: 22px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 760;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--sand);
  font-size: 0.78rem;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.28), transparent 1.1rem),
    linear-gradient(145deg, #c17135, #351205);
  box-shadow: inset 0 0 0 2px rgba(201, 155, 75, 0.28), 0 9px 22px rgba(0,0,0,0.34);
}

.head-links,
.strap-nav {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-radius: 999px;
}

.head-links a,
.strap-nav a {
  position: relative;
  z-index: 1;
  min-width: 86px;
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--sand);
  text-align: center;
  text-decoration: none;
  font-weight: 850;
}

.head-links a:hover,
.strap-nav a:hover {
  color: var(--cream);
  background: rgba(255, 238, 208, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(340px, 0.78fr);
  gap: 26px;
  align-items: stretch;
  padding: 42px 0 68px;
}

.hero-copy {
  min-width: 0;
  padding: clamp(26px, 5vw, 56px);
  border-radius: 40px;
}

.eyebrow {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 8px 13px;
  border: 1px solid rgba(201, 155, 75, 0.34);
  border-radius: 999px;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-family: var(--display-font);
  font-size: clamp(2.35rem, 5.8vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 700;
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  margin-bottom: 12px;
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.32rem;
  letter-spacing: -0.025em;
  font-weight: 760;
}

p {
  color: var(--sand);
  font-size: 1.02rem;
  line-height: 1.6;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  font-size: clamp(1.04rem, 1.7vw, 1.24rem);
}

.price-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}

.price-row a {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(255, 225, 170, 0.16);
  border-radius: 22px;
  color: var(--cream);
  background: rgba(27, 9, 3, 0.42);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 225, 170, 0.05);
}

.price-row span,
.price-row strong {
  display: block;
}

.price-row span {
  color: var(--sand);
  font-size: 0.82rem;
  font-weight: 760;
}

.price-row strong {
  margin-top: 7px;
  font-size: 1.25rem;
}

.hero-actions,
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.leather-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 21px;
  border: 0;
  border-radius: 999px;
  color: var(--cream);
  background:
    url("assets/textures/crumpled-leather.svg"),
    linear-gradient(145deg, #7f3212, #341006);
  background-size: cover, auto;
  background-repeat: no-repeat;
  background-blend-mode: soft-light, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 229, 180, 0.12),
    inset 0 -18px 28px rgba(0,0,0,0.22),
    0 15px 34px rgba(0,0,0,0.32);
  text-decoration: none;
  font-weight: 760;
  cursor: pointer;
}

.leather-button.primary {
  color: #2b1205;
  background:
    radial-gradient(circle at 22% 22%, rgba(255,255,255,0.30), transparent 2rem),
    linear-gradient(145deg, #f2c66b, #bd7330 56%, #704019);
}

.leather-button.small {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.hero-gallery {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  min-width: 0;
}

.photo-card {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border-radius: 30px;
}

.photo-card.large {
  grid-row: 1 / 3;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: 22px;
  filter: saturate(1.08) contrast(1.04) brightness(0.95);
}

.hero-gallery .photo-card img {
  object-fit: contain;
  background:
    radial-gradient(circle at 42% 28%, rgba(255, 231, 180, 0.08), transparent 16rem),
    linear-gradient(145deg, #160705, #030101);
}

.zoomable-photo {
  cursor: zoom-in;
}

body.modal-open {
  overflow: hidden;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 22%, rgba(180, 92, 34, 0.22), transparent 34rem),
    rgba(3, 1, 0, 0.88);
  backdrop-filter: blur(14px);
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox img {
  max-width: min(1120px, 94vw);
  max-height: 86vh;
  border: 12px solid rgba(74, 25, 8, 0.92);
  border-radius: 28px;
  object-fit: contain;
  background: #080301;
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 160, 0.14),
    0 34px 90px rgba(0, 0, 0, 0.72);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 225, 170, 0.22);
  border-radius: 999px;
  color: var(--cream);
  background: linear-gradient(145deg, rgba(97, 35, 12, 0.98), rgba(22, 7, 2, 0.98));
  box-shadow: 0 16px 38px rgba(0,0,0,0.34);
  cursor: pointer;
}

.catalog,
.photo-note,
.order {
  padding: 56px 0;
}

.section-title {
  max-width: 760px;
  margin-bottom: 24px;
}

.leather-stamp {
  padding: 24px;
  border-radius: 30px;
}

.catalog-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 28px;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--brass);
  font-size: 0.88rem;
  font-weight: 900;
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 225, 170, 0.18);
  border-radius: 16px;
  color: var(--cream);
  background: linear-gradient(145deg, rgba(35, 13, 5, 0.94), rgba(9, 3, 1, 0.88));
  padding: 13px 14px;
  outline: none;
}

textarea {
  resize: vertical;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border-radius: 32px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 220ms ease;
}

.product-card:nth-child(3n + 1) { --tilt: -0.45deg; }
.product-card:nth-child(3n + 2) { --tilt: 0.35deg; }
.product-card:nth-child(3n + 3) { --tilt: -0.16deg; }
.product-card:hover { transform: translateY(-4px) rotate(var(--tilt, 0deg)); }

.product-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  filter: saturate(1.08) contrast(1.04) brightness(0.96);
}

.product-body {
  position: relative;
  z-index: 1;
  padding: 18px 14px 12px;
}

.badges,
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badges span,
.product-meta span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--sand);
  background: rgba(20, 7, 3, 0.46);
  font-size: 0.76rem;
  font-weight: 850;
}

.product-card strong {
  display: block;
  margin: 12px 0;
  color: var(--cream);
  font-size: 1.42rem;
}

.selection-bar {
  position: sticky;
  bottom: 92px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 24px;
}

.selection-bar[hidden],
.result[hidden] {
  display: none;
}

.custom-blocks {
  display: grid;
  gap: 18px;
  padding: 10px 0 0;
}

.custom-blocks:empty {
  display: none;
}

.custom-card {
  padding: clamp(22px, 4vw, 38px);
  border-radius: 34px;
}

.custom-card .leather-button {
  margin-top: 8px;
}

.photo-note {
  padding-top: 0;
}

.photo-note-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 26px;
}

.photo-note-card span {
  color: var(--cream);
  font-weight: 950;
}

.photo-note-card p {
  margin: 0;
}

.order-card {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.18fr);
  gap: 24px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 38px;
}

.order-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide {
  grid-column: 1 / -1;
}

.calc-note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--sand);
  background: rgba(14, 5, 2, 0.44);
}

.result {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 26px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 44px 0 112px;
  color: var(--sand);
}

.footer span {
  color: var(--cream);
  font-weight: 950;
}

.mobile-cta {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 45;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 26px;
}

.mobile-cta a {
  position: relative;
  z-index: 1;
  padding: 14px 10px;
  border-radius: 20px;
  background: rgba(52, 19, 7, 0.76);
  color: var(--cream);
  text-align: center;
  text-decoration: none;
  font-weight: 950;
}

.admin {
  padding: 68px 0;
}

.admin-login {
  max-width: 760px;
  margin: 52px auto 0;
  padding: 34px;
  border-radius: 34px;
}

.admin-panel {
  padding-top: 46px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
  border-radius: 32px;
}

.admin-form + .admin-form {
  margin-top: 22px;
}

.admin-login .admin-form {
  grid-template-columns: 1fr;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.admin-login .admin-form::after {
  display: none;
}

.admin-form .full {
  grid-column: 1 / -1;
}

.admin-form .checkline {
  grid-template-columns: auto 1fr;
  align-content: center;
}

.admin-form .checkline input {
  width: auto;
}

.admin-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .hero,
  .order-card {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: 92px;
  }

  .shell,
  .site-head,
  .topbar {
    width: calc(100vw - 24px);
    max-width: var(--max);
    margin-left: 12px;
    margin-right: 12px;
  }

  .site-head,
  .topbar {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: hidden;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }

  .brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .head-links,
  .strap-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .head-links a,
  .strap-nav a {
    min-width: 0;
    padding: 11px 4px;
    font-size: 0.82rem;
  }

  .hero {
    padding: 26px 0 42px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-copy,
  .order-card {
    padding: 20px;
    border-radius: 30px;
  }

  h1 {
    font-size: clamp(1.92rem, 8vw, 2.38rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  h2 {
    font-size: 2.25rem;
  }

  p {
    overflow-wrap: anywhere;
  }

  .hero-copy > p:not(.eyebrow) {
    max-width: 100%;
  }

  .price-row a,
  .product-card,
  .photo-card,
  .catalog-filters,
  .selection-bar,
  .result,
  .order-form {
    max-width: 100%;
  }

  .price-row,
  .catalog-filters,
  .catalog-grid,
  .order-form,
  .admin-form,
  .admin-products {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .product-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .leather-button {
    width: 100%;
  }

  .hero-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .photo-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .photo-card.large {
    flex-basis: 92%;
  }

  .photo-card.large {
    grid-row: auto;
  }

  .photo-card img {
    height: 300px;
    min-height: 0;
  }

  .hero-gallery .photo-card img {
    object-fit: contain;
    background:
      radial-gradient(circle at 42% 28%, rgba(255, 231, 180, 0.08), transparent 16rem),
      linear-gradient(145deg, #160705, #030101);
  }

  .catalog,
  .photo-note,
  .order {
    padding: 40px 0;
  }

  .photo-note-card {
    grid-template-columns: 1fr;
  }

  .selection-bar {
    bottom: 88px;
  }

  .mobile-cta {
    display: grid;
    max-width: calc(100vw - 28px);
  }
}

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