/* ===============================================
   RESPONSIVE GRID BEHAVIOR
   =============================================== */

/* Mobile: Single column */
@media (max-width: 768px) {
  .products-container {
    grid-template-columns: 1fr !important; /* Force single column */
    max-width: 100vw; /* Full width */
    gap: clamp(2rem, 5vw, 3rem) !important; /* Large gaps between cards */
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem); /* Add side padding too */
    justify-items: center; /* Center each card */
  }
  
  .products-grid {
    padding: clamp(1rem, 3vw, 2rem) 0; /* Reduce side padding since container has it */
  }
}

/* Tablet: Medium scale */
@media (min-width: 769px) and (max-width: 1199px) {
  .product-vertical {
    width: clamp(200px, 30vw, 260px);
    height: clamp(400px, 35vw, 520px);
  }
}

/* Desktop: Auto-fit for 3 cards */
@media (min-width: 1200px) {
  .products-container {
    max-width: 1050px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .product-vertical {
    width: clamp(260px, 22vw, 340px);
    height: clamp(300px, 30vw, 400px);
  }
}

/* Extra large desktop */
@media (min-width: 1600px) {
  .product-vertical {
    width: clamp(280px, 20vw, 360px);
    height: clamp(300px, 30vw, 400px);
  }
}

/* Force consistent spacing */
.products-container {
  gap: 0.5rem !important;
  column-gap: 0.5rem !important;
  row-gap: 0.5rem !important;
}

/* Mobile override for spacing */
@media (max-width: 768px) {
  .products-container {
    gap: clamp(2rem, 5vw, 3rem) !important;
    column-gap: 0 !important; /* No column gap since single column */
    row-gap: clamp(2rem, 5vw, 3rem) !important;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .product-vertical {
    width: clamp(280px, 90vw, 320px) !important;
    height: clamp(380px, 70vw, 450px) !important;
  }
  
  .products-container {
    max-width: 100vw;
    padding: clamp(0.5rem, 2vw, 1rem);
  }
}

/* ===============================================
   PRODUCT CARD CORE COMPONENT
   Reusable styles for .product-vertical cards
   Easy to modify internal spacing, video size, CTAs, etc.
   =============================================== */

/* ===============================================
   GRID CONTAINER LAYOUT
   =============================================== */
.products-grid {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 2vw, 2rem);
  max-width: 100vw;
  margin: 0 auto;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem !important;
  justify-items: center;
  max-width: 1050px; /* Wide enough for 3 cards */
  width: 100%;
}

/* ===============================================
   HOMEPAGE HERO SECTION
   =============================================== */
.homepage-hero {
  padding: clamp(0.8rem, 1.5vw, 1.2rem) clamp(1rem, 2vw, 2rem); /* Minimal padding */
  text-align: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-card-dark) 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  min-height: 8vh; /* Extremely short - was 20vh */
  display: none; /* Hidden on desktop */
}

.homepage-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem); /* Much smaller title */
  font-weight: 700; /* Less bold */
  color: var(--primary-gold);
  margin: 0 0 clamp(0.1rem, 0.3vw, 0.2rem) 0; /* Tiny margin */
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: clamp(0.7rem, 1.2vw, 0.9rem); /* Much smaller subtitle */
  color: var(--text-muted);
  margin: 0;
  line-height: 1.2;
  font-weight: 400;
  opacity: 0.8;
}

/* Mobile hero adjustments */
@media (max-width: 768px) {
  .homepage-hero {
    display: flex; /* Show on mobile */
    padding: clamp(0.6rem, 1vw, 1rem) clamp(1rem, 4vw, 1.5rem);
    min-height: 6vh; /* Even tinier on mobile */
  }
  
  .hero-title {
    font-size: clamp(1.2rem, 4vw, 1.6rem); /* Bigger title on mobile */
    margin: 0 0 clamp(0.4rem, 1vw, 0.6rem) 0; /* Increased margin between title and subtitle */
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.4rem); /* Much bigger subtitle on mobile */
  }
}

