/* N-Style 2026 — Single product template */

.nsp-product-page {
  background: #f9f9f9;
}

#nsp-product{
  padding-top: 0px;
  padding-bottom: 10px;
}
.single-product #content{
    margin-top: 50px;
}

.nsp-product {
  --nsp-accent: #ff5733;
  --nsp-text: #222;
  --nsp-muted: #777;
  --nsp-panel: #ebeced;
  --nsp-bg: #f9f9f9;
  --nsp-radius: 10px;
  --nsp-gap: 24px;
  --nsp-section-gap: 56px;
  font-family: "Montserrat", sans-serif;
  color: var(--nsp-text);
  padding: 40px 0 80px;
}

/* ---------- Layout / no horizontal scroll ---------- */

/*
 * Theme `.site { overflow:hidden }` contains 100vw banner.
 * We need overflow:visible for sticky gallery — so neutralize 100vw
 * full-bleed hacks that cause left-right scroll.
 */
html:has(body.nsp-product-template),
body.nsp-product-template {
  width: 100% !important;
  max-width: 100% !important;
}

.nsp-product__gallery{
  position: sticky;
  top: 20px;
}

/* sticky works; horizontal scroll blocked via html/body + banner fix below */
body.nsp-product-template #page.site {
  overflow: visible !important;
  max-width: 100% !important;
}

/* 100vw = horizontal scrollbar — replace with 100% */
body.nsp-product-template .header-banner_top,
body.nsp-product-template .header_new_top {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  left: 0 !important;
  right: 0 !important;
}

body.nsp-product-template .site-content,
body.nsp-product-template #content,
body.nsp-product-template .site-main,
body.nsp-product-template .nsp-product-page,
body.nsp-product-template .nsp-product {
  max-width: 100% !important;
  box-sizing: border-box;
}

.nsp-product .container {
  width: 100%;
  max-width: 1268px;
  box-sizing: border-box;
}

