/* ==========================================================================
   NGUYEN TU FASHION — 3D INTERACTIVE CLOTHING RACK (ATELIER SHOWROOM 2026)
   Photorealistic Walnut/Chrome Hangers, True 2-Sided Front/Back 3D Garments
   ========================================================================== */

.nt-rack-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 58% 50% at 50% 44%, rgba(255, 51, 75, 0.18) 0%, rgba(110, 10, 28, 0.22) 48%, rgba(12, 2, 5, 0.99) 100%),
    linear-gradient(180deg, #160206 0%, #0b0103 52%, #160206 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 51, 75, 0.24);
  padding: 38px 0 0;
  user-select: none;
  -webkit-user-select: none;
}

/* Volumetric Top Studio Spotlight */
.nt-rack-spotlight {
  position: absolute;
  top: -110px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 560px;
  background:
    conic-gradient(from 165deg at 50% 0%, transparent 0deg, rgba(255, 240, 225, 0.07) 15deg, transparent 30deg),
    radial-gradient(circle, rgba(255, 235, 220, 0.14) 0%, rgba(255, 51, 75, 0.08) 44%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Studio Floor Shadow / Pedestal Glow */
.nt-rack-floor-glow {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 90px;
  background: radial-gradient(ellipse at center, rgba(255, 51, 75, 0.22) 0%, rgba(251, 191, 36, 0.07) 45%, transparent 75%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 1;
}

/* Header & Category Filter Pills */
.nt-rack-header {
  position: relative;
  z-index: 10;
  max-width: var(--container-width, 1320px);
  margin: 0 auto 14px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.nt-rack-title-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nt-rack-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-gold, #fbbf24);
}

.nt-rack-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-red, #ff334b);
  box-shadow: 0 0 10px var(--accent-red, #ff334b);
  animation: ntRackPulse 2s infinite;
}

@keyframes ntRackPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.nt-rack-heading {
  font-family: var(--font-heading, 'Be Vietnam Pro', sans-serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.nt-rack-heading span {
  background: linear-gradient(90deg, #ff4d64 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nt-rack-controls-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nt-rack-filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-body, sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nt-rack-filter-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nt-rack-filter-btn.active {
  background: linear-gradient(135deg, #ff334b 0%, #c8102e 100%);
  border-color: rgba(255, 140, 155, 0.5);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 51, 75, 0.38);
}

/* ==========================================================================
   RACK STAGE & BRUSHED STAINLESS STEEL RAIL
   ========================================================================== */
.nt-rack-stage {
  position: relative;
  width: 100%;
  height: 435px;
  perspective: 1500px;
  z-index: 5;
  cursor: grab;
  touch-action: pan-y;
}

.nt-rack-stage:active {
  cursor: grabbing;
}

/* Brushed Stainless Steel Clothing Rail (sits at top: 32px, rod at 38..47px) */
.nt-rack-bar-container {
  position: absolute;
  top: 32px;
  left: 0;
  width: 100%;
  height: 22px;
  z-index: 2;
  pointer-events: none;
}

.nt-rack-bar-rod {
  position: absolute;
  top: 6px; /* Rod spans y = 38px .. 47px */
  left: -2%;
  width: 104%;
  height: 9px;
  background: linear-gradient(
    180deg,
    #3f3f46 0%,
    #d4d4d8 18%,
    #ffffff 38%,
    #a1a1aa 58%,
    #27272a 84%,
    #71717a 100%
  );
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

/* Studio Ceiling Suspension Stanchions */
.nt-rack-bracket {
  position: absolute;
  top: -36px;
  width: 10px;
  height: 46px;
  background: linear-gradient(90deg, #27272a, #e4e4e7 45%, #18181b);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7);
}
.nt-rack-bracket.left { left: 9%; }
.nt-rack-bracket.right { right: 9%; }

.nt-rack-bracket::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 18px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, #e4e4e7 0%, #52525b 50%, #18181b 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.75);
}

/* ==========================================================================
   GARMENTS LAYER & PHOTOREALISTIC HANGER INTEGRATION
   ========================================================================== */
.nt-rack-items-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  z-index: 6;
  pointer-events: none;
}

.nt-rack-item {
  position: absolute;
  top: 28px; /* Embedded 3D chrome hook loop at y=10..15px lands right on top of the steel rail (38..43px)! */
  left: 50%;
  width: 336px;
  height: 382px;
  margin-left: -168px;
  transform-origin: 50% 13px; /* Pivot right on the steel rail (28+13=41px) */
  transform-style: preserve-3d;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform, filter, opacity;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

/* 3D Two-Sided Garment Body (Front Cutout + Back Cutout with In-Collar Hanger) */
.nt-garment-body {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 378px;
  margin-top: 0;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.nt-rack-item.is-flipped .nt-garment-body {
  transform: rotateY(180deg);
}

.nt-garment-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.nt-garment-face.front {
  transform: rotateY(0deg);
}

.nt-garment-face.back {
  transform: rotateY(180deg);
}

.nt-garment-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.85));
  transition: filter 0.35s ease;
  pointer-events: none;
  -webkit-user-drag: none;
  color: transparent;
}

/* ==========================================================================
   HANGING BOUTIQUE COLOR TAGS (INSPECT MODE)
   ========================================================================== */
.nt-hanging-tags {
  position: absolute;
  top: 48px;
  right: -46px;
  display: flex;
  gap: 10px;
  z-index: 20;
  opacity: 0;
  transform: translateY(-14px) scale(0.9);
  pointer-events: none;
  transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.nt-rack-stage.inspect-mode .nt-rack-item.is-center .nt-hanging-tags {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nt-color-tag {
  position: relative;
  width: 38px;
  height: 84px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.75);
  transform-origin: top center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.nt-color-tag::before {
  content: '';
  position: absolute;
  top: -26px;
  left: 50%;
  width: 1.5px;
  height: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.55));
  transform: translateX(-50%);
}

.nt-color-tag-hole {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #140206;
  border: 1.5px solid rgba(251, 191, 36, 0.85);
}

.nt-color-tag-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nt-color-tag:hover {
  transform: rotate(-4deg) translateY(2px);
}

.nt-color-tag.active {
  border-color: var(--accent-gold, #fbbf24);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.38), 0 14px 26px rgba(0, 0, 0, 0.85);
  transform: translateY(4px);
}

/* Blur non-center items when in inspect mode */
.nt-rack-stage.inspect-mode .nt-rack-item:not(.is-center) {
  filter: blur(10px) brightness(0.26) !important;
  opacity: 0.38 !important;
  pointer-events: none;
}

/* ==========================================================================
   LEFT / RIGHT NAVIGATION ARROWS
   ========================================================================== */
.nt-rack-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(20, 3, 8, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.nt-rack-nav-btn:hover {
  background: var(--accent-red, #ff334b);
  border-color: #ff6b7d;
  transform: translateY(-50%) scale(1.08);
}

.nt-rack-nav-btn.prev { left: max(18px, 4vw); }
.nt-rack-nav-btn.next { right: max(18px, 4vw); }

/* ==========================================================================
   BOTTOM PRODUCT INFO PANEL (ACTIVE CENTER GARMENT)
   ========================================================================== */
.nt-rack-info-panel {
  position: relative;
  z-index: 20;
  max-width: 700px;
  margin: -10px auto 26px;
  padding: 0 18px;
  text-align: center;
}

.nt-rack-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.71rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.nt-rack-product-title {
  font-family: var(--font-heading, 'Be Vietnam Pro', sans-serif);
  font-size: clamp(1.04rem, 2vw, 1.32rem);
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 6px;
  min-height: 1.45em;
}

.nt-rack-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.nt-rack-price-current {
  font-size: 1.16rem;
  font-weight: 900;
  color: var(--accent-gold, #fbbf24);
}

.nt-rack-price-old {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: line-through;
}

.nt-rack-view-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 14px;
  gap: 4px;
}

.nt-view-side-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.nt-view-side-btn:hover {
  color: #ffffff;
}

.nt-view-side-btn.active {
  background: #ffffff;
  color: #120205;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nt-rack-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nt-rack-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff334b 0%, #d41432 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 130, 145, 0.5);
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 51, 75, 0.4);
  transition: all 0.25s ease;
}

.nt-rack-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 51, 75, 0.58);
}

.nt-rack-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nt-rack-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-gold, #fbbf24);
}

.nt-rack-hint {
  margin-top: 10px;
  font-size: 0.71rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   BOTTOM MARQUEE TICKER
   ========================================================================== */
.nt-rack-ticker {
  width: 100%;
  background: linear-gradient(90deg, #ff2a44 0%, #e11d38 50%, #ff2a44 100%);
  color: #ffffff;
  padding: 8px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  position: relative;
  z-index: 10;
}

.nt-rack-ticker-track {
  display: flex;
  width: max-content;
  animation: ntRackMarquee 26s linear infinite;
}

.nt-rack-ticker-item {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0 22px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.nt-rack-ticker-item span {
  color: var(--accent-gold, #fbbf24);
}

@keyframes ntRackMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nt-rack-section {
    padding-top: 24px;
  }
  .nt-rack-stage {
    height: 360px;
  }
  .nt-rack-item {
    top: 29px;
    width: 252px;
    height: 304px;
    margin-left: -126px;
  }
  .nt-garment-body {
    height: 296px;
    margin-top: 0;
  }
  .nt-hanging-tags {
    right: -32px;
    top: 38px;
  }
  .nt-color-tag {
    width: 32px;
    height: 68px;
  }
  .nt-rack-bracket {
    display: none;
  }
}
