/* ==========================================================================
   PRODUCT DETAIL MODAL, MULTI-ANGLE GALLERY, SIZE ADVISOR & LEAD CAPTURE
   High-Contrast Dark & Light Theme Support with Manrope
   ========================================================================== */

/* Main Product Modal Overlay */
.product-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

[data-theme="light"] .product-modal-overlay {
  background: rgba(15, 23, 42, 0.65);
}

.product-modal-overlay.active {
  display: flex;
}

.product-modal-container {
  width: 100%;
  max-width: 1100px;
  max-height: 88vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  grid-template-rows: 100%;
  overflow: hidden;
  position: relative;
  animation: modal-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.96) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.modal-close-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  transform: rotate(90deg);
}

/* Gallery Section (Left Column) */
.modal-gallery-col {
  padding: 2rem;
  background: var(--bg-card-hover);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  border-right: 1px solid var(--border-subtle);
  position: relative;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
}

.modal-gallery-col::-webkit-scrollbar {
  width: 5px;
}

.modal-gallery-col::-webkit-scrollbar-track {
  background: transparent;
}

.modal-gallery-col::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

.gallery-main-frame {
  position: relative;
  width: 100%;
  max-height: 420px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin: 0 auto;
  flex-shrink: 0;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.gallery-video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.gallery-video-player.active {
  display: block;
}

.gallery-active-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
}

/* 4-Angle Thumbnail Strip */
.gallery-thumbs-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  flex-shrink: 0;
  padding-bottom: 0.5rem;
}

.thumb-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  background: var(--bg-card);
  position: relative;
  transition: all var(--transition-fast);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item.active {
  border-color: var(--text-primary);
}

.thumb-item .thumb-label {
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.75);
  font-family: var(--font-pill);
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  text-transform: uppercase;
}

/* Product Info Section (Right Column) */
.modal-info-col {
  padding: 2.5rem;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.modal-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-sku {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.modal-title {
  font-size: 1.95rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.modal-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-price-current {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text-primary);
}

.modal-price-mrp {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.modal-discount {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-orange);
}

/* Fabric & GSM Spec Box */
.fabric-specs-box {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.spec-label {
  color: var(--text-secondary);
}

.spec-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.gsm-meter-bar {
  width: 100%;
  height: 6px;
  background: var(--border-medium);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.gsm-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, var(--accent-acid));
  border-radius: var(--radius-full);
}

/* Size Selection & Fit Advisor */
.size-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.size-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.size-guide-trigger {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-blue);
  cursor: pointer;
  text-decoration: underline;
}

.size-buttons-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
}

.size-btn {
  padding: 0.85rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  transition: all var(--transition-fast);
}

.size-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: var(--bg-card-hover);
}

.size-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.25);
}

/* Demand Validation CTA Buttons */
.modal-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.whatsapp-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #25d366;
  color: #ffffff;
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.whatsapp-action-btn:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.vip-drop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  padding: 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
}

.vip-drop-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Live Demand Proof */
.demand-proof-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--badge-gsm-bg);
  border: 1px solid var(--badge-gsm-border);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--badge-gsm-text);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* VIP Waitlist Lead Modal */
.waitlist-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

[data-theme="light"] .waitlist-modal-overlay {
  background: rgba(15, 23, 42, 0.65);
}

.waitlist-modal-overlay.active {
  display: flex;
}

.waitlist-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.waitlist-card h3 {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.waitlist-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   INTERACTIVE FULL-SCREEN HIGH-RES IMAGE LIGHTBOX & ZOOM MODAL
   ========================================================================== */
.pdp-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 11, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pdp-lightbox-overlay.active {
  display: flex;
}

.pdp-lightbox-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: zoomInFast 0.25s ease forwards;
}

@keyframes zoomInFast {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.pdp-lightbox-close-btn {
  position: absolute;
  top: -10px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.pdp-lightbox-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.pdp-lightbox-img-frame {
  position: relative;
  width: 100%;
  height: calc(100% - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: zoom-in;
}

.pdp-lightbox-img-frame.zoomed {
  cursor: zoom-out;
  overflow: auto;
}

.pdp-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.pdp-lightbox-img-frame.zoomed .pdp-lightbox-img {
  max-width: none;
  max-height: none;
  transform: scale(2);
  cursor: grab;
}

.pdp-lightbox-thumbs-bar {
  display: flex;
  gap: 0.6rem;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pdp-lightbox-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdp-lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-lightbox-thumb.active {
  border-color: var(--text-primary);
  transform: scale(1.1);
}

.pdp-lightbox-zoom-hint {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   SEGMENTED SPECIFICATION TABS (Replacing Accordions)
   ========================================================================== */
.pdp-specs-tab-section {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  width: 100%;
  overflow: hidden;
}

.pdp-specs-tab-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  margin-bottom: 1.25rem;
}

.pdp-specs-tab-bar::-webkit-scrollbar {
  display: none;
}

.pdp-spec-tab-btn {
  flex: 1;
  min-width: fit-content;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-pill);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.pdp-spec-tab-btn:hover {
  color: var(--text-primary);
}

.pdp-spec-tab-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.pdp-spec-panel {
  display: none;
  animation: fadeInFast 0.2s ease forwards;
}

.pdp-spec-panel.active {
  display: block;
}

@keyframes fadeInFast {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ==========================================================================
   PDP MOBILE FLOATING STICKY "ADD TO BAG" BAR
   ========================================================================== */
.pdp-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-medium);
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

[data-theme="light"] .pdp-mobile-sticky-bar {
  background: #ffffff;
  border-top-color: #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.pdp-mobile-sticky-bar.visible {
  transform: translateY(0);
  opacity: 1;
}

.pdp-sticky-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
}

.pdp-sticky-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.pdp-sticky-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.pdp-sticky-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.pdp-sticky-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdp-sticky-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.pdp-sticky-price {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.pdp-sticky-size-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
}

.pdp-sticky-btn {
  padding: 0.65rem 1.25rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.pdp-sticky-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

@media (max-width: 820px) {
  .pdp-mobile-sticky-bar {
    display: block;
  }
}
