/*
Theme Name: Nina.Muse
Theme URI: https://nina.muse/
Author: Nina.Muse
Description: Минималистичная тема-каталог Nina.Muse без WooCommerce. Товары редактируются в админке WordPress, заказы оформляются через Telegram и MAX.
Version: 1.0.0
Text Domain: nina-muse
*/

:root {
  --nm-black: #111111;
  --nm-grey: #777777;
  --nm-line: #e6e6e6;
  --nm-soft: #f6f6f6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--nm-black);
  background: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.nm-wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.nm-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
}
.nm-header__inner { position: relative; padding: 22px 0; text-align: center; }
.nm-logo {
  display: inline-block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.nm-menu-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}
.nm-menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--nm-black); }
.nm-menu {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  width: 230px;
  border: 1px solid var(--nm-black);
  background: #fff;
  text-align: left;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.nm-menu.is-open { display: block; }
.nm-menu a { display: block; padding: 14px 18px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.nm-menu a:hover { background: var(--nm-soft); }
.nm-main { min-height: 55vh; }
.nm-section { margin: 48px 0 96px; }
.nm-section__title, .nm-eyebrow {
  margin: 0 0 28px;
  color: var(--nm-grey);
  font-size: 12px;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}
.nm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 24px; }
.nm-grid--pajamas .nm-product-card:first-child,
.nm-grid--pajamas .nm-product-card:nth-child(2),
.nm-grid--pajamas .nm-product-card:nth-child(3),
.nm-grid--pajamas .nm-product-card:nth-child(4) { grid-column: span 2; }
.nm-product-card__image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--nm-soft);
}
.nm-product-card__image img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.nm-product-card:hover .nm-product-card__image img { transform: scale(1.02); }
.nm-product-card__title { margin: 15px 0 3px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.nm-product-card__price { margin: 0; font-weight: 700; }
.nm-empty { padding: 32px; border: 1px solid var(--nm-line); color: var(--nm-grey); text-align: center; }
.nm-carousel { padding: 10px 0 70px; }
.nm-carousel__track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.nm-carousel__track::-webkit-scrollbar { display: none; }
.nm-carousel__item { flex: 0 0 160px; scroll-snap-align: start; }
.nm-carousel__item img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: var(--nm-soft); }
.nm-carousel__item p { margin: 8px 0 0; font-size: 10px; line-height: 1.35; text-transform: uppercase; }
.nm-carousel__item strong { display: block; margin-top: 4px; font-size: 12px; }
.nm-product-page { padding: 48px 0 100px; }
.nm-back { display: inline-block; margin-bottom: 48px; color: var(--nm-grey); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.nm-product-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 80px; }
.nm-product-main-image { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--nm-soft); cursor: zoom-in; }
.nm-product-main-image img { width: 100%; height: 100%; object-fit: contain; }
.nm-product-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.nm-product-thumb { padding: 0; border: 0; background: transparent; opacity: .5; cursor: pointer; }
.nm-product-thumb.is-active { opacity: 1; outline: 1px solid var(--nm-black); outline-offset: 3px; }
.nm-product-thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--nm-soft); }
.nm-product-info h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 48px); font-weight: 300; letter-spacing: .07em; line-height: 1.15; text-transform: uppercase; }
.nm-product-price { margin: 0 0 30px; font-size: 24px; font-weight: 700; }
.nm-actions { display: grid; gap: 10px; margin-bottom: 42px; }
.nm-button { display: block; padding: 15px 18px; border: 1px solid var(--nm-black); text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; transition: .2s; }
.nm-button:hover { color: #fff; background: var(--nm-black); }
.nm-content { color: var(--nm-grey); }
.nm-content p { margin: 0 0 18px; }
.nm-about { padding: 48px 0 100px; }
.nm-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.nm-about-image { overflow: hidden; background: var(--nm-soft); }
.nm-about-image img { width: 100%; height: auto; }
.nm-about-caption { margin: 12px 0 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.nm-about h1 { margin: 0 0 30px; font-size: clamp(34px, 5vw, 58px); font-weight: 300; letter-spacing: .08em; text-transform: uppercase; }
.nm-about h2 { margin: 0 0 24px; font-size: clamp(24px, 3vw, 36px); font-weight: 300; letter-spacing: .06em; text-transform: uppercase; }
.nm-about-production { max-width: 820px; margin-top: 80px; padding-top: 38px; border-top: 1px solid var(--nm-line); }
.nm-socials { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.nm-socials a { text-decoration: underline; text-underline-offset: 4px; }
.nm-footer { padding: 48px 0; color: var(--nm-grey); font-size: 11px; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.nm-footer__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin-bottom: 18px; }
.nm-floating { position: fixed; right: 22px; bottom: 22px; z-index: 15; display: grid; gap: 12px; }
.nm-floating a { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; color: #fff; background: var(--nm-black); font-size: 10px; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.nm-lightbox { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 24px; background: rgba(255,255,255,.96); }
.nm-lightbox.is-open { display: grid; }
.nm-lightbox img { max-width: 94vw; max-height: 92vh; object-fit: contain; }
.nm-lightbox button { position: absolute; top: 18px; right: 22px; border: 0; background: transparent; font-size: 34px; cursor: pointer; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 800px) {
  .nm-wrap { width: min(100% - 32px, 620px); }
  .nm-header__inner { padding: 18px 0; }
  .nm-logo { font-size: 24px; }
  .nm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px 14px; }
  .nm-grid--pajamas .nm-product-card:first-child,
  .nm-grid--pajamas .nm-product-card:nth-child(2),
  .nm-grid--pajamas .nm-product-card:nth-child(3),
  .nm-grid--pajamas .nm-product-card:nth-child(4) { grid-column: span 2; }
  .nm-section { margin: 40px 0 70px; }
  .nm-product-layout, .nm-about-grid { grid-template-columns: 1fr; gap: 42px; }
  .nm-product-page, .nm-about { padding-top: 32px; }
  .nm-back { margin-bottom: 32px; }
  .nm-about-production { margin-top: 56px; }
}
/* Убираем серые полосы по бокам фото */
.nm-product-card__image,
.nm-product-thumb img,
.nm-product-main-image,
.nm-carousel__item img,
.nm-about-image {
  background: #ffffff !important;
}
/* Галерея в карточке товара (свайп + мышь) */
.nm-product-card__image { position: relative; }
.nm-product-card__image .nm-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .15s ease;
}
.nm-product-card__image .nm-card-img.is-active { opacity: 1; }

/* Индикатор (полоски внизу) */
.nm-card-dots {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  z-index: 2;
}
.nm-card-dot {
  flex: 1;
  height: 2px;
  background: rgba(0,0,0,.15);
  transition: background .15s ease;
}
.nm-card-dot.is-active { background: #111; }