/* =========================================================
   New Devices page (Figma "Cashify Dubai-New Devices" 279:2352)
   ========================================================= */

/* ---------- Hero (279:2354) ---------- */
.page-new-devices .nd-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  /* Figma: 1000px frame minus 124px header → 876px at 1920 */
  min-height: clamp(560px, 45.625vw, 876px);
  padding-block: clamp(48px, 6vw, 120px);
  background: #e9eef1;
}
.page-new-devices .nd-hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.page-new-devices .nd-hero__bg img {
  width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 82%;
}
/* Radial haze overlay copied from the Figma fill (90% opacity) */
.page-new-devices .nd-hero__bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1920 1000' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='0.8999999761581421'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(12.65 65.95 -126.62 24.288 722.5 13.5)'><stop stop-color='rgba(189,215,229,0)' offset='0'/><stop stop-color='rgba(189,215,229,0.8)' offset='0.34134'/><stop stop-color='rgba(239,229,219,1)' offset='0.71303'/><stop stop-color='rgba(239,229,219,0)' offset='1'/></radialGradient></defs></svg>");
  background-size: 100% 100%;
}
.page-new-devices .nd-hero__inner { position: relative; }
.page-new-devices .nd-hero__content {
  width: min(600px, 100%);
  display: flex; flex-direction: column; align-items: flex-start; gap: clamp(24px, 3vw, 44px);
}
.page-new-devices .nd-hero__text { display: flex; flex-direction: column; gap: 8px; color: var(--neutral-950); }
.page-new-devices .nd-hero h1 { text-transform: capitalize; font-feature-settings: "lnum" 1, "pnum" 1; }

@media (max-width: 1100px) {
  .page-new-devices .nd-hero__content { width: min(480px, 100%); }
  .page-new-devices .nd-hero__bg img { object-position: 62% 82%; }
}
/* Tablet / mobile: copy on top, devices visible underneath */
@media (max-width: 900px) {
  .page-new-devices .nd-hero { align-items: flex-start; min-height: 680px; padding-top: 56px; padding-bottom: 300px; }
  .page-new-devices .nd-hero__bg img { object-position: 100% 100%; }
  /* soft wash behind the copy so it stays legible over the photo */
  .page-new-devices .nd-hero__bg::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(239,229,219,.8) 0%, rgba(239,229,219,.5) 36%, rgba(239,229,219,0) 56%);
  }
}
@media (max-width: 600px) {
  .page-new-devices .nd-hero { padding-top: 40px; }
  .page-new-devices .nd-hero__bg img { object-position: 72% 100%; }
}

/* ---------- Shared section bits ---------- */
.page-new-devices .nd-section { background: var(--neutral-0); }
.page-new-devices .nd-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.page-new-devices .nd-head h2,
.page-new-devices .nd-order__title { text-transform: capitalize; color: var(--neutral-950); }
.page-new-devices .nd-head p { color: var(--neutral-800); }