/* ===============================================
   CARD STRUCTURE & SIZING
   =============================================== */
.product-vertical {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-dark) 100%);
  border: 1px solid var(--border-color);
  border-radius: clamp(12px, 2vw, 20px);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* CARD DIMENSIONS - Modify these for overall card size */
  width: clamp(220px, 25vw, 320px);
  height: clamp(350px, 40vw, 400px);
  
  /* CARD PADDING - Modify these for internal spacing */
  padding-top: clamp(0.5rem, 1.5vw, 1.5rem);
  padding-left: clamp(0.5rem, 1.5vw, 1.5rem);
  padding-right: clamp(0.5rem, 1.5vw, 1.5rem);
  padding-bottom: clamp(0.3rem, 1vw, 1rem);
 
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

/* Animation delays for multiple cards */
.product-vertical:nth-child(1) { animation-delay: 0.1s; }
.product-vertical:nth-child(2) { animation-delay: 0.3s; }
.product-vertical:nth-child(3) { animation-delay: 0.5s; }

/* ===============================================
   CARD VISUAL EFFECTS
   =============================================== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top gradient line */
.product-vertical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
  transition: all 0.3s ease;
}

/* Hover border gradient */
.product-vertical::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: clamp(12px, 2vw, 20px);
  padding: 1px;
  background: linear-gradient(135deg, transparent, var(--primary-gold), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: exclude;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Hover effects */
.product-vertical:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--primary-gold);
  box-shadow: 
    0 20px 60px rgba(212, 175, 55, 0.2),
    0 0 0 1px rgba(212, 175, 55, 0.1);
}

.product-vertical:hover::after {
  opacity: 1;
}

/* ===============================================
   VIDEO SECTION - EASY TO MODIFY
   =============================================== */
.video-container {
  /* VIDEO SIZE - Modify these percentages to change video area */
  width: 70%;           /* 70% of card width */
  height: 80%;          /* 80% of card height */
  
  /* VIDEO POSITIONING */
  margin: 0 auto;
  aspect-ratio: 9 / 16;  /* Portrait video ratio */
  border-radius: clamp(8px, 1.5vw, 16px);
  overflow: hidden;
  position: relative;
  background: #111;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.video-container:hover {
  transform: scale(1.02);
}

.product-vertical video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: clamp(8px, 1.5vw, 16px);
  transition: transform 0.3s ease;
}

.product-vertical:hover video {
  transform: scale(1.05);
}

/* ===============================================
   VIDEO PLACEHOLDER
   =============================================== */
.video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: clamp(8px, 1.5vw, 16px);
  border: 2px dashed var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.video-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.product-vertical:hover .video-placeholder {
  border-color: var(--primary-gold);
  transform: scale(1.02);
}

.video-placeholder-text {
  color: var(--text-dark);
  font-size: clamp(0.5rem, 1.2vw, 0.8rem);
  text-align: center;
  padding: clamp(0.3rem, 1vw, 0.75rem);
  z-index: 1;
  transition: color 0.3s ease;
  line-height: 1.3;
}

.product-vertical:hover .video-placeholder-text {
  color: var(--text-muted);
}

