/* Product Page Styles - Separate from navigation to avoid conflicts */

/* CSS Reset for Product Images - Force Square Corners */
.product-page .product-card img,
.product-page .product-image img,
.product-card img,
.product-image img {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
  -ms-border-radius: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
}

:root {
  --black: #000;
  --white: #fff;
  --font: 'Helvetica Neue', sans-serif;
}

/* Product page content styles - scoped to avoid navigation conflicts */
.product-page {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  /* Add top padding to account for fixed navbar */
  padding-top: 60px;
}

/* Global image reset for product cards */
.product-page img {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
  border: none !important;
}

/* Force remove all border radius from product images */
.product-card img,
.product-image img,
.product-page .product-card img,
.product-page .product-image img {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
  -ms-border-radius: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Override any inherited border radius */
.product-card *,
.product-image * {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
  -ms-border-radius: 0 !important;
}

@media (max-width: 767px) {
  .product-page {
    padding-top: 55px;
  }
}

/* Product page content styles - scoped to avoid navigation conflicts */
.product-page .page-title,
.product-page .hero-image,
.product-page .filter-bar,
.product-page .products,
.product-page .load-more-wrapper {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page-title {
  height: 22vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
}

.hero-image {
  height: 62vh;
  background: #e6e4df;
  overflow: hidden;
  position: relative;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  font-size: 0.7rem;
  border-block: 1px solid var(--black);
  min-height: 56px;
  box-sizing: border-box;
  overflow: visible;
  line-height: 1.4;
}

.filter-bar > div {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: visible;
  line-height: 1.4;
}

.filter-bar > div:first-child {
  flex: 1;
  min-width: 0;
}

.filter-bar > div:last-child {
  flex-shrink: 0;
  gap: 20px;
  display: flex;
  align-items: center;
}

.filter-bar span {
  cursor: pointer;
  transition: opacity 0.3s ease;
  display: inline-block;
  line-height: 1.4;
  vertical-align: middle;
  padding: 2px 0;
}

.filter-bar span:hover {
  opacity: 0.7;
}

/* Additional mobile improvements for filter bar */
@media (max-width: 767px) {
  .filter-bar {
    padding: 14px 20px !important;
    min-height: 50px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }
  
  .filter-bar > div:last-child {
    gap: 15px !important;
  }
  
  .filter-bar span {
    font-size: 0.75rem;
    padding: 3px 0;
  }
}

@media (max-width: 480px) {
  .filter-bar {
    padding: 12px 16px !important;
    min-height: 46px !important;
    overflow: visible !important;
  }
  
  .filter-bar > div:last-child {
    gap: 12px !important;
  }
  
  .filter-bar span {
    font-size: 0.7rem;
    padding: 3px 0;
  }
}

/* CRITICAL FIX: Override all conflicting filter-bar styles */
.filter-bar {
  padding: 18px 40px !important;
  min-height: 60px !important;
  overflow: visible !important;
  line-height: 1.6 !important;
  box-sizing: border-box !important;
  position: relative !important; /* ensure dropdown positioning context */
}

.filter-bar > div {
  overflow: visible !important;
  line-height: 1.6 !important;
}

.filter-bar > div:last-child {
  position: relative !important; /* ensure sort dropdown positioning */
  overflow: visible !important;
}

.filter-bar span {
  padding: 4px 0 !important;
  line-height: 1.6 !important;
  vertical-align: middle !important;
}

/* Mobile specific overrides */
@media (max-width: 767px) {
  .filter-bar {
    padding: 16px 20px !important;
    min-height: 56px !important;
  }
}

@media (max-width: 480px) {
  .filter-bar {
    padding: 14px 16px !important;
    min-height: 52px !important;
  }
}

/* Load More Button Wrapper Styling */
.load-more-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 30px !important;
  padding-bottom: 30px !important;
  margin-top: 0 !important;
  margin-bottom: 30px !important;
  width: 100%;
}

/* Specific targeting for load more wrapper */
.product-page .load-more-wrapper {
  padding-top: 30px !important;
  padding-bottom: 30px !important;
  margin-top: 0 !important;
}

/* Load-more-button styles are now defined below with other buttons */

/* Mobile responsive adjustments for load more */
@media (max-width: 767px) {
  .load-more-wrapper {
    padding-top: 30px;
    padding-bottom: 30px;
    margin-top: 0;
    margin-bottom: 30px;
  }
  
  .load-more-button {
    padding: 16px 28px !important;
    font-size: 0.65rem !important;
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .load-more-wrapper {
    padding-top: 30px;
    padding-bottom: 30px;
    margin-top: 0;
    margin-bottom: 30px;
  }
  
  .load-more-button {
    padding: 14px 24px !important;
    font-size: 0.6rem !important;
    min-width: 120px;
  }
}

.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--black);
  border-left: 1px solid var(--black);
  gap: 0;
  padding-bottom: 30px !important;
}

