/* =============================================
   NARESH NAGI JEWELLERS — Premium Pages Styles
   ============================================= */

/* -- Page Transition Overlay -- */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--black);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.page-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* -- Light Luxury Theme Base -- */
body.light-theme {
  background: linear-gradient(135deg, #FAF6F0 0%, #F5EFEB 50%, #F2EADC 100%);
  color: #1A1A1A;
}

/* Redefine variables for light theme specific scopes */
body.light-theme {
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A4A;
  --gold-accent: #A88548;
  --gold-text: #8A6D3B;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(184, 151, 106, 0.2);
  --shadow-lux: 0 10px 40px rgba(184, 151, 106, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 50px rgba(184, 151, 106, 0.15), 0 5px 20px rgba(0, 0, 0, 0.06);
}

body.light-theme #navbar {
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 151, 106, 0.1);
}

body.light-theme .logo-main,
body.light-theme .nav-links a {
  color: var(--text-primary);
}

body.light-theme .nav-links a:hover,
body.light-theme .nav-links a.active {
  color: var(--gold-accent);
}

body.light-theme .logo-sub {
  color: var(--gold-text);
}

body.light-theme .footer {
  background: #111111; /* Keep footer dark for grounding */
  color: var(--text-light);
}

/* -- Header -- */
.page-header {
  padding-top: 160px;
  padding-bottom: 80px;
  text-align: center;
  position: relative;
  z-index: 2;
  /* subtle parallax effect via background */
  background: radial-gradient(circle at center 20%, rgba(212, 184, 124, 0.05), transparent 60%);
}

.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--gold-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--gold-text);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-shadow: 0 4px 14px rgba(184, 151, 106, 0.15); /* text depth */
}

.page-title span.gold {
  color: var(--gold-accent);
  background: linear-gradient(145deg, #C9A96C, #A88548);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-description {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

/* -- Product Grid (Collection Page) -- */
.collection-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5vw 120px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 50px;
}

/* Intersection Observer Animations */
.stagger-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* -- Product Card -- */
.product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lux);
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(184, 151, 106, 0.4);
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 5; /* Premium portrait ratio */
  overflow: hidden;
  position: relative;
  background-color: #f7f7f7;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .card-image-wrap img {
  transform: scale(1.08); /* slightly deeper zoom */
}

/* Subtle glow overlay on hover */
.product-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.4), transparent 50%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.product-card:hover::after { opacity: 1; }

.card-info {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: center;
}

.card-purity {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.product-card:hover .card-title {
  color: var(--gold-accent);
}

.card-price {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--gold-text);
  letter-spacing: 0.05em;
  margin-top: auto;
  font-weight: 500;
}

/* -- Product Detail Page (Interactive Gallery) -- */
.product-detail-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 140px 5vw 120px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vh;
  align-items: start;
}

/* Gallery Layout */
.gallery-container {
  position: sticky;
  top: 120px;
}

.main-image-viewport {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--card-bg);
  box-shadow: var(--shadow-lux);
  border: 1px solid var(--card-border);
  overflow: hidden;
  position: relative;
  border-radius: 2px;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  opacity: 0;
}

.main-image-viewport:hover .gallery-arrow {
  opacity: 1;
}

.gallery-arrow:hover {
  background: #fff;
  color: var(--gold-accent);
  box-shadow: 0 4px 15px rgba(184, 151, 106, 0.2);
}

.gallery-arrow.left { left: 16px; }
.gallery-arrow.right { right: 16px; }

.main-image-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

/* Crossfade utility */
.main-image-viewport img.fading-out { opacity: 0; transform: scale(1); }
.main-image-viewport img.fading-in { opacity: 1; }

.thumbnail-row {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.thumbnail {
  width: calc(25% - 12px);
  aspect-ratio: 1 / 1;
  background: var(--card-bg);
  border: 2px solid transparent; /* default invisible border */
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  opacity: 0.6;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.thumbnail:hover, .thumbnail.active {
  opacity: 1;
  border-color: var(--gold-accent);
  box-shadow: 0 4px 15px rgba(184, 151, 106, 0.15);
}

.thumbnail:hover img {
  transform: scale(1.1);
}

/* Product Info */
.detail-info {
  padding-top: 20px;
}

.detail-purity {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.1;
  font-weight: 400;
}

.detail-price {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  color: var(--gold-text);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(184, 151, 106, 0.2);
  font-weight: 500;
}

.detail-desc {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 400;
  margin-bottom: 40px;
}

.detail-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 48px 0;
}

.detail-highlights li {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.detail-highlights li::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold-accent);
  border-radius: 50%;
  margin-right: 16px;
}

.detail-ctas {
  display: flex;
  gap: 20px;
}

body.light-theme .btn-primary {
  background: var(--gold-accent);
  color: #fff;
  padding: 16px 32px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
  border: 1px solid var(--gold-accent);
}

body.light-theme .btn-primary:hover {
  background: var(--gold-text);
  border-color: var(--gold-text);
  box-shadow: 0 10px 20px rgba(168, 133, 72, 0.3);
  transform: translateY(-2px);
}

body.light-theme .btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  padding: 16px 32px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
}

body.light-theme .btn-secondary:hover {
  border-color: var(--gold-accent);
  color: var(--gold-accent);
}

/* Responsive */
@media (max-width: 992px) {
  .product-detail-container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 120px;
  }
  .gallery-container { position: relative; top: 0; }
  .main-image-viewport:hover img { transform: scale(1); } /* disable hover zoom on mobile */
}

@media (max-width: 768px) {
  .page-header { padding-top: 120px; padding-bottom: 40px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .detail-ctas { flex-direction: column; }
}
