/* 
========================================
  HOMEPAGE STYLES
======================================== 
*/

/* --- Hero Section --- */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-secondary);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  animation: scaleUp 20s infinite alternate;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding-top: 80px; /* offset for navbar */
}

.hero-subtitle {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  display: block;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg) var(--space-md);
  margin-top: var(--space-lg);
}

/* --- Product Card --- */
.product-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--color-primary);
  color: var(--color-surface);
  padding: 0.2rem 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-pill);
  z-index: 2;
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-md);
  background: var(--color-background);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-actions {
  position: absolute;
  bottom: 1rem;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  z-index: 2;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateY(0);
}

.product-brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

.product-name {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.product-price {
  font-size: 1.2rem;
  color: var(--color-accent);
  font-weight: 600;
}

/* --- Features Section --- */
.features {
  background: var(--color-primary);
  color: var(--color-surface);
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

/* --- Virtual Try-On Camera Modal --- */
.camera-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.camera-modal.active {
  opacity: 1;
  visibility: visible;
}

.camera-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.camera-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.camera-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.close-camera-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  overflow: hidden;
}

#camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror effect */
}

.face-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 250px;
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  display: none;
}

.face-reticle.scanning {
  display: block;
  animation: pulseGlow 1.5s infinite;
  border-color: var(--color-accent);
}

.camera-status {
  padding: 1rem;
  text-align: center;
  font-weight: 500;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-result {
  display: none;
  padding: 1rem;
  text-align: center;
  background: var(--color-secondary);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.match-result.show {
  display: block;
  animation: slideUp 0.5s ease;
}

.match-shade-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0.5rem auto;
  border: 2px solid var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.feature-item h3 {
  color: var(--color-accent);
  margin-top: var(--space-sm);
}

/* --- Editorial / Beauty Tips --- */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.editorial-image {
  border-radius: var(--radius-lg);
}

/* --- Reviews Section --- */
.reviews-section {
  background: var(--color-background);
}

.review-card {
  background: var(--color-surface);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  text-align: center;
  height: 100%;
}

.stars {
  color: var(--color-accent);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.review-text {
  font-style: italic;
  margin-bottom: var(--space-md);
}

.reviewer-name {
  font-weight: 600;
  font-family: var(--font-heading);
}

/* Responsive */
@media (max-width: 768px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
  .editorial-content {
    order: -1;
  }
}
