/* ==========================================================================
   Balaji Granites — Dedicated Products Page
   Architectural Granite Showcase & Product Details Experience
   ========================================================================== */

:root {
  --color-stone-dark: #1f1e1b;
  --color-stone-charcoal: #22211e;
  --color-stone-light-bg: #e1dfda;
  --color-stone-light-border: #1f1e1b;
  --color-bg-canvas: #f5f3ef;
  --color-bg-page: #faf9f6;
  --color-bg-card: #f0eee8;
  --color-text-main: #1f1e1b;
  --color-text-body: #4a463e;
  --color-text-muted: #6e695f;
  --color-text-subtle: #8c877d;
  --color-stone-rule: rgba(31, 30, 27, 0.12);
  --color-stone-rule-light: rgba(31, 30, 27, 0.06);

  --font-serif: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-hover: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body.products-page {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--color-bg-canvas);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ==========================================================================
   Vertical White/Ivory Page Transition Curtain
   ========================================================================== */
.products-curtain-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #dedcd8;
  z-index: 99999;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  transform: translate3d(0, 0, 0);
  will-change: transform;
  pointer-events: none;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.products-curtain-overlay.is-dismissed {
  transform: translate3d(0, -100%, 0);
}

.products-page-content-wrap {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  filter: blur(4px);
  will-change: opacity, transform, filter;
  transition: 
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.15s,
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.15s,
    filter 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.products-page-content-wrap.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0px);
}

/* ==========================================================================
   Persistent Floating Pill Navbar
   ========================================================================== */
.products-page .navbar-wrapper {
  position: fixed;
  top: 34px;
  left: 50%;
  transform: translate(-50%, 0) !important;
  width: calc(100% - 140px);
  max-width: 1140px;
  display: flex;
  justify-content: center;
  z-index: 1000;
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: top 0.4s var(--ease-cinematic), box-shadow 0.4s ease;
}

.products-page .pill-navbar {
  width: 100%;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 46px 0 10px;
  background: rgba(235, 233, 228, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 9999px;
  box-shadow: 
    0 12px 34px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.03),
    inset 0 1px 2px rgba(255, 255, 255, 0.95);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.products-page .pill-navbar.is-scrolled {
  background: rgba(235, 233, 228, 0.97);
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.04),
    inset 0 1px 2px rgba(255, 255, 255, 0.95);
}

.products-page .brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  background: #ffffff;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: transform 0.25s var(--ease-hover), box-shadow 0.25s ease;
}

.products-page .brand-badge:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.products-page .brand-text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--color-stone-dark);
  text-transform: uppercase;
  white-space: nowrap;
}

.products-page .nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 40px;
}

.products-page .nav-link {
  position: relative;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  transition: color 0.25s ease;
  padding: 6px 2px;
}

.products-page .nav-link:hover {
  color: var(--color-stone-dark);
}

.products-page .nav-link.active {
  color: var(--color-stone-dark);
  font-weight: 600;
}

.products-page .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--color-stone-dark);
  border-radius: 2px;
}

.products-page .mobile-nav-toggle {
  display: none;
}

/* Container */
.products-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */
.product-breadcrumb-wrap {
  padding-top: 140px;
  padding-bottom: 24px;
}

.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.product-breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-breadcrumb a:hover {
  color: var(--color-stone-dark);
}

.breadcrumb-divider {
  opacity: 0.4;
}

.breadcrumb-current {
  color: var(--color-stone-dark);
  font-weight: 600;
}

/* ==========================================================================
   SECTION 1 — MAIN PRODUCT SHOWCASE (Frames 00:00 - 00:02)
   ========================================================================== */
.product-hero-section {
  position: relative;
  padding-bottom: 80px;
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

/* Left: Large Slab Viewer with Sheen & Side Indicator */
.product-media-column {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Floating Vertical Views Indicator (Frame 00:02) */
.product-vertical-indicator {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

.vertical-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(31, 30, 27, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
}

.vertical-dot.is-active {
  height: 22px;
  border-radius: 9999px;
  background: var(--color-stone-dark);
}

.product-slab-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  background: #2b2824;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.04);
}

.product-slab-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-cinematic), opacity 0.4s ease;
}

.product-slab-card:hover .product-slab-img {
  transform: scale(1.03);
}

.product-slab-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.02) 40%,
    transparent 100%
  );
}

/* Thumbnails / View Switcher Dots */
.product-views-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.view-dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(31, 30, 27, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.view-dot-btn.is-active {
  width: 24px;
  border-radius: 9999px;
  background: var(--color-stone-dark);
}

/* Right: Product Editorial Content */
.product-details-column {
  display: flex;
  flex-direction: column;
}

.product-eyebrow {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-style: italic;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.product-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--color-stone-charcoal);
  margin-bottom: 20px;
}

.product-desc {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--color-text-body);
  margin-bottom: 32px;
}

/* Top Action Row */
.product-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Shared Buttons */
.btn-stone-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 30px;
  border-radius: 9999px;
  background: var(--color-stone-charcoal);
  color: #f7f6f2;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.25s var(--ease-hover), box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn-stone-dark:hover {
  background: #2e2d29;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.btn-stone-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  border-radius: 9999px;
  background: #ece9e2;
  color: var(--color-stone-dark);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid var(--color-stone-dark);
  cursor: pointer;
  transition: transform 0.25s var(--ease-hover), background-color 0.25s ease;
}

