@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Cormorant+Garamond:wght@400;600&display=swap');

.font-cinzel { font-family: 'Cinzel', serif; }
.font-cormorant { font-family: 'Cormorant Garamond', serif; }

.hover-scale {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: white;
  border-radius: 0.25rem;
  overflow: hidden;
}

.hover-scale:hover {
  transform: translateY(-7px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.hover-scale:hover::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #92400e;
  border-radius: 0.25rem;
  opacity: 0.3;
  pointer-events: none;
}

.hover-scale:hover .product-btn {
  background-color: #78350f;
  transform: translateY(-2px);
}

.hover-scale:hover img {
  transform: scale(1.1);
}

.aspect-square {
  position: relative;
  overflow: hidden;
}

.aspect-square img {
  transition: transform 0.5s ease;
}

#product-grid > div {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#product-grid > div:nth-child(1) { animation-delay: 0.1s; }
#product-grid > div:nth-child(2) { animation-delay: 0.15s; }
#product-grid > div:nth-child(3) { animation-delay: 0.2s; }
#product-grid > div:nth-child(4) { animation-delay: 0.25s; }
#product-grid > div:nth-child(5) { animation-delay: 0.3s; }
#product-grid > div:nth-child(6) { animation-delay: 0.35s; }
#product-grid > div:nth-child(7) { animation-delay: 0.4s; }
#product-grid > div:nth-child(8) { animation-delay: 0.45s; }
#product-grid > div:nth-child(9) { animation-delay: 0.5s; }
#product-grid > div:nth-child(n+10) { animation-delay: 0.55s; }

.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem;
}

.product-name {
  min-height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-btn {
  margin-top: auto;
}

.product-btn {
  display: inline-block;
  background-color: #92400e;
  color: white;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  text-align: center;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.product-btn:hover {
  background-color: #78350f;
}

.product-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.product-btn:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

#category-dropdown {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#dropdown-menu {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-height: 300px;
  overflow-y: auto;
  z-index: 50;
}

#dropdown-menu:not(.hidden) {
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#product-search {
  transition: all 0.3s ease;
  border: 1px solid #e7e5e4;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  width: 100%;
  font-family: 'Cormorant Garamond', serif;
  background-color: white;
  font-size: 1.1rem;
}

#product-search:focus {
  outline: none;
  border-color: #92400e;
  box-shadow: 0 0 0 3px rgba(146, 64, 14, 0.1);
}

.search-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a8a29e;
  transition: color 0.3s ease;
}

#product-search:focus + .search-icon {
  color: #92400e;
}

#no-results {
  padding: 3rem 1rem;
  text-align: center;
}

#reset-filters {
  background-color: #92400e;
  color: white;
  font-family: 'Cinzel', serif;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#reset-filters:hover {
  background-color: #78350f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .search-container {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .product-name {
    min-height: 3em;
  }
}

@media (max-width: 768px) {
  .product-name {
    min-height: 2.5em;
  }
  
  #dropdown-menu {
    max-height: 250px;
  }
}

@media (max-width: 640px) {
  #product-grid {
    gap: 1rem;
  }
  
  .product-name {
    font-size: 1rem;
  }
  
  .product-info {
    padding: 0.75rem;
  }
}

#product-grid {
  padding: 0.5rem;
}

.product-price {
  color: #92400e;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0.5rem 0 1rem 0;
}

.hover-indicator {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #92400e;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hover-scale:hover .hover-indicator {
  opacity: 1;
  transform: scale(1.5);
}