/* Specific targeting for product grid */
#productGrid {
  padding-bottom: 30px !important;
}

.product-page .products {
  padding-bottom: 30px !important;
}

.product-page #productGrid {
  padding-bottom: 30px !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) and (min-width: 768px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-image {
    height: auto;
    aspect-ratio: 3 / 4;
    min-height: 0 !important;
  }
  
  .filter-bar {
    padding: 8px 20px;
    font-size: 0.75rem;
  }

  .page-title {
    height: 15vh;
    font-size: 0.9rem;
  }

  .hero-image {
    height: 50vh;
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr;
  }
  
  .product-image {
    height: auto;
    aspect-ratio: 3 / 4;
    min-height: 0 !important;
    border-radius: 0;
  }
  
  /* Mobile styles handled by main .product-image img rule above */
}

.product-card {
  position: relative;
  text-align: center;
  padding: 0;
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  opacity: 1;
  transform: none;
  transition: none;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}

.product-card.visible {
  opacity: 1;
  transform: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
  display: block;
  background: #f0f0f0;
  font-size: 0.9rem;
  color: #888;
  transition: none;
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

/* REMOVED: Placeholder text - causing conflicts with images */
/* .product-image::after {
  content: 'SÓKARINA';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  color: #888;
  z-index: 0;
  display: block;
  letter-spacing: 2px;
  pointer-events: none;
} */

/* Placeholder text completely removed - no longer needed */

/* Removed duplicate rule */



.product-image .placeholder-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  font-size: 0.9rem;
  color: #888;
  z-index: 0;
  border-radius: 0;
}

/* CONSOLIDATED: Ensure images fill the entire container and display correctly */
.product-image img,
.product-page .product-image img,
.products .product-image img,
#productGrid .product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 10 !important; /* Higher z-index to ensure visibility */
  display: block !important;
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
  -ms-border-radius: 0 !important;
  /* Ensure proper image display */
  /* Force visibility */
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  /* Ensure proper display */
  clip: auto !important;
  clip-path: none !important;
  transform: none !important;
  outline: none !important;
  box-shadow: none !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  /* Remove conflicting properties */
  transform: none !important;
  /* Ensure proper image display */
  /* AGGRESSIVE DEBUG: Force visibility */
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Hide any text that might show behind images */
.product-image {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
  width: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 3 / 4;
  height: auto;
}

/* Removed duplicate rule - placeholder text completely removed */

/* Removed text color rules - placeholder text completely removed */

.product-image::before {
  content: none;
}

/* NEW badge styling */
.new-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #ff4444;
  color: white;
  padding: 4px 8px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 0;
  z-index: 2;
  text-transform: uppercase;
}

/* Hover styles handled by main .product-image img rule above */

.product-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.product-card p,
.product-card .price {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
}

.product-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 2.75rem 1rem 1.45rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-info .discover-btn {
  pointer-events: auto;
}

.product-card .swatches:empty {
  display: none !important;
}

.product-card .swatches:not(:empty) {
  position: absolute;
  left: 50%;
  bottom: 5.25rem;
  transform: translateX(-50%);
  z-index: 21;
  margin: 0;
}

/* Full-bleed media carousel */
.product-media-track {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: hidden; /* JS-owned horizontal swipe */
  overflow-y: hidden;
  scroll-snap-type: none;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-width: none;
  z-index: 6;
  /* Allow normal vertical page scroll; JS claims only clear horizontal swipes */
  touch-action: pan-y;
  cursor: default;
}

.product-image.has-gallery .product-media-track {
  cursor: grab;
  overflow-x: hidden;
}

.product-image.has-gallery .product-media-track.is-dragging {
  cursor: grabbing;
  touch-action: none; /* only while locked to a horizontal swipe */
}

.product-media-track::-webkit-scrollbar {
  display: none;
}

.product-media-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
  transform: translateZ(0);
}

.product-media-slide img,
.product-image .product-media-slide img,
#productGrid .product-media-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  z-index: 1 !important;
  pointer-events: none;
  transform: none !important;
  border-radius: 0 !important;
  user-select: none;
  -webkit-user-drag: none;
}

