/* Shop Page Specific Styles */

/* Hero Section Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hero Section */
.bg-primary {
  background: var(--primary);
}

/* Search Section */
#shop-search {
  transition: all 0.3s ease;
}

#shop-search:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.15);
}

/* Filter Controls */
select {
  transition: all 0.3s ease;
}

select:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(138, 0, 0, 0.1);
}

/* View Toggle Buttons */
#grid-view,
#list-view {
  transition: all 0.3s ease;
}

#grid-view.active,
#list-view.active {
  background-color: var(--sqube-red);
  color: white;
  border-color: var(--sqube-red);
}

/* Product Cards */
.product-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(138, 0, 0, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Product Images */
.product-card img {
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

/* Wishlist Button */
.wishlist-btn {
  transition: all 0.3s ease;
}

.wishlist-btn:hover {
  transform: scale(1.1);
}

.wishlist-btn.active {
  background-color: var(--sqube-red);
  color: white;
}

/* Add to Cart Button */
.add-to-cart-btn {
  transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

/* Product Badges */
.absolute.top-3.left-3 span {
  animation: pulse 2s infinite;
}

/* Rating Stars */
.text-yellow-400 {
  color: #fbbf24;
}

/* Price Display */
.text-2xl.font-bold.text-primary {
  color: var(--sqube-red);
}

/* Grid Layout */
.grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3.xl\\:grid-cols-4 {
  animation: fadeInUp 0.6s ease-out;
}

/* List View Styles */
.list-view .product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 1rem;
}

.list-view .product-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-right: 1rem;
}

.list-view .product-card .p-6 {
  flex: 1;
  padding: 0;
}

/* Product Animation */
.product-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.product-card:nth-child(1) {
  animation-delay: 0.1s;
}
.product-card:nth-child(2) {
  animation-delay: 0.2s;
}
.product-card:nth-child(3) {
  animation-delay: 0.3s;
}
.product-card:nth-child(4) {
  animation-delay: 0.4s;
}
.product-card:nth-child(5) {
  animation-delay: 0.5s;
}
.product-card:nth-child(6) {
  animation-delay: 0.6s;
}
.product-card:nth-child(7) {
  animation-delay: 0.7s;
}
.product-card:nth-child(8) {
  animation-delay: 0.8s;
}

/* Load More Button */
#load-more-btn {
  transition: all 0.3s ease;
}

#load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Newsletter Form */
#newsletter-form input {
  transition: all 0.3s ease;
}

#newsletter-form input:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(138, 0, 0, 0.1);
}

#newsletter-form button {
  transition: all 0.3s ease;
}

#newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(138, 0, 0, 0.2);
}

/* Filter Animation */
.filter-section {
  animation: slideInFromLeft 0.6s ease-out;
}

/* Product Count */
#product-count {
  font-weight: 600;
  color: var(--sqube-red);
}

/* Search Results Highlighting */
.search-highlight {
  background-color: rgba(138, 0, 0, 0.1);
  border-radius: 4px;
  padding: 2px 4px;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-style: italic;
}

.no-results i {
  color: #ccc;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--sqube-red);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Cart Animation */
.cart-animation {
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%,
  20%,
  60%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}

/* Wishlist Animation */
.wishlist-animation {
  animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3.xl\\:grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .product-card {
    animation: none;
  }

  .list-view .product-card {
    flex-direction: column;
    text-align: center;
  }

  .list-view .product-card img {
    width: 100%;
    height: 200px;
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .flex.justify-between.items-center {
    flex-direction: column;
    gap: 1rem;
  }

  .flex.items-center.space-x-4 {
    justify-content: center;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .bg-background {
    background-color: #1a1a1a;
  }

  .bg-background {
    background-color: #2d2d2d;
    color: #ffffff;
  }

  .text-text {
    color: #a0a0a0;
  }

  .border-gray-300 {
    border-color: #4a4a4a;
  }

  .product-card {
    background-color: #2d2d2d;
    border-color: #4a4a4a;
  }

  .product-card:hover {
    border-color: rgba(138, 0, 0, 0.3);
  }
}

/* Accessibility */
.product-card:focus-within {
  outline: 2px solid var(--sqube-red);
  outline-offset: 2px;
}

.add-to-cart-btn:focus,
.wishlist-btn:focus {
  outline: 2px solid var(--sqube-red);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .wishlist-btn,
  .add-to-cart-btn {
    display: none;
  }

  .bg-primary {
    background: var(--sqube-red) !important;
    -webkit-print-color-adjust: exact;
  }
}