.btn-stone-light:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

/* ==========================================================================
   SECTION 2 — SPECIFICATIONS (Frames 00:03 - 00:04)
   ========================================================================== */
.product-specs-section {
  position: relative;
  padding: 60px 0;
  border-top: 1px solid var(--color-stone-rule);
}

.specs-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone-dark);
  margin-bottom: 28px;
}

.specs-grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--color-stone-rule);
}

.specs-table td {
  padding: 18px 0;
  font-size: 14.5px;
}

.specs-label {
  color: var(--color-text-muted);
  font-weight: 500;
  width: 140px;
}

.specs-value {
  color: var(--color-stone-dark);
  font-weight: 600;
  font-family: var(--font-serif);
  letter-spacing: 0.02em;
}

.specs-actions-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

/* ==========================================================================
   SECTION 3 — ARCHITECTURAL APPLICATION GALLERY (Frame 00:05)
   ========================================================================== */
.product-gallery-section {
  position: relative;
  padding: 60px 0 80px;
  border-top: 1px solid var(--color-stone-rule);
}

.gallery-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 580px;
  border-radius: 20px;
  overflow: hidden;
  background: #2b2824;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.04);
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease-cinematic);
}

.gallery-stage:hover img {
  transform: scale(1.025);
}

.gallery-overlay-badge {
  position: absolute;
  bottom: 24px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(31, 30, 27, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eae8e3;
}

/* ==========================================================================
   SECTION 4 — RELATED / ALL 20 GRANITES COLLECTION (Frames 00:06 - 00:08)
   ========================================================================== */
.related-products-section {
  position: relative;
  padding: 80px 0 120px;
  border-top: 1px solid var(--color-stone-rule);
  background: #efede7;
}

.related-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 20px;
}

.related-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-stone-charcoal);
}

.related-filter-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tone-filter-select {
  padding: 10px 36px 10px 18px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-stone-dark);
  background-color: #f7f6f2;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='none' stroke='%231f1e1b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Horizontal Swatches Carousel */
.related-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.carousel-nav-btn:hover {
  background: #f0eee8;
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn-prev {
  left: -22px;
}

.carousel-btn-next {
  right: -22px;
}

.related-swatches-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 4px 24px;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.related-swatches-track::-webkit-scrollbar {
  display: none;
}

.related-product-card {
  flex: 0 0 210px;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: transform 0.35s var(--ease-hover), box-shadow 0.35s var(--ease-hover), border-color 0.35s ease;
  display: flex;
  flex-direction: column;
}

.related-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
  border-color: rgba(31, 30, 27, 0.3);
}

.related-product-card.is-selected {
  border: 2px solid var(--color-stone-dark);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-swatch-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #dedcd8;
}

.card-swatch-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-cinematic);
}

.related-product-card:hover .card-swatch-media img {
  transform: scale(1.08);
}

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-product-name {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-stone-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-product-cat {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.products-site-footer {
  padding: 60px 0 50px;
  border-top: 1px solid var(--color-stone-rule);
  background-color: var(--color-bg-canvas);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--color-stone-dark);
  text-transform: uppercase;
  text-decoration: none;
}

.footer-brand-subtitle {
  font-size: 12px;
  color: var(--color-text-subtle);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.footer-link {
  font-size: 13.5px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-stone-dark);
}

.footer-legal {
  font-size: 12px;
  color: var(--color-text-subtle);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .specs-grid-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .carousel-btn-prev {
    left: 4px;
  }

  .carousel-btn-next {
    right: 4px;
  }
}

@media (max-width: 768px) {
  .products-page .navbar-wrapper {
    top: max(14px, env(safe-area-inset-top, 14px));
    width: min(calc(100% - 24px), 430px);
    max-width: 430px;
  }

  .products-page .pill-navbar {
    height: 50px;
    padding: 0 6px;
    position: relative;
  }

  .products-page .brand-badge {
    height: 38px;
    padding: 0 16px;
  }

  .products-page .brand-text {
    font-size: 11.5px;
    letter-spacing: 0.12em;
  }

  .products-page .mobile-nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
  }

  .products-page .mobile-nav-toggle-text {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    color: var(--color-stone-dark);
  }

  .products-page .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    padding: 8px;
    gap: 3px;
    list-style: none;
    background: rgba(246, 244, 240, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.25s var(--ease-cinematic), transform 0.25s var(--ease-cinematic), visibility 0.25s;
    z-index: 1005;
  }

  .products-page .pill-navbar.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .products-page .nav-links li {
    width: 100%;
  }

  .products-page .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 18px;
    font-size: 13.5px;
    border-radius: 12px;
  }

  .products-container {
    padding: 0 20px;
  }

  .product-breadcrumb-wrap {
    padding-top: 100px;
  }

  .product-vertical-indicator {
    display: none;
  }

  .product-title {
    font-size: 32px;
  }

  .product-actions-row {
    flex-direction: column;
    width: 100%;
  }

  .btn-stone-dark, .btn-stone-light {
    width: 100%;
  }

  .related-product-card {
    flex: 0 0 160px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
