/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 10px;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.sold-out-card .product-image-main {
  opacity: 0.4;
}

.sold-out-card .product-image-hover {
  opacity: 0;
}

.sold-out-card .product-info {
  opacity: 0.4;
}

.sold-out-card .link {
  pointer-events: none; /* Explicitly disable links */
}

.sold-out-card .color-swatches {
  pointer-events: none; /* Disable color swatches */
}

.sold-out-card:hover .product-image-main {
  opacity: 0.4;
}

.sold-out-card:hover .product-image-hover {
  opacity: 0; /* Keep hidden */
}

.sold-out-card:hover .product-info-hover {
  display: none; /* Don't show hover info */
}

.sold-out-card:hover .product-info-default {
  display: block; /* Keep default info visible */
}

.sold-out-card:hover .color-swatches {
  opacity: 0; /* Keep swatches hidden */
}

/* Product Images */
.product-image-container {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.product-image-hover {
  opacity: 0;
}

/* Hover Effects (for available products only) */
.product-card:not(.sold-out-card):hover .product-image-main {
  opacity: 0;
}

.product-card:not(.sold-out-card):hover .product-image-hover {
  opacity: 1;
}

.product-card:not(.sold-out-card):hover .product-info-default {
  display: none;
}

.product-card:not(.sold-out-card):hover .product-info-hover {
  display: block;
}

/* Product Info */
.product-info {
  transition: all 0.3s ease;
  text-align: center;
}

.product-info-hover {
  display: none;
}

.product-info-default {
  display: block;
}

/* Color Swatches */

.product-card:not(.sold-out-card):hover .color-swatches {
  opacity: 1;
}

/* Color fallbacks for common colors */
.color-swatch[data-color="white"] {
  background-color: #ffffff !important;
  border: 1px solid #e0e0e0;
}
.color-swatch[data-color="black"] {
  background-color: #000000 !important;
}
.color-swatch[data-color="red"] {
  background-color: #ff0000 !important;
}
.color-swatch[data-color="blue"] {
  background-color: #0000ff !important;
}
.color-swatch[data-color="green"] {
  background-color: #008000 !important;
}
.color-swatch[data-color="yellow"] {
  background-color: #ffff00 !important;
}
.color-swatch[data-color="pink"] {
  background-color: #ffc0cb !important;
}
.color-swatch[data-color="purple"] {
  background-color: #800080 !important;
}
.color-swatch[data-color="orange"] {
  background-color: #ffa500 !important;
}
.color-swatch[data-color="brown"] {
  background-color: #a52a2a !important;
}
.color-swatch[data-color="gray"],
.color-swatch[data-color="grey"] {
  background-color: #808080 !important;
}
.color-swatch[data-color="navy"] {
  background-color: #000080 !important;
}
.color-swatch[data-color="beige"] {
  background-color: #f5f5dc !important;
}
.color-swatch[data-color="cream"] {
  background-color: #fffdd0 !important;
}
.color-swatch[data-color="ivory"] {
  background-color: #fffff0 !important;
}
.color-swatch[data-color="khaki"] {
  background-color: #f0e68c !important;
}
.color-swatch[data-color="tan"] {
  background-color: #d2b48c !important;
}
.color-swatch[data-color="maroon"] {
  background-color: #800000 !important;
}
.color-swatch[data-color="olive"] {
  background-color: #808000 !important;
}
.color-swatch[data-color="lime"] {
  background-color: #00ff00 !important;
}
.color-swatch[data-color="aqua"] {
  background-color: #00ffff !important;
}
.color-swatch[data-color="teal"] {
  background-color: #008080 !important;
}
.color-swatch[data-color="silver"] {
  background-color: #c0c0c0 !important;
}
.color-swatch[data-color="gold"] {
  background-color: #ffd700 !important;
}

.product-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.product-price {
  font-size: 14px;
  margin-top: 5px;
}

.product-detail {
  font-size: 14px;
  line-height: 1.4;
}

.product-detail strong {
  font-weight: 500;
}

/* Price Styling */
.price-sale {
  color: #000;
}

.price-compare {
  text-decoration: line-through;
  opacity: 0.6;
  margin-left: 8px;
}

/* Empty Collection */
.empty-collection {
  grid-column: 1 / -1;
  padding: 60px 20px;
  font-size: 18px;
}

/* Pagination */
.pagination {
  margin-top: 60px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #000;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background-color: #000;
  color: #fff;
}

.pagination .current {
  background-color: #000;
  color: #fff;
}

@media (max-width: 768px) {
  .filter-groups {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
}

.filter-label {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.filter-btn {
  color: #000;
  padding: 5px 0;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.filter-btn.inactive {
  opacity: 0.4;
  text-decoration: none;
}

/* Mobile Filter Button */
.mobile-filter-trigger {
  padding: 20px 0;
  border-bottom: 1px solid #000;
}

.mobile-filter-btn {
  background: none;
  border: none;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

/* Mobile Filter Popup */
.mobile-filter-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-filter-popup.active {
  opacity: 1;
  visibility: visible;
}

.mobile-filter-content {
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.mobile-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
}

.mobile-filter-title {
  width: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
}

.mobile-filter-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #000;
  font-family: inherit;
  position: absolute;
  right: 20px;
}

.close-icon {
  width: 24px;
  height: 24px;
  @media (max-width: 980px) {
    width: 20px;
    height: 20px;
  }
}

.mobile-filter-body {
  flex: 1;
}

/* Mobile Filter Sections */
.mobile-filter-section {
  margin-bottom: 0;
  border-bottom: 1px solid #000;
}

.mobile-toggle-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  color: #000;
  font-family: inherit;
  position: relative;
}

.toggle-icon {
  font-size: 20px;
  font-weight: 300;
  position: absolute;
  right: 0;
}

.mobile-filter-options {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0;
}

.mobile-filter-options.expanded {
  max-height: 300px;
  padding-bottom: 20px;
}

.mobile-option-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 15px 0;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  color: #000;
  text-decoration: underline;
  transition: all 0.3s ease;
  font-family: inherit;
  letter-spacing: 0.08em;
  line-height: 1;
}

.mobile-option-btn:hover {
  opacity: 0.7;
}

.mobile-option-btn.inactive {
  opacity: 0.4;
  text-decoration: none;
}

/* Mobile Breadcrumb */
.mobile-breadcrumb {
  padding: 20px 0;
  font-size: 14px;
  letter-spacing: 1px;
}

/* Mobile filter action buttons */
.mobile-filter-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.mobile-clear-btn,
.mobile-deselect-btn,
.mobile-apply-btn {
  border: 1px solid #000;
  padding: 20px 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  position: relative;
  flex: 1;
}

.mobile-clear-btn,
.mobile-deselect-btn {
  background: transparent;
  color: #000;
}

.mobile-clear-btn:hover,
.mobile-deselect-btn:hover {
  background: #f5f5f5;
}

.mobile-apply-btn {
  background: #000;
  color: #fff;
}

.mobile-apply-btn:hover {
  background: #d9d9d9;
  border-color: #d9d9d9;
  color: #000;
}

.mobile-apply-btn:active {
  background: #000;
  border-color: #000;
  color: #fff;
}

.mobile-apply-btn::after {
  content: ">";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: normal;
}

/* Breadcrumb */
.breadcrumb-section {
  padding-top: 40px;
}

.breadcrumb {
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 40px;
}

/* Product filtering transitions */
.product--card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product--card.hidden {
  display: none;
}

/* No results message */
.no-results-message {
  grid-column: 1 / -1;
  padding: 60px 20px;
}

.no-results-message h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
}

.no-results-message p {
  font-size: 16px;
  opacity: 0.7;
}

.clear-filters-btn {
  background: #000;
  color: #fff;
  border: 1px solid #000;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.clear-filters-btn:hover {
  background: transparent;
  color: #000;
}

/* Mobile banner adjustments */
@media (max-width: 768px) {
  .m-p0 {
    padding: 0 !important;
  }

  .m-banner-mobile {
    height: 260px !important;
  }
}
