/* Enhanced Collection Styling - Optimized for Performance */
:root {
  --card-radius: 14px;
  --card-hover-radius: 20px;
  --card-shadow: 0 10px 30px rgba(0,0,0,0.08);
  --card-hover-shadow: 0 20px 40px rgba(0,0,0,0.15);
  --gold-gradient: linear-gradient(45deg, #c6a57c, #e2c9a8);
  --gold-gradient-hover: linear-gradient(45deg, #ceaa82, #edd3b1);
  --gold-accent: #c6a57c;
  --gold-dark: #a3834d;
  --transition-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-smooth: cubic-bezier(0.19, 1, 0.22, 1);
  --glass-opacity: 0.7;
  --glass-blur: 15px;
  --card-border: rgba(255, 255, 255, 0.2);
  --card-border-hover: rgba(198, 165, 124, 0.3);
}

/* Modernized collection section */
.collection-section {
  position: relative;
  padding: 8rem 0;
  background: linear-gradient(to bottom, #f9f5f0, #ffffff);
  overflow: hidden;
}

/* Simplified background elements for better performance */
.collection-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../../images/agave.svg');
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 200px;
  opacity: 0.02;
  z-index: 0;
  pointer-events: none;
}

/* New bottle grid with better spacing - changed to flex for better performance */
.bottle-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 5%;
  gap: 3rem;
  position: relative;
  z-index: 10;
}

/* Optimized bottle card for better performance */
.bottle-card {
  flex: 1 1 280px;
  min-width: 280px;
  max-width: 320px;
  min-height: 520px;
  padding: 2rem 1.5rem;
  background: rgba(255,255,255,0.95);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease-out, background-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Optimized hover effect */
.bottle-card:hover {
  transform: translateY(-10px);
  border-color: var(--card-border-hover);
  box-shadow: var(--card-hover-shadow);
  background: #f9f5f0;
}

/* Simplified bottle image styles */
.bottle-image {
  height: 400px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottle-image img {
  height: 400px;
  width: 260px;
  object-fit: contain;
  transition: transform 0.3s ease-out;
}

.bottle-card:hover .bottle-image img {
  transform: translateY(-10px);
}

/* Badge styling */
.bottle-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--gold-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  z-index: 5;
}

/* Text styling */
.bottle-name {
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
  font-family: 'Cormorant', serif;
  font-weight: 700;
  color: #7a5c35;
}

.bottle-type {
  margin-bottom: 1.5rem;
  color: #b08d57;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* Buttons styling */
.bottle-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.bottle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

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

.bottle-btn:hover {
  transform: translateY(-3px);
}

.about-btn:hover {
  background: var(--black);
  color: var(--gold-accent);
}

.buy-btn:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Simplified animation keyframes */
@keyframes ripple {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .bottle-card {
    min-width: 260px;
    padding: 1.5rem 1rem;
  }
  
  .bottle-image {
    height: 350px;
  }
  
  .bottle-image img {
    height: 350px;
    width: 230px;
  }
}

@media (max-width: 767px) {
  .collection-section {
    padding: 5rem 0;
  }
  
  .bottle-card {
    min-height: 480px;
  }
  
  .bottle-image {
    height: 320px;
  }
  
  .bottle-image img {
    height: 320px;
    width: 210px;
  }
  
  .bottle-name {
    font-size: 2rem;
  }
}

/* Added class-based hover for better performance */
.bottle-card.hover-active {
  transform: translateY(-8px);
  border-color: var(--card-border-hover);
  box-shadow: var(--card-hover-shadow);
  background: #f9f5f0;
}

.bottle-card.hover-active .bottle-image img {
  transform: translateY(-5px);
}

/* Specific MacOS and high-DPI screen optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
  .bottle-card {
    transform: none !important;
    transition: box-shadow 0.3s ease, background-color 0.3s ease !important;
    transform-style: flat !important;
    will-change: auto !important;
  }
  
  .bottle-image img {
    transition: transform 0.3s ease !important;
    will-change: auto !important;
  }
  
  .bottle-card::before,
  .bottle-card::after,
  .glass-highlight,
  .decorative-element {
    display: none !important;
  }
  
  /* Disable complex hover animations */
  .bottle-card:hover {
    transform: translateY(0) !important;
    background-color: #f9f5f0;
  }
  
  .bottle-card:hover .bottle-image {
    transform: none !important;
  }
  
  .bottle-btn:hover {
    transform: translateY(0) !important;
    letter-spacing: 0.1em !important;
  }
}

/* Side accent lines that appear on hover - disabled for performance */
.bottle-card::after {
  content: none;
  display: none;
}

.bottle-card:hover::after {
  opacity: 0.7;
}

/* Enhanced bottle image container - animations optimized for performance */
.bottle-image {
  position: relative;
  height: 380px;
  width: 100%;
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
  z-index: 10;
  /* Animation removed for performance */
}

/* Enhanced shadow effect under bottles - simplified for performance */
.bottle-image::after {
  display: none; /* Shadow disabled for performance */
}

.bottle-card:hover .bottle-image {
  transform: translateY(-15px) scale(1.04);
  animation-play-state: paused;
}

.bottle-card:hover .bottle-image::after {
  width: 70%;
  opacity: 0.8;
  filter: blur(8px);
}

.bottle-image img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: none; /* Remove drop-shadow for better performance */
}

.bottle-card:hover .bottle-image img {
  transform: translateY(-5px); /* Simple Y translation only */
}

/* Staggered bottle animation for each card - disabled for performance */
.bottle-card:nth-child(1) .bottle-image,
.bottle-card:nth-child(2) .bottle-image,
.bottle-card:nth-child(3) .bottle-image,
.bottle-card:nth-child(4) .bottle-image {
  animation: none;
}

/* Card content */
.bottle-card-content {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 10;
}

/* Simplified bottle name for better performance */
.bottle-name {
  font-family: 'CASTELAR', serif;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  color: var(--black);
  margin-bottom: 0.7rem;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevents text wrapping */
  overflow: hidden; /* Ensures long names don't break layout */
  text-overflow: ellipsis; /* Shows ellipsis for overflowing text */
  max-width: 100%; /* Ensures fits within container */
}

/* Simplified underline for better performance */
.bottle-name::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: var(--gold-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Disabled for performance */
.bottle-name::before {
  display: none;
}

.bottle-card:hover .bottle-name {
  color: var(--gold-dark);
}

.bottle-card:hover .bottle-name::after {
  opacity: 1;
}

/* Bottle type description - simplified for performance */
.bottle-type {
  font-family: 'Julius Sans One', sans-serif;
  font-size: 0.95rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
  opacity: 0.9;
}

.bottle-card:hover .bottle-type {
  transform: translateY(-3px);
  letter-spacing: 0.25em;
  color: #a3834d;
}

/* Enhanced buttons with improved styling and animations */
.bottle-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  margin-top: auto;
  position: relative;
  z-index: 15; /* Ensure buttons are clickable */
}

.bottle-btn {
  position: relative;
  padding: 0.85rem 1.5rem;
  border-radius: 30px !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
  border: none;
  transform: translateY(0);
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.about-btn {
  background: transparent;
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  border-radius: 30px; /* Ensure consistently rounded buttons */
  padding: 0.85rem 1.6rem; /* Slightly more horizontal padding */
}

.buy-btn {
  background: var(--gold-gradient);
  color: var(--black);
  box-shadow: 0 5px 15px rgba(198, 165, 124, 0.3);
  border: 1px solid rgba(198, 165, 124, 0.1);
  border-radius: 30px; /* Ensure consistently rounded buttons */
  padding: 0.85rem 1.6rem; /* Slightly more horizontal padding */
}

/* Improved button hover effect with ripple */
.bottle-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: -1;
  transform: skewX(-15deg);
}

.bottle-btn:hover {
  transform: translateY(-5px);
  letter-spacing: 0.12em; /* Subtle letter spacing change on hover */
  padding: 0.85rem 1.7rem; /* Slightly expand on hover for a nice effect */
  border-radius: 30px !important; /* Force consistent rounded corners */
}

.bottle-btn:hover::before {
  left: 100%;
}

.about-btn:hover {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: transparent;
  border-radius: 30px !important; /* Maintain rounded appearance with !important */
}

.buy-btn:hover {
  background: var(--gold-gradient-hover);
  box-shadow: 0 8px 25px rgba(198, 165, 124, 0.5);
  border-radius: 30px !important; /* Maintain rounded appearance with !important */
}

/* Enhanced icon animations */
.bottle-btn i {
  margin-right: 8px; /* Increased spacing between icon and text */
  transition: all 0.3s var(--transition-smooth);
  font-size: 0.9em; /* Slightly smaller than text */
  opacity: 0.9;
}

.bottle-btn:hover i {
  opacity: 1;
  transform: translateY(-1px);
}

/* Refined icon pulse animation */
@keyframes buttonIconPulse {
  0% { transform: scale(1) translateY(-1px); }
  100% { transform: scale(1.3) translateY(-1px); }
}

/* Button press effect */
.bottle-btn:active {
  transform: translateY(-2px);
  transition: transform 0.1s;
}

/* Enhanced responsive adjustments */
@media (max-width: 1400px) {
  .bottle-grid {
    gap: 3rem;
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .bottle-grid {
    gap: 2.5rem;
    padding: 0 4%;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
  
  .bottle-card {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 992px) {
  .bottle-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
  }
  
  .bottle-image {
    height: 340px;
  }
  
  .bottle-card {
    padding: 2.5rem 1.8rem 1.8rem;
  }
  
  /* Reduce animation intensity on smaller screens */
  .bottle-card:hover {
    transform: translateY(-10px) scale(1.01);
  }
}

@media (max-width: 768px) {
  .collection-section {
    padding: 6rem 0;
  }
  
  .bottle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 600px;
  }
  
  .bottle-image {
    height: 300px;
    margin-bottom: 1.5rem;
  }
  
  .bottle-name {
    font-size: 1.7rem;
  }
  
  .bottle-type {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
  }
    /* Further reduce animations for mobile */
  .bottle-card:hover {
    transform: translateY(-8px);
  }
  
  .bottle-btn {
    min-width: 100px;
    padding: 0.75rem 1.4rem; /* Maintain good padding even on mobile */
  }
}

@media (max-width: 640px) {
  .bottle-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    gap: 3rem;
  }
  
  .bottle-card {
    max-width: 100%;
  }
  
  /* For mobile, make buttons stack for better usability */
  .bottle-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .bottle-btn {
    width: 100%;
    text-align: center;
    max-width: none;
  }
  
  /* Enable smaller devices to see nice animations too */
  .bottle-card:hover {
    transform: translateY(-10px) scale(1.03);
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .collection-section {
    padding: 5rem 0;
  }
  
  .bottle-image {
    height: 280px;
  }
  
  .section-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .section-subtitle {
    font-size: 0.9rem;
  }
}  .bottle-btn {
    width: 100%;
    text-align: center;
  }

/* Enhanced glass highlight effect with dynamic reflections - Simplified for performance */
.glass-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0) 100%);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

/* Simplified hover effect */
.bottle-card:hover .glass-highlight {
  opacity: 0.3;
}

/* Removed reflective accents for performance */
.glass-highlight::before,
.glass-highlight::after {
  display: none;
}

.glass-highlight::before {
  top: 20%;
  left: 15%;
}

.glass-highlight::after {
  top: 40%;
  right: 10%;
  width: 25px;
}

.bottle-card:hover .glass-highlight::before,
.bottle-card:hover .glass-highlight::after {
  opacity: 0.5;
}

/* Badge for special products - simplified for performance */
.bottle-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gold-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 1;
  z-index: 20;
}

.bottle-card:hover .bottle-badge {
  transform: scale(1);
  opacity: 1;
}

/* Button ripple effect */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s var(--transition-smooth);
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Decorative elements removed for performance */
.decorative-element,
.decorative-circle,
.decorative-diamond,
.top-left,
.bottom-right {
  display: none;
}

/* Removed floating animations for performance */
@keyframes float-diagonal {
  0% { transform: translate(0, 0); }
  100% { transform: translate(0, 0); }
}

/* Removed diagonal reverse animation for performance */