.nsp-product__layout {
  display: flex;
  flex-direction: column;
  gap: var(--nsp-gap);
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.nsp-product__content,
.nsp-product__aside,
.nsp-product__main,
.nsp-product__header {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Mobile: unwrap so we can reorder header → gallery → main */
.nsp-product__content {
  display: contents;
}

.nsp-product__header {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.nsp-product__aside {
  order: 2;
  min-width: 0;
  width: 100%;
}

.nsp-product__main {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.nsp-product__main > .nsp-product__description,
.nsp-product__main > .nsp-product__tizers {
  margin-top: calc(var(--nsp-section-gap) - 12px);
}

/* ---------- Breadcrumbs / title ---------- */

.nsp-breadcrumb,
.nsp-product .woocommerce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  line-height: 24.8px;
  letter-spacing: 0.36px;
  color: var(--nsp-text);
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nsp-breadcrumb a,
.nsp-product .woocommerce-breadcrumb a {
  color: var(--nsp-text);
  text-decoration: none;
}

.nsp-breadcrumb a:hover,
.nsp-product .woocommerce-breadcrumb a:hover {
  color: var(--nsp-accent);
}

.nsp-product .woocommerce-breadcrumb .nsp-breadcrumb__sep {
  color: var(--nsp-text);
}

.nsp-product .woocommerce-breadcrumb > :last-child,
.nsp-product .woocommerce-breadcrumb .breadcrumb_last {
  color: var(--nsp-muted);
}

.nsp-product__title {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.84px;
  color: var(--nsp-text);
}

.nsp-product__category {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 16px;
  line-height: 24.8px;
  letter-spacing: 0.36px;
}

.nsp-product__category-label {
  color: var(--nsp-text);
}

.nsp-product__category-link {
  color: var(--nsp-accent);
  text-decoration: none;
}

.nsp-product__category-link:hover {
  text-decoration: underline;
}

.nsp-product__block-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: var(--nsp-text);
}

/* ---------- Attributes ---------- */

.nsp-product__attrs {
  background: var(--nsp-panel);
  border-radius: var(--nsp-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nsp-attrs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nsp-attrs__row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 24.8px;
  letter-spacing: 0.36px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.2);
}

.nsp-attrs__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.nsp-attrs__label {
  flex-shrink: 0;
  max-width: 45%;
  color: var(--nsp-muted);
  white-space: normal;
}

.nsp-attrs__value {
  flex: 1;
  min-width: 0;
  text-align: right;
  color: var(--nsp-text);
}

/* ---------- Buy block ---------- */

.nsp-product__buy {
  background: var(--nsp-panel);
  border-radius: var(--nsp-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nsp-product__buy-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 0;
  text-align: center;
}

.nsp-product__sku {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--nsp-bg);
  border-radius: var(--nsp-radius);
  padding: 4px 12px;
  font-size: 16px;
  line-height: 24.8px;
  letter-spacing: 0.36px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.nsp-product__sku-label {
  color: var(--nsp-muted);
}

.nsp-product__sku-value {
  color: var(--nsp-text);
}

.nsp-product__price {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.nsp-product__price-label {
  font-size: 16px;
  line-height: 24.8px;
  letter-spacing: 0.36px;
  color: var(--nsp-text);
  margin-bottom: 4px;
}

.nsp-product__price-value {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 24px;
  color: var(--nsp-text);
}

.nsp-product__price-amount {
  flex: 0 0 auto;
}

.nsp-product__price-currency {
  flex-shrink: 0;
  white-space: nowrap;
}

.nsp-product__buy-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.nsp-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 18px 16px;
  border-radius: var(--nsp-radius);
  font-family: Inter, "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  text-decoration: none !important;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nsp-btn__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  position: relative;
  z-index: 1;
}

.nsp-btn .button-text,
.nsp-btn .nsp-btn__text {
  position: relative;
  z-index: 1;
  display: inline;
  line-height: 22px;
}

/* Hide theme WooCommerce cart icon (::before) — we use our SVG */
.nsp-product .nsp-btn--order.single_add_to_cart_button:before,
.nsp-product .nsp-btn--order.single_add_to_cart_button:after,
.nsp-product .custom-add-to-cart-button.nsp-btn--order:before,
.nsp-product .custom-add-to-cart-button.nsp-btn--order:after,
.woo-extra .nsp-product .nsp-btn--order.single_add_to_cart_button:before,
.woo-extra .nsp-product .nsp-btn--order.single_add_to_cart_button:after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
}

.nsp-btn--order,
.nsp-product .custom-add-to-cart-button.nsp-btn--order,
.woo-extra.single-product .nsp-product .nsp-btn--order.single_add_to_cart_button {
  background: var(--nsp-accent) !important;
  color: #fff !important;
  border-color: var(--nsp-accent) !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  height: auto !important;
  min-height: 58px;
  margin: 0 !important;
  padding: 18px 24px !important;
}

.nsp-btn--order:hover,
.nsp-product .custom-add-to-cart-button.nsp-btn--order:hover {
  background: #e44a28 !important;
  color: #fff !important;
}

.nsp-btn--order .button-text {
  color: inherit !important;
  opacity: 1 !important;
  vertical-align: middle;
}

.nsp-btn--calc {
  background: var(--nsp-panel);
  color: var(--nsp-text);
  border-color: rgba(0, 0, 0, 0.2);
  min-height: 58px;
}

.nsp-btn--calc:hover {
  border-color: var(--nsp-accent);
  color: var(--nsp-accent);
}

/* ---------- Description ---------- */

.nsp-product__description {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nsp-product__description-content {
  font-size: 16px;
  line-height: 24.8px;
  letter-spacing: 0.36px;
  color: var(--nsp-text);
}

.nsp-product__description-content > *:first-child {
  margin-top: 0;
}

.nsp-product__description-content > *:last-child {
  margin-bottom: 0;
}

.nsp-product__description-content h2,
.nsp-product__description-content h3,
.nsp-product__description-content h4 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: var(--nsp-text);
}

.nsp-product__description-content p {
  margin: 0 0 12px;
}

.nsp-product__description-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nsp-product__description-content ul li {
  position: relative;
  padding-left: 24px;
}

.nsp-product__description-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--nsp-accent);
}

/* ---------- Tizers ---------- */

.nsp-product__tizers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nsp-tizers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.nsp-tizer {
  display: flex;
  align-items: stretch;
  background: var(--nsp-panel);
  border-radius: var(--nsp-radius);
  overflow: hidden;
  min-height: 100px;
}

.nsp-tizer__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nsp-accent);
  padding: 12px;
  min-width: 48px;
}