/* Dior-style thick stroke indicators on card bottom edge */
.product-media-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 3px;
  padding: 0;
  margin: 0;
  background: transparent;
  pointer-events: auto;
}

.product-media-progress__seg {
  flex: 1 1 0;
  height: 3px;
  min-height: 3px;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: none;
}

.product-media-progress__seg.is-active {
  background: #fff;
}

.product-media-progress.is-single .product-media-progress__seg {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* Minimal Discover CTA */
.product-card .discover-btn.view-button {
  display: inline-block !important;
  margin-top: 0.85rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.product-card .discover-btn.view-button:hover {
  opacity: 0.55;
  background: transparent;
  color: #fff;
}

.bookmark-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  padding: 0;
  width: auto;
  height: auto;
  min-width: 1.5rem;
  min-height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
  z-index: 40 !important;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 0 !important;
  box-shadow: none;
}

.bookmark-icon ion-icon {
  font-size: 1.2rem;
  color: #111;
  opacity: 1;
  pointer-events: none;
  transition: color 0.2s ease, opacity 0.25s ease;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.85));
}

.bookmark-icon:hover {
  opacity: 0.55;
}

.bookmark-icon:hover ion-icon {
  opacity: 1;
  transform: none;
}

.bookmark-icon.active ion-icon,
.bookmark-icon.is-active ion-icon,
.recommendation-wishlist.is-active ion-icon {
  color: #e31c23 !important;
  opacity: 1;
  filter: none;
}

.bookmark-icon:focus {
  outline: none;
}

.bookmark-icon:focus-visible {
  outline: 1px solid #111;
  outline-offset: 4px;
}

.preorder-button:focus {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

.swatch:focus {
  outline: 2px solid var(--black);
  outline-offset: 1px;
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  max-width: 100%;
  padding: 4px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  backdrop-filter: blur(10px);
}

/* Ensure only 2 swatches are visible */
.swatches .swatch:nth-child(n+3) {
  display: none !important;
}

.swatch {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  background-color: inherit;
  flex-shrink: 0;
  position: relative;
}

.swatch:hover {
  transform: scale(1.15);
  border: 2px solid rgba(0,0,0,0.3);
}

.swatch.selected {
  border: 2px solid var(--black);
  transform: scale(1.2);
}

.swatch.selected::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--black);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

.preorder-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #111;
  color: #fff;
  padding: 0.35rem 0.55rem;
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 42;
  pointer-events: none;
  border: none;
}

.sold-out {
  font-size: 0.7rem;
  color: #999;
  margin-top: 2px;
}

.notify-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.notify-button,
.view-button,
.preorder-button {
  background: transparent;
  border: 1px solid var(--black);
  padding: 6px 16px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
  font-family: var(--font);
  text-decoration: none;
  color: var(--black);
}

/* Separate styling for load-more-button to avoid conflicts */
.load-more-button {
  background: transparent !important;
  border: 1px solid var(--black) !important;
  padding: 18px 32px !important;
  font-size: 0.7rem !important;
  letter-spacing: 1.5px !important;
  cursor: pointer !important;
  transition: 0.3s !important;
  font-family: var(--font) !important;
  text-decoration: none !important;
  color: var(--black) !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  min-width: 160px !important;
  text-align: center !important;
}

.notify-button:hover,
.view-button:hover,
.load-more-button:hover,
.preorder-button:hover {
  background: var(--black);
  color: var(--white);
}

.view-button {
  display: inline-block;
  margin-top: 12px;
}

.preorder-button {
  margin-top: 12px;
}

.product-actions {
  margin-top: 8px;
}

/* Modal styles - scoped to product page only */
.product-page .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.product-page .modal-overlay.active {
  display: flex;
}

.product-page .modal-content {
  background: var(--white);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.product-page .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--black);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-image {
    height: auto;
    aspect-ratio: 3 / 4;
    min-height: 0 !important;
  }
  
  .filter-bar {
    padding: 8px 20px;
    font-size: 0.75rem;
  }

  .page-title {
    height: 15vh;
    font-size: 0.9rem;
  }

  .hero-image {
    height: 50vh;
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr;
  }
  
  .product-image {
    height: auto;
    aspect-ratio: 3 / 4;
    min-height: 0 !important;
  }
}