/* ===============================================
   PLAY BUTTON OVERLAY
   =============================================== */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(212, 175, 55, 0.9);
  border-radius: 50%;
  
  /* PLAY BUTTON SIZE - Modify these for button size */
  width: clamp(24px, 3vw, 50px);
  height: clamp(24px, 3vw, 50px);
  
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.play-overlay:hover {
  background: var(--primary-gold);
  transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay::after {
  content: '▶';
  color: var(--bg-dark);
  font-size: clamp(0.6rem, 1.5vw, 1rem);
  margin-left: 1px;
}

/* ===============================================
   CONTENT SECTION - EASY TO MODIFY
   =============================================== */
.product-content {
  display: flex;
  flex-direction: column;
  flex: 1; /* Takes remaining space after video */
  justify-content: center;
  align-items: center;
  
  /* CONTENT SPACING - Modify these for title/button spacing */
  padding: clamp(0.25rem, 0.8vw, 0.8rem);
  gap: clamp(0.4rem, 1vw, 0.8rem);
  min-height: 0;
}

/* ===============================================
   TITLE STYLING - EASY TO MODIFY
   =============================================== */
.product-vertical h2 {
  /* TITLE SIZE - Modify font-size for title appearance */
  font-size: clamp(0.6rem, 1.8vw, 1.2rem);
  font-weight: 700;
  color: var(--primary-gold);
  text-align: center;
  line-height: 1.2;
  width: 100%;
  margin: 0;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  
  /* Title truncation */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 0 0 auto;
}

.product-vertical:hover h2 {
  transform: translateY(-2px);
  text-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

/* ===============================================
   CTA BUTTON - EASY TO MODIFY
   =============================================== */
.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
  color: var(--bg-dark);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  
  /* BUTTON SIZE - Modify these for button appearance */
  font-size: clamp(0.7rem, 1.3vw, 1.1rem);
  padding: clamp(0.25rem, 0.6vw, 0.5rem) clamp(0.7rem, 2.2vw, 1.3rem);
  border-radius: clamp(6px, 1vw, 12px);
  width: clamp(100px, 90%, 250px);
  
  /* BUTTON EFFECTS */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px var(--shadow-gold);
  margin-top: 0;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, var(--light-gold), var(--primary-gold));
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:active {
  transform: translateY(-1px);
}

/* ===============================================
   MOBILE RESPONSIVE ADJUSTMENTS
   =============================================== */
@media (max-width: 768px) {
  .product-vertical {
    width: clamp(300px, 85vw, 360px) !important; /* Larger cards, force single fit */
    height: clamp(400px, 60vw, 480px) !important; /* Proportional height */
    margin: 0 auto clamp(2rem, 5vw, 3rem) auto; /* Center and add bottom margin */
  }
  
  /* Mobile CTA: Bigger and more tappable */
  .cta-button {
    font-size: clamp(1.1rem, 4vw, 1.4rem) !important;
    padding-top: clamp(0.8rem, 2vw, 1.2rem) !important;
    padding-bottom: clamp(0.8rem, 2vw, 1.2rem) !important;
    line-height: 1.2;
  }
}

/* ===============================================
   ACCESSIBILITY & PERFORMANCE
   =============================================== */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .product-vertical,
  .video-container,
  .cta-button,
  .play-overlay {
    animation: none;
    transition: none;
  }
  
  .video-placeholder::before {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .product-vertical {
    border: 2px solid var(--primary-gold);
  }
  
  .cta-button {
    border: 2px solid var(--bg-dark);
  }
}

/* Loading state */
.product-vertical.loading {
  opacity: 0.7;
}

/* ===============================================
   FALLBACK FOR BROWSERS WITHOUT ASPECT-RATIO
   =============================================== */
@supports not (aspect-ratio: 9 / 16) {
  .video-container {
    height: 0;
    position: relative;
    padding-bottom: 177.78%; /* 16/9 * 100% = 177.78% for 9:16 ratio */
  }
  
  .video-container > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* ===============================================
   QUICK MODIFICATION GUIDE
   ===============================================
   
   TO MODIFY VIDEO SIZE:
   - Change .video-container width/height percentages
   
   TO MODIFY TITLE SIZE:
   - Change .product-vertical h2 font-size clamp values
   
   TO MODIFY BUTTON SIZE:
   - Change .cta-button font-size and padding clamp values
   
   TO MODIFY CARD SPACING:
   - Change .product-vertical padding values
   - Change .product-content padding and gap values
   
   TO MODIFY CARD SIZE:
   - Change .product-vertical width/height clamp values
   
   TO CHANGE VIDEO ASPECT RATIO:
   - Change .video-container aspect-ratio value
   
   =============================================== */