.categories-slider a {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: opacity var(--y-transition);
  cursor: pointer;
  padding: 0;
}
.categories-slider a img {
  width: 100%;
  height: auto;
  display: block;
}
.categories-slider a p {
  margin-top: var(--y-space-8);
  margin-bottom: 0;
  color: var(--y-color-text);
  font-weight: var(--y-text-bold);
  font-size: var(--y-text-md);
  text-align: center;
}
.categories-slider a:hover p {
  text-decoration: underline;
}
.categories-slider a:hover {
  opacity: 0.8;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  flex-wrap: wrap;
  gap: var(--y-space-16);
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--y-color-s-bg);
  border-radius: var(--y-radius-12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: box-shadow var(--y-transition), transform var(--y-transition);
  cursor: pointer;
  border: 1px solid var(--y-color-border);
}
.product-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}
.product-img {
  position: relative;
  padding: var(--y-space-16);
  background-color: var(--y-color-fg);
  border-top-left-radius: var(--y-radius-12);
  border-top-right-radius: var(--y-radius-12);
}

.product-img img:nth-child(2) {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 23px;
  height: auto;
  filter: grayscale(1);
}
.product-img img:nth-child(2):hover {
  filter: grayscale(0);
}
.product-content {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-16);
  padding: var(--y-space-16);
}
.product-content p {
  margin: var(--y-space-0);
}
.product-content .product-title {
  font-weight: var(--y-text-bold);
  color: var(--y-color-primary);
}
.product-content .product-description {
  font-size: var(--y-text-sm);
}
.product-actions {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  padding: var(--y-space-16);
}
.product-actions button {
  color: var(--y-color-primary);
  display: flex;
  gap: 10px;
  align-items: center;
}

.product-actions button:last-child {
  color: var(--y-color-primary);
}
.product-actions button:last-child img {
  width: 24px;
  height: 24px;
}

/* Add to Cart Button */
.product-add-to-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-add-to-cart-btn img {
  width: 24px;
  height: 24px;
}

.product-add-to-cart-btn:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.product-add-to-cart-btn.loading {
  pointer-events: none;
  opacity: 0.5;
}

.product-add-to-cart-btn.added {
  animation: addedToCart 0.5s ease;
}

@keyframes addedToCart {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@media (max-width: 767px) {
  .brands-section h2 {
    font-size: var(--y-text-2xl);
    margin-bottom: var(--y-space-12);
  }

  .brands-section p {
    font-size: var(--y-text-md);
    margin-bottom: var(--y-space-20);
  }

  .brands-slider {
    gap: var(--y-space-8);
  }

  .brands-slide-top,
  .brands-slide-bottom {
    gap: var(--y-space-8);
  }

  .brands-slider img {
    width: 120px;
  }

  .categories-slider {
    flex-wrap: wrap;
    align-items: center;
    gap: var(--y-space-8);
  }

  .categories-slider a {
    width: 100%;
    max-width: 200px;
    flex: none;
    padding: 0;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--y-space-16);
  }

  .product-img {
    padding: var(--y-space-12);
  }

  .product-content {
    padding: var(--y-space-12);
    gap: var(--y-space-8);
  }

  .product-actions {
    padding: var(--y-space-12);
    gap: var(--y-space-8);
  }

  .product-actions button {
    padding: var(--y-space-8) var(--y-space-16);
  }

  .product-actions button:last-child {
    align-self: center;
    width: auto;
  }

  .banner-section {
    gap: var(--y-space-8);
  }

  .messages-grid {
    gap: var(--y-space-8);
    grid-template-columns: repeat(1, 1fr);
  }

  .message-card {
    padding: var(--y-space-12);
    gap: var(--y-space-12);
  }

  .message-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--y-space-8);
  }

  .indecators {
    gap: var(--y-space-8);
    justify-content: center;
  }

  .indecator {
    padding: var(--y-space-6);
  }

  .indecator img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 575px) {
  .categories-slider a {
    max-width: 150px;
    padding: 0;
  }

  .categories-slider a img {
    width: 40px;
    height: 40px;
  }

  .categories-slider a p {
    font-size: var(--y-text-sm);
  }

  /* Keep 2 columns on mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--y-space-8);
  }

  .product-img {
    padding: var(--y-space-8);
  }

  .product-content {
    padding: var(--y-space-8);
    gap: var(--y-space-4);
  }

  .product-content .product-title {
    font-size: var(--y-text-sm);
  }

  .product-content .product-description {
    font-size: var(--y-text-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-actions {
    padding: var(--y-space-8);
    flex-direction: column;
    gap: var(--y-space-8);
  }

  .product-actions button,
  .product-actions a.product-add-to-cart {
    font-size: var(--y-text-xs);
    padding: var(--y-space-6) var(--y-space-8);
    width: 100%;
    justify-content: center;
  }

  .product-actions button:last-child {
    width: auto;
  }

  .indecator {
    padding: var(--y-space-4);
  }

  .indecator img {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 375px) {
  .categories-slider a {
    max-width: 120px;
    padding: 0;
  }

  .categories-slider a img {
    width: 30px;
    height: 30px;
  }

  /* Still keep 2 columns on very small screens */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--y-space-6);
  }

  .product-img {
    padding: var(--y-space-4);
  }

  .product-img img:first-child {
    max-height: 120px;
    object-fit: contain;
  }

  .product-content {
    padding: var(--y-space-6);
    gap: var(--y-space-4);
  }

  .product-content .product-title {
    font-size: var(--y-text-xs);
  }

  .product-content .product-description {
    font-size: 10px;
    -webkit-line-clamp: 2;
  }

  .product-actions {
    padding: var(--y-space-6);
  }

  .product-actions button,
  .product-actions a.product-add-to-cart {
    font-size: 10px;
    padding: var(--y-space-4) var(--y-space-6);
  }

  .product-actions button img,
  .product-actions a.product-add-to-cart img {
    width: 12px;
    height: 12px;
  }
}
.discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--y-color-primary);
  color: white;
  padding: var(--y-space-4) var(--y-space-16);
  border-top-right-radius: var(--y-space-20);
  border-bottom-left-radius: var(--y-space-20);
}

/* Wishlist icon states */
.wishlist-icon {
  cursor: pointer;
  transition: filter 0.3s ease;
}

.wishlist-icon.in-wishlist {
  filter: none !important;
}

.wishlist-icon.loading,
.product-add-to-wishlist.loading {
  pointer-events: none;
  opacity: 0.5;
}

.product-add-to-wishlist.in-wishlist img {
  filter: none;
}
