/* ============================================
   COLLECTION PAGE ENHANCEMENTS
   Proper spacing, responsiveness, premium look
   ============================================ */

/* Collection Page Header Improvements */
.collection-page .collection-header,
.collection-page-header {
  padding: 40px 0 24px;
  text-align: center;
}

.collection-page .collection-header h1,
.collection-page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.collection-page .collection-header p,
.collection-page-header p {
  color: #888;
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}

/* Filter Bar Improvements */
.collection-page .filter-bar,
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f0ece4;
  margin-bottom: 28px;
}

.filter-bar .result-count {
  font-size: 14px;
  color: #888;
}

.filter-bar .sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-bar select {
  padding: 8px 32px 8px 14px;
  border: 1px solid #e0dbd2;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* Collection Product Grid — Desktop */
.collection-page .product-grid-3,
.collection-page .product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  padding: 0 !important;
  overflow: visible !important;
  flex-wrap: wrap !important;
  max-width: 100%;
}

/* Product Cards in Collection Page */
.collection-page .product-card {
  width: 100% !important;
  min-width: unset !important;
  max-width: unset !important;
  flex-shrink: unset !important;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
  border: 1px solid #f0ece4;
}

.collection-page .product-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08) !important;
  border-color: #e0dbd2;
}

.collection-page .product-card .product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: #f8f6f2;
}

.collection-page .product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.collection-page .product-card:hover .product-image img {
  transform: scale(1.05);
}

.collection-page .product-card .product-info {
  padding: 14px 16px 18px;
}

.collection-page .product-card .product-info h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 6px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-page .product-card .product-info h3 a {
  color: inherit;
  text-decoration: none;
}

.collection-page .product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.collection-page .product-price .current {
  font-size: 15px;
  font-weight: 700;
  color: #2d2d2d;
}

.collection-page .product-price .original {
  font-size: 13px;
  color: #aaa;
  text-decoration: line-through;
}

.collection-page .product-price .discount {
  font-size: 11px;
  font-weight: 600;
  color: #d4402b;
  background: #fef2f0;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Collection Page Container */
.collection-page .container,
.collection-page > section > .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Responsive: Tablet ---- */
@media (max-width: 1024px) {
  .collection-page .product-grid-3,
  .collection-page .product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
  }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
  .collection-page .product-grid-3,
  .collection-page .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
    display: grid !important;
    overflow: visible !important;
    flex-wrap: wrap !important;
  }
  
  .collection-page .product-card {
    width: 100% !important;
    min-width: unset !important;
    max-width: unset !important;
  }
  
  .collection-page .product-card:hover {
    transform: none !important;
  }

  .collection-page .product-card .product-info {
    padding: 10px 12px 14px;
  }

  .collection-page .product-card .product-info h3 {
    font-size: 13px;
  }

  .collection-page .product-price .current {
    font-size: 14px;
  }

  .collection-page .collection-header,
  .collection-page-header {
    padding: 24px 0 16px;
  }

  .collection-page .collection-header h1,
  .collection-page-header h1 {
    font-size: 1.5rem;
  }

  .filter-bar {
    margin-bottom: 16px;
    padding: 8px 0 14px;
  }
}

/* ---- Responsive: Small Mobile ---- */
@media (max-width: 480px) {
  .collection-page .product-grid-3,
  .collection-page .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  .collection-page .product-card .product-info {
    padding: 8px 10px 12px;
  }

  .collection-page .product-card .product-info h3 {
    font-size: 12px;
  }

  .collection-page .product-price .current {
    font-size: 13px;
  }

  .collection-page .product-price .original {
    font-size: 11px;
  }
}

/* Banner preload performance */
.hero-slider img {
  will-change: opacity;
}

.hero-slide img {
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