/* ---------- Categories (279:2375 / grid 283:2671) ---------- */
.page-new-devices .nd-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.page-new-devices .nd-cat {
  position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 305 / 334;
  background: #0b0b0b; isolation: isolate;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.page-new-devices .nd-cat > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; z-index: -1; }
.page-new-devices .nd-cat__body { padding: 24px; display: flex; flex-direction: column; gap: 2px; }
.page-new-devices .nd-cat h3 { color: var(--neutral-0); }
.page-new-devices .nd-cat p { color: var(--neutral-50); }

@media (max-width: 1100px) {
  .page-new-devices .nd-cat-grid { gap: 16px; }
}
@media (max-width: 767px) {
  .page-new-devices .nd-cat-grid { gap: 12px; }
  .page-new-devices .nd-cat { aspect-ratio: 163 / 236; }
  .page-new-devices .nd-cat > img { object-position: 50% 100%; }
  .page-new-devices .nd-cat__body { padding: 14px 12px; }
}

/* ---------- Specifications (279:2420 / div 279:2426) ---------- */
.page-new-devices .nd-spec-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.page-new-devices .nd-spec {
  background: var(--neutral-50); border-radius: 12px; padding: 16px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.page-new-devices .nd-spec__img { width: 100%; aspect-ratio: 192 / 128; border-radius: 6px; overflow: hidden; }
.page-new-devices .nd-spec__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.page-new-devices .nd-spec__img img.is-left { object-position: 0% 50%; }
.page-new-devices .nd-spec p { width: 100%; text-align: center; color: var(--neutral-950); }

@media (max-width: 1100px) {
  .page-new-devices .nd-spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .page-new-devices .nd-spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .page-new-devices .nd-spec { padding: 12px; gap: 12px; }
}

/* ---------- Place your order (283:2739 / div 283:2766) ---------- */
.page-new-devices .nd-order__title { margin-bottom: 24px; }
.page-new-devices .nd-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.page-new-devices .nd-step {
  position: relative; overflow: hidden; min-width: 0;
  background: var(--neutral-50); border-radius: 16px; padding: 40px 20px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.page-new-devices .nd-step__icon {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 12px; background: var(--neutral-1000);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease;
}
.page-new-devices .nd-step__icon img { flex: none; }
.page-new-devices .nd-step__num {
  position: absolute; top: -8px; right: 0;
  font-weight: 700; font-size: 80px; line-height: 80px; color: var(--neutral-0); text-align: right;
  pointer-events: none; user-select: none;
  transition: transform 600ms var(--ease-out);
}
.page-new-devices .nd-step p { position: relative; color: var(--neutral-800); width: 100%; }
.page-new-devices .nd-step:hover .nd-step__icon { transform: rotate(-6deg) scale(1.06); background: var(--primary); }
.page-new-devices .nd-step:hover .nd-step__num { transform: translateY(6px); }

@media (max-width: 1100px) {
  .page-new-devices .nd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .page-new-devices .nd-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .page-new-devices .nd-step { padding: 28px 20px; gap: 16px; }
  .page-new-devices .nd-step__num { font-size: 64px; line-height: 64px; top: -6px; }
}

/* ---------- Global shipping (510:2001) ---------- */
.page-new-devices .nd-ship {
  position: relative; overflow: hidden; background: #fefefe; /* matches artwork backdrop */
  padding-block: clamp(48px, 8.33vw, 160px);
  display: flex; align-items: center;
  min-height: clamp(0px, 24vw, 460px);
}
/* Desktop: the full-width artwork sits behind, vertically centred (Figma: w 100%, h 136.5%, top -18.3%) */
.page-new-devices .nd-ship__map { position: absolute; inset: 0; pointer-events: none; }
.page-new-devices .nd-ship__map img {
  position: absolute; left: 0; top: 50%; width: 100%; max-width: none; height: auto; transform: translateY(-50%);
}
.page-new-devices .nd-ship__inner { position: relative; }
.page-new-devices .nd-ship__content { width: min(600px, 46%); display: flex; flex-direction: column; gap: 12px; }
.page-new-devices .nd-ship h2 { text-transform: capitalize; color: var(--neutral-950); }
.page-new-devices .nd-ship p { color: var(--neutral-800); }

/* Tablet / mobile: stack — copy first, then a crop of the map region */
@media (max-width: 900px) {
  .page-new-devices .nd-ship { flex-direction: column; align-items: stretch; min-height: 0; gap: 24px; }
  .page-new-devices .nd-ship__inner { order: 1; }
  .page-new-devices .nd-ship__content { width: 100%; max-width: 600px; }
  .page-new-devices .nd-ship__map {
    order: 2; position: relative; inset: auto; overflow: hidden;
    width: calc(100% - var(--gutter) * 2); max-width: 640px; margin-inline: auto;
    aspect-ratio: 832 / 450;
  }
  /* crop box = image px x 1205→2037, y 170→620 (of 2400×785) */
  .page-new-devices .nd-ship__map img { width: 288.46%; left: -144.83%; top: -37.78%; transform: none; }
}
/* Category cards: swipe carousel on tablet/mobile */
.page-new-devices #nd-cats-row { --h-item: 62%; --h-item-md: 40%; }
@media (max-width: 1023px) { .page-new-devices #nd-cats-row > li { display: block; } .page-new-devices #nd-cats-row .nd-cat { width: 100%; height: auto; aspect-ratio: 163 / 236; } }
@media (min-width: 768px) and (max-width: 1023px) { .page-new-devices #nd-cats-row .nd-cat { aspect-ratio: 305 / 334; } }
