/* Scoped homepage new-products section (np-*) — v2 pixel-close. */

.np-section,
.np-section * {
  box-sizing: border-box;
}

.np-section {
  --np-ink: #08153b;
  --np-accent: #f7931a;
  --np-accent-soft: #f7efe9;
  --np-money: #138b7b;
  --np-line: #e7ebf4;
  --np-shadow: 0 18px 40px rgba(36, 56, 99, 0.1);
  --np-u: clamp(0.68px, 0.048vw, 1px);
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 46%, #ffffff 0%, #fbfbfe 45%, #eff2fb 100%);
  padding: calc(42 * var(--np-u)) 0 calc(78 * var(--np-u));
  color: var(--np-ink);
  isolation: isolate;
  font-family: inherit;
}

.np-section::before,
.np-section::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  border-radius: 45%;
  background: linear-gradient(145deg, rgba(225, 232, 251, 0.85), rgba(255, 255, 255, 0));
  filter: blur(0.2px);
}

.np-section::before {
  width: 44%;
  height: 78%;
  left: -13%;
  top: -40%;
  transform: rotate(-28deg);
  border-bottom: 2px solid rgba(255, 255, 255, 0.65);
}

.np-section::after {
  width: 43%;
  height: 70%;
  right: -10%;
  bottom: -37%;
  transform: rotate(18deg);
  border-top: 2px solid rgba(255, 255, 255, 0.7);
}

.np-shell {
  width: min(1778px, max(1140px, 86.3vw));
  max-width: 1778px;
  margin-inline: auto;
  position: relative;
}

.np-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: calc(34 * var(--np-u));
}

.np-title-wrap {
  text-align: right;
  flex: none;
  padding-top: calc(8 * var(--np-u));
}

.np-title {
  margin: 0;
  font-size: calc(58 * var(--np-u));
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--np-ink);
}

.np-title-underline {
  display: block;
  width: calc(167 * var(--np-u));
  height: calc(6 * var(--np-u));
  margin-top: calc(12 * var(--np-u));
  margin-right: calc(11 * var(--np-u));
  border-radius: 999px;
  background: linear-gradient(90deg, #eadacc 0%, #f7931a 48%, #f1d9c6 100%);
}

.np-all-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(16 * var(--np-u));
  min-width: calc(299 * var(--np-u));
  min-height: calc(72 * var(--np-u));
  padding: 0 calc(34 * var(--np-u));
  border-radius: 999px;
  text-decoration: none !important;
  color: var(--np-ink) !important;
  font-size: calc(29 * var(--np-u));
  font-weight: 850;
  background: linear-gradient(90deg, #f7efe9, #f2f2f8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(44, 54, 92, 0.08);
}

.np-all-btn svg {
  width: calc(34 * var(--np-u));
  height: calc(34 * var(--np-u));
  fill: none;
  stroke: var(--np-accent);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.np-products-wrap {
  position: relative;
}

.np-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(18 * var(--np-u));
}

.np-card {
  --np-tint: #eaf0fb;
  min-width: 0;
  border-radius: calc(38 * var(--np-u));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 251, 255, 0.98));
  box-shadow: var(--np-shadow);
  border: 1px solid rgba(228, 233, 244, 0.9);
  overflow: hidden;
  height: 100%;
}

.np-card.np-tint-1 {
  --np-tint: #eaf0fb;
}

.np-card.np-tint-2 {
  --np-tint: #f3e9fa;
}

.np-card.np-tint-3 {
  --np-tint: #fbeaf4;
}

.np-card.np-tint-4 {
  --np-tint: #faf0df;
}

.np-card-link {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
  height: 100%;
}

/* Independent media plane: CSS glow + plain product photo (no baked-in UI). */
.np-card-media {
  position: relative;
  aspect-ratio: 1 / 1.03;
  padding: 23% 6% 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 46%, var(--np-tint) 0 65%, transparent 66%);
}

