/* lagomhome: внутренние страницы каталога (список, разделы, страница товара).
   Подключается после lagom.css. Страницы пишет tools/lagom_build.py. */

.nav-link[aria-current="page"] {
  color: #000;
}

/* ---------- хлебные крошки и кнопки разделов ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
}
.crumbs i {
  font-style: normal;
  color: #c4c3bd;
}
.crumbs a {
  transition: color 0.2s;
}
.crumbs a:hover {
  color: #000;
}
.crumbs [aria-current] {
  color: #1a1a1a;
}
.chips {
  display: flex;
  gap: 8px;
  padding: 0 1.25rem 1rem;
  overflow-x: auto;
}
.chips-sub {
  padding-top: 0;
}
.chips-sub .chip {
  border-color: transparent;
  background: var(--tile);
}
.chip {
  flex-shrink: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.chip:hover {
  color: #000;
  border-color: #000;
}
.chip[aria-current],
.chips-sub .chip[aria-current] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
@media (min-width: 640px) {
  .chips {
    flex-wrap: wrap;
    padding: 0 1.5rem 1rem;
  }
}
@media (min-width: 1024px) {
  .chips {
    padding: 0 2rem 1rem;
  }
}

/* ---------- сетка товаров ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.pcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.9rem 0.9rem 1rem;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pcard .tag-sm {
  margin-bottom: 0;
  font-size: 10px;
}
.tag-gap {
  height: 24px;
}
.pcard-img {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 0.6rem 0 0.9rem;
  overflow: hidden;
}
.pcard-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: scale 0.7s ease-out;
}
.pcard-img.is-photo img {
  object-fit: cover;
  mix-blend-mode: normal;
}
.pcard:hover .pcard-img img {
  scale: 1.05;
}
.pcard h3 {
  margin-top: auto;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pcard .piece-foot {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
@media (min-width: 640px) {
  .pgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pcard {
    padding: 1.25rem 1.25rem 1.35rem;
  }
  .pcard h3 {
    font-size: 12px;
    letter-spacing: 0.1em;
  }
  .pcard .piece-foot {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
}
@media (min-width: 1024px) {
  .pgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pcard {
    padding: 1.5rem;
  }
  .pcard-img {
    margin: 0.75rem 0.5rem 1.1rem;
  }
}

/* ---------- страница товара ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.gal {
  min-width: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.gal-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 78vh;
  width: 100%;
  background: #fff;
}
.gal-stage img {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  object-fit: contain;
}
.gal-stage.is-photo img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gal-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 1.25rem 16px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.gal-thumb {
  position: relative;
  flex: 0 0 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s;
}
.gal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gal-thumb:hover {
  border-color: #9ca3af;
}
.gal-thumb[aria-current] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.product-info {
  min-width: 0;
  padding: 1.75rem 1.25rem 2.5rem;
}
.price {
  margin-top: 1.4rem;
  font-size: 1.9rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.price small {
  display: block;
  margin-top: 0.4rem;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: #6b7280;
}
.fields {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
  max-width: 30rem;
}
.field span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
}
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 2.4rem 0.6rem 0.85rem;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #1a1a1a;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E")
    no-repeat right 0.75rem center / 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
}
.field select:hover {
  border-color: #a8a7a2;
}
.prose {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  max-width: 36rem;
}
.prose p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  color: #4b5563;
}
.prose p + p {
  margin-top: 0.9rem;
}
.specs {
  margin-top: 1.75rem;
  max-width: 36rem;
  border-top: 1px solid var(--line);
}
.specs div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
}
.specs dt {
  font-weight: 400;
  color: #6b7280;
}
.specs dd {
  font-weight: 400;
  color: #1a1a1a;
}
@media (max-width: 479px) {
  .specs div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }
}
@media (min-width: 640px) {
  .gal-thumbs {
    padding: 12px 1.5rem 16px;
  }
  .product-info {
    padding: 2rem 1.5rem 3rem;
  }
}
@media (min-width: 1024px) {
  .product {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .gal {
    position: sticky;
    top: 69px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .gal-stage {
    max-height: calc(100vh - 69px - 94px);
  }
  .product-info {
    padding: 2.5rem 3.5rem 4rem;
    min-height: calc(100vh - 69px);
  }
  .price {
    font-size: 2.25rem;
  }
}