/* Responsive swatch adjustments for preorder */
@media (max-width: 767px) {
  .swatches {
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
    padding: 3px;
    border-radius: 16px;
  }
  
  .swatch {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .swatches {
    gap: 5px;
    margin-top: 8px;
    justify-content: center;
    padding: 2px;
    border-radius: 12px;
  }
  
  .swatch {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
}

/* CRITICAL OVERRIDE: Force spacing between products and load more button */
.products,
#productGrid,
.product-page .products,
.product-page #productGrid {
  padding-bottom: 30px !important;
  margin-bottom: 0 !important;
}

.load-more-wrapper,
.product-page .load-more-wrapper {
  padding-top: 30px !important;
  margin-top: 0 !important;
  padding-bottom: 30px !important;
}

/* Mobile overrides */
@media (max-width: 767px) {
  .products,
  #productGrid,
  .product-page .products,
  .product-page #productGrid {
    padding-bottom: 30px !important;
  }
  
  .load-more-wrapper,
  .product-page .load-more-wrapper {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
}

@media (max-width: 480px) {
  .load-more-wrapper,
  .product-page .load-more-wrapper {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
}

/* FILTER AND SORT UI - LUXURY MINIMAL DESIGN */

/* Filter Modal */
.filter-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* High enough to be above everything except navigation modals */
  backdrop-filter: blur(8px);
}

.filter-modal.active {
  display: flex;
}

.filter-content {
  background: var(--white);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--black);
  animation: filterSlideIn 0.3s ease-out;
  z-index: 10001; /* ensure content above overlay */
  pointer-events: auto;
}

@keyframes filterSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.filter-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--black);
  padding: 4px;
  transition: opacity 0.3s ease;
}

.filter-close:hover {
  opacity: 0.7;
}

.filter-body {
  padding: 32px;
}

.filter-section {
  margin-bottom: 32px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--black);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 0;
  transition: opacity 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* Removed - we don't want the entire option to be highlighted */

.filter-option:hover {
  opacity: 0.7;
}

.filter-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid var(--black);
  background: transparent;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
}

.filter-checkbox.checked {
  background: var(--black);
}

.filter-checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: bold;
}

.filter-label {
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  color: var(--black);
  pointer-events: auto;
  cursor: pointer;
}

/* Removed - we don't want the entire option to be highlighted when selected */

.filter-actions {
  padding: 24px 32px;
  border-top: 1px solid var(--black);
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}

.filter-btn {
  padding: 12px 24px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font);
  font-weight: 500;
}

.filter-btn:hover {
  background: var(--black);
  color: var(--white);
}

.filter-btn.primary {
  background: var(--black);
  color: var(--white);
}

.filter-btn.primary:hover {
  background: transparent;
  color: var(--black);
}

/* Sort Dropdown */
.sort-dropdown {
  position: relative;
  display: inline-block;
  z-index: 999; /* Lower z-index to stay below navigation modals */
  overflow: visible !important; /* ensure menu can appear */
}

.sort-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border: 1px solid var(--black);
  min-width: 200px;
  display: none;
  z-index: 999; /* Lower z-index to stay below navigation modals */
  animation: sortSlideIn 0.2s ease-out;
  pointer-events: auto;
}

@keyframes sortSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sort-menu.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.sort-option {
  padding: 14px 20px;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
  color: var(--black);
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 1;
}

.sort-option.selected::after {
  content: '•';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
}

.sort-option:last-child {
  border-bottom: none;
}

.sort-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

.sort-option.selected {
  background: var(--black);
  color: var(--white);
}

/* Active Filter Indicators */
.filter-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--black);
  border-radius: 50%;
  display: none;
}

.filter-indicator.active {
  display: block;
}

#openFilter {
  position: relative;
  cursor: pointer;
  pointer-events: auto;
}

#openSort {
  position: relative;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10001; /* above menu container */
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .filter-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .filter-header {
    padding: 20px 24px;
  }
  
  .filter-body {
    padding: 24px;
  }
  
  .filter-actions {
    padding: 20px 24px;
  }
  
  .sort-menu {
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .filter-content {
    width: 98%;
    max-height: 90vh;
  }
  
  .filter-header {
    padding: 16px 20px;
  }
  
  .filter-body {
    padding: 20px;
  }
  
  .filter-actions {
    padding: 16px 20px;
    flex-direction: column;
  }
  
  .filter-btn {
    width: 100%;
    text-align: center;
  }
  
  .sort-menu {
    min-width: 160px;
    right: -20px;
  }
}

/* Ensure background images show even if <img> fails */
.product-image {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  background-clip: border-box !important;
  background-origin: padding-box !important;
  /* DEBUG: Make background images more visible */
  min-height: 200px !important;
  background-color: #e0e0e0 !important;
}
