/* Product Details Page - Homepage Theme */

:root {
  --accent: #5AE0E7;
  --background: #000000;
  --foreground: #e5e5e5;
  --muted-foreground: #888888;
  --card: #111111;
  --secondary: #333333;
}

.product-details-page {
  background: #000;
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

/* Animated Background for Product Page */
.product-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.product-bg-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(90, 224, 231, 0.3);
  border-radius: 50%;
  animation: float-particle 15s linear infinite;
}

@keyframes float-particle {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

/* Breadcrumb */
.product-breadcrumb {
  padding: 1rem 0;
  animation: fadeInDown 0.6s ease-out;
}

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

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

.product-breadcrumb .arrow {
  color: var(--muted-foreground);
  margin: 0 0.5rem;
}

/* Product Container */
.product-container {
  position: relative;
  z-index: 1;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  animation: fadeInUp 0.8s ease-out;
}

.product-gallery {
  position: sticky;
  top: 100px;
}

/* Video Player */
.video-thumbnail {
  position: relative;
  cursor: pointer;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  background: rgba(90, 224, 231, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.25rem;
  transition: all 0.3s;
}

.video-thumbnail:hover .video-play-icon {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent);
  box-shadow: 0 0 20px rgba(90, 224, 231, 0.5);
}

.video-container {
  width: 100%;
  height: 500px;
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Custom Video Player */
.custom-video-player {
  width: 100%;
  height: 500px;
  background: #000;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

.custom-video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.custom-video-player:hover .custom-controls {
  opacity: 1;
}

.custom-controls button {
  background: var(--accent);
  border: none;
  color: #000;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.custom-controls button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(90, 224, 231, 0.5);
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(90, 224, 231, 0.2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-filled {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.1s;
  box-shadow: 0 0 10px rgba(90, 224, 231, 0.5);
}

.time-display {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Fullscreen Video Player Styles */
.custom-video-player:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.custom-video-player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.custom-video-player:fullscreen .custom-controls,
.custom-video-player:-webkit-full-screen .custom-controls {
  opacity: 1;
  padding: 1.5rem 2rem;
}

.custom-video-player:fullscreen .custom-controls button,
.custom-video-player:-webkit-full-screen .custom-controls button {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.1rem;
}

.custom-video-player:fullscreen .time-display,
.custom-video-player:-webkit-full-screen .time-display {
  font-size: 0.9rem;
}

.custom-video-player:fullscreen .progress-bar,
.custom-video-player:-webkit-full-screen .progress-bar {
  height: 6px;
}

/* Image Gallery */
.product-gallery {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.main-image-container {
  background: var(--card);
  border: 1px solid var(--secondary);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
  animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.main-image {
  width: 100%;
  height: 500px;
  object-fit: contain;
  background: #111;
  padding: 2rem;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.75rem;
}

.thumbnail {
  background: var(--card);
  border: 2px solid var(--secondary);
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  height: 80px;
}

.thumbnail:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumbnail.active {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(90, 224, 231, 0.3);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

/* Product Info */
.product-info {
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

/* Product Rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  animation: fadeInUp 0.6s ease-out 0.65s both;
}

.rating-stars {
  display: flex;
  gap: 0.25rem;
}

.rating-star {
  color: #333;
  font-size: 1.25rem;
  transition: all 0.3s;
}

.rating-star.filled {
  color: #ffc107;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.rating-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.rating-value {
  color: white;
  font-weight: 600;
}

.rating-count {
  color: var(--muted-foreground);
}

/* Badges */
.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.6s ease-out 0.4s both;
}

.badge {
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.badge-refurbished {
  background: rgba(90, 224, 231, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.badge-best-seller {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border: 1px solid #ffc107;
}

.badge-latest {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.badge-out-of-stock {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid #f44336;
}

/* Product Title */
.product-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: white;
  margin-bottom: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

/* Trust Chips */
.trust-chips {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.7s both;
}

.trust-chip {
  flex: 1;
  min-width: 150px;
  background: rgba(90, 224, 231, 0.05);
  border: 1px solid rgba(90, 224, 231, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s;
}

.trust-chip:hover {
  background: rgba(90, 224, 231, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(90, 224, 231, 0.2);
}

.trust-chip-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(90, 224, 231, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.trust-chip-content {
  flex: 1;
}

.trust-chip-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.125rem;
}

.trust-chip-subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Price Section */
.price-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  animation: slideInLeft 0.6s ease-out 0.6s both;
}

@keyframes slideInLeft {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.current-price {
  font-size: 2rem;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}

.original-price {
  font-size: 1rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(90,224,231,0.12);
  color: var(--accent);
  border: 1px solid rgba(90,224,231,0.35);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* Variants Section */
.variant-section {
  margin: 2rem 0;
  animation: fadeInUp 0.6s ease-out 0.7s both;
}

.variant-label {
  font-size: 1rem;
  color: white;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.variant-label::before {
  content: '';
  width: 4px;
  height: 1rem;
  background: var(--accent);
  margin-right: 0.5rem;
  border-radius: 2px;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.variant-option {
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border: 2px solid var(--secondary);
  border-radius: 0.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.variant-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(90, 224, 231, 0.2), transparent);
  transition: left 0.5s;
}

.variant-option:hover::before {
  left: 100%;
}

.variant-option:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(90, 224, 231, 0.2);
}

.variant-option.selected {
  background: rgba(90, 224, 231, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(90, 224, 231, 0.3);
}

.variant-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
}

.variant-option.disabled:hover {
  transform: none;
  border-color: var(--secondary);
}

/* Specifications */
.specs-section {
  margin: 2rem 0;
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

.specs-title {
  font-size: 1.25rem;
  color: white;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.spec-chip {
  background: rgba(90, 224, 231, 0.05);
  border: 1px solid rgba(90, 224, 231, 0.3);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s;
}

.spec-chip:hover {
  background: rgba(90, 224, 231, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(90, 224, 231, 0.2);
}

.spec-chip-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(90, 224, 231, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.spec-chip-content {
  flex: 1;
  min-width: 0;
}

.spec-chip-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-chip-value {
  font-size: 0.875rem;
  color: white;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .specs-grid {
    grid-template-columns: 1fr;
  }
}

/* Description */
.description-section {
  margin: 2rem 0;
  animation: fadeInUp 0.6s ease-out 0.9s both;
}

.description-title {
  font-size: 1.25rem;
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

.description-content {
  color: var(--muted-foreground);
  line-height: 1.8;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  animation: fadeInUp 0.6s ease-out 1s both;
}

.action-btn {
  flex: 1;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-cart {
  background: var(--accent);
  color: #000;
  box-shadow: 0 10px 30px rgba(90, 224, 231, 0.3);
}

.btn-cart:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(90, 224, 231, 0.4);
}

.btn-buy {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-buy:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-3px);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--secondary);
  color: var(--muted-foreground);
}

.btn-disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Out of Stock Alert */
.out-of-stock-alert {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid #f44336;
  border-radius: 0.5rem;
  padding: 1rem;
  color: #f44336;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  animation: shake 0.5s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.out-of-stock-alert i {
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .product-gallery {
    position: relative;
    top: 0;
  }
  
  .main-image {
    height: 300px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .current-price {
  font-size: 2rem;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}
}

/* Loading Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.price-section { padding-top: 22px; }

/* ── Left column trust + specs ── */
.product-gallery .trust-chips {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.product-gallery .trust-chip {
  min-width: unset;
  flex: unset;
}
.product-gallery .specs-section { margin-top: 1.5rem; }
.product-gallery .specs-grid {
  grid-template-columns: 1fr 1fr;
}

/* ── Mobile fixed bottom bar ── */
.mobile-action-bar {
  display: none;
}
@media (max-width: 768px) {
  .desktop-actions { display: none !important; }
  .mobile-action-bar {
    display: flex;
    gap: 0.75rem;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 999;
    background: rgba(0,0,0,0.96);
    border-top: 1px solid rgba(90,224,231,0.2);
    padding: 12px 16px;
    backdrop-filter: blur(12px);
  }
  .product-details-page { padding-bottom: 80px; }
  .product-gallery .specs-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Full-width sections below the 2-col grid ── */
.pd-fullwidth-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.pd-specs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.pd-trust-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; margin-top: 1.25rem; }

@media (max-width: 1100px) {
  .pd-specs-grid { grid-template-columns: repeat(3, 1fr); }`n  .pd-trust-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
}

@media (max-width: 768px) {
  .pd-specs-grid,
  .pd-trust-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
}

.pd-trust-grid .trust-chip { padding: 1.25rem 1rem; }

/* ── Responsive overrides for specs + trust grids ── */
@media (max-width: 1100px) {
  .pd-specs-grid { grid-template-columns: repeat(3, 1fr); }
  .pd-trust-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .pd-specs-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .pd-specs-grid { grid-template-columns: 1fr; }
  .pd-trust-grid { grid-template-columns: 1fr; }
}

/* ── Auto-fit trust + specs grids — no orphan cards ── */
.pd-trust-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}
.pd-specs-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
}

/* ── Force 3 columns for specs + trust — no truncation ── */
.pd-specs-grid,
.pd-trust-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}
.spec-chip-value {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}
@media (max-width: 640px) {
  .pd-specs-grid,
  .pd-trust-grid { grid-template-columns: 1fr !important; }
}

/* ── Button single-line fix ── */
.action-btn {
  font-size: 0.875rem !important;
  padding: 1rem 1.25rem !important;
  white-space: nowrap !important;
}

/* Short labels on mobile fixed bar */
@media (max-width: 768px) {
  .add-to-cart-btn .btn-label-full,
  .buy-now-btn .btn-label-full { display: none; }
  .add-to-cart-btn .btn-label-short,
  .buy-now-btn .btn-label-short { display: inline; }
}
@media (min-width: 769px) {
  .add-to-cart-btn .btn-label-short,
  .buy-now-btn .btn-label-short { display: none; }
  .add-to-cart-btn .btn-label-full,
  .buy-now-btn .btn-label-full { display: inline; }
}

/* ── Product page FAQ ── */
.pd-faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-top: 1.25rem;
}
.pd-faq-list .faq-item-new { border-bottom: 1px solid rgba(255,255,255,0.07); }
@media (max-width: 768px) {
  .pd-faq-list { grid-template-columns: 1fr; }
}

.mobile-action-bar { transition: transform 0.3s ease; }

/* Breadcrumb font consistency */
.product-breadcrumb,
.product-breadcrumb a,
.product-breadcrumb span {
  font-size: 12px;
  font-weight: 400;
}
.product-breadcrumb a:hover {
  font-weight: 600;
  color: var(--accent);
}

/* Remove font-weight on breadcrumb hover to prevent scaling/shift */
.product-breadcrumb a:hover {
  font-weight: 400;
  color: var(--accent);
}