.nsp-tizer__icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.nsp-tizer__body {
  flex: 1;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nsp-tizer__title {
  margin: 0 0 auto;
  font-size: 16px;
  font-weight: 400;
  line-height: 24.8px;
  letter-spacing: 0.36px;
  color: var(--nsp-text);
}

.nsp-tizer__text {
  margin: 0;
  font-size: 14px;
  line-height: 24.8px;
  letter-spacing: 0.36px;
  color: rgba(0, 0, 0, 0.6);
}

/* ---------- Gallery ---------- */

.nsp-gallery {
  background: var(--nsp-panel);
  border-radius: var(--nsp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 355px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.nsp-gallery__main {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--nsp-panel);
}

.nsp-gallery__main-img,
.nsp-gallery__main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nsp-gallery__footer {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 12px;
  background: var(--nsp-panel);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.nsp-gallery__thumbs {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  height: 64px;
  scrollbar-width: none;
}

.nsp-gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.nsp-gallery__thumb {
  flex-shrink: 0;
  width: 66px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nsp-gallery__thumb.is-active,
.nsp-gallery__thumb:hover {
  opacity: 1;
}

.nsp-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

.nsp-gallery__fade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(235, 236, 237, 0), #ebeced);
}

.nsp-gallery__nav {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px;
  background: var(--nsp-bg);
  border-radius: 5px;
}

.nsp-gallery__nav-btn {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 5px;
  background: var(--nsp-panel);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.nsp-gallery__nav-btn:hover {
  background: #dddfe1;
}

.nsp-gallery__nav-btn img {
  width: 24px;
  height: 24px;
  display: block;
  transform: scaleY(-1);
}

.nsp-gallery__nav-btn--next img {
  transform: scaleY(-1) rotate(180deg);
}

/* ---------- Related ---------- */

.nsp-related {
  margin-top: var(--nsp-section-gap);
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}

.nsp-related__title {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: var(--nsp-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nsp-related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.nsp-related__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.nsp-related__thumb {
  background: var(--nsp-panel);
  border-radius: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nsp-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nsp-related__name {
  font-size: 14px;
  line-height: 1.4;
  color: var(--nsp-muted);
}

.nsp-related__price {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--nsp-text);
}

.nsp-gallery__main img{
  padding: 16px;
  border-radius: 24px;
  object-fit: cover;
}

/* ---------- Desktop ---------- */

@media (min-width: 992px) {

  .nsp-product {
    padding: 48px 0 100px;
  }

  .nsp-product__layout {
    flex-direction: row;
    align-items: stretch; /* aside = высота всего левого блока */
    gap: 24px;
  }

  .nsp-product__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    order: 0;
  }

  .nsp-product__header,
  .nsp-product__main {
    order: unset;
  }

  /* На всю высоту layout — внутри sticky gallery */
  .nsp-product__aside {
    order: unset;
    flex: 1 1 0;
    width: 0;
    min-height: 100%;
    align-self: stretch;
  }

  .nsp-product__title {
    font-size: 40px;
    line-height: 56px;
  }

  .nsp-product__main {
    gap: 12px;
  }

  .nsp-product__buy {
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
  }

  .nsp-product__buy-meta {
    flex: 1;
    min-width: 0;
  }

  .nsp-product__buy-actions {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  /* No price: buttons full width, stacked in 2 rows */
  .nsp-product__buy--actions-only {
    flex-direction: column;
  }

  .nsp-product__buy--actions-only .nsp-product__buy-actions {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  .nsp-gallery {
    position: sticky;
    top: 120px;
    height: 546px;
  }

  .nsp-tizers {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
  }

  .nsp-tizer {
    min-height: 210px;
  }

  .nsp-related__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}


@media (max-width: 992px) {
  .single-product #content{
    margin-top: 30px;
  }
  .nsp-breadcrumb, .nsp-product .woocommerce-breadcrumb{
    margin-bottom: 16px;
  }
  .nsp-product__title{
    margin-bottom: 16px;
  }
  .nsp-product__main > .nsp-product__tizers{
    margin-top: 24px;
  }
}