.np-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Independent «جدید» badge — HTML only, never inside the image file. */
.np-badge {
  position: absolute;
  z-index: 1;
  top: 8%;
  right: 8%;
  padding: 0.3em 1em;
  background: linear-gradient(180deg, #fff, #f7f8fc);
  border-radius: 999px;
  box-shadow: 0 7px 15px rgba(35, 48, 87, 0.094);
  color: var(--np-ink);
  font-size: clamp(14px, 1.4vw, 23px);
  font-weight: 850;
  line-height: 1.5;
  pointer-events: none;
}

.np-card-body {
  padding: calc(28 * var(--np-u)) calc(24 * var(--np-u)) calc(32 * var(--np-u));
  text-align: center;
  background: #fff;
}

.np-product-name {
  margin: 0 0 calc(30 * var(--np-u));
  font-size: calc(26 * var(--np-u));
  line-height: 1.65;
  font-weight: 850;
  letter-spacing: -0.01em;
  min-height: calc(84 * var(--np-u));
  color: var(--np-ink);
}

.np-price {
  margin: 0;
  font-size: calc(24 * var(--np-u));
  line-height: 1.4;
  font-weight: 900;
  color: var(--np-money);
}

.np-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: calc(76 * var(--np-u));
  height: calc(76 * var(--np-u));
  border: none;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #f7f8fc);
  box-shadow: 0 10px 25px rgba(33, 46, 84, 0.12);
  color: var(--np-ink);
  cursor: pointer;
  padding: 0;
}

.np-nav svg {
  width: calc(27 * var(--np-u));
  height: calc(27 * var(--np-u));
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.np-nav-next {
  right: calc(-39 * var(--np-u));
}

.np-nav-prev {
  left: calc(-39 * var(--np-u));
}

.np-card,
.np-all-btn,
.np-nav {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.np-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 42px rgba(36, 56, 99, 0.14);
}

.np-all-btn:hover,
.np-nav:hover {
  transform: translateY(-2px);
}

.np-nav:hover {
  transform: translateY(calc(-50% - 2px));
}

.np-card-link:focus-visible,
.np-all-btn:focus-visible,
.np-nav:focus-visible {
  outline: 3px solid var(--np-accent);
  outline-offset: 3px;
}

/* Slick mount (desktop) */
.np-grid.slick-initialized {
  display: block;
}

.np-grid.slick-initialized .slick-list {
  margin: 0 calc(-9 * var(--np-u));
}

.np-grid.slick-initialized .slick-slide {
  padding: 0 calc(9 * var(--np-u));
  height: auto;
}

.np-grid.slick-initialized .slick-track {
  display: flex !important;
  align-items: stretch;
}

.np-grid.slick-initialized .slick-slide > .np-card,
.np-grid.slick-initialized .slick-slide > div > .np-card {
  height: 100%;
}

.np-grid.slick-initialized .slick-arrow {
  display: none !important;
}

@media (max-width: 1199.98px) {
  .np-section {
    --np-u: 0.82px;
  }

  .np-shell {
    width: min(1778px, 92vw);
  }

  .np-title {
    font-size: 44px;
  }

  .np-all-btn {
    min-width: 235px;
    font-size: 22px;
  }

  .np-grid:not(.slick-initialized) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .np-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .np-section {
    --np-u: 0.72px;
    padding: 26px 0 42px;
  }

  .np-shell {
    width: min(100% - 24px, 92vw);
  }

  .np-topbar {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 18px;
  }

  .np-title-wrap {
    order: 1;
  }

  .np-all-btn {
    order: 2;
    align-self: flex-start;
    min-height: 54px;
    min-width: 180px;
    padding: 0 18px;
    font-size: 18px;
  }

  .np-title {
    font-size: 33px;
  }

  .np-title-underline {
    width: 104px;
    height: 4px;
    margin-top: 8px;
  }

  .np-products-wrap {
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .np-grid:not(.slick-initialized) {
    display: flex;
    gap: 14px;
    min-width: max-content;
    padding-inline: 4px;
  }

  .np-card {
    width: min(80vw, 320px);
    flex: 0 0 auto;
    scroll-snap-align: start;
    border-radius: 26px;
  }

  .np-card-body {
    padding: 18px 16px 24px;
  }

  .np-product-name {
    font-size: 19px;
    min-height: auto;
    margin-bottom: 16px;
  }

  .np-price {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .np-card,
  .np-all-btn,
  .np-nav {
    transition: none;
  }

  .np-card:hover,
  .np-all-btn:hover,
  .np-nav:hover {
    transform: none;
  }

  .np-nav:hover {
    transform: translateY(-50%);
  }
}
