.collection-page,
.collection-page body {
  overflow-x: hidden;
}

.collection-page main {
  overflow: visible;
}

.breadcrumb {
  background-color: #f8f9fa;
  padding: 15px 0;
  border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 14px;
  color: #666;
}

.breadcrumb-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 10px;
  color: #999;
}

.breadcrumb-current {
  color: #333;
  font-weight: 600;
}

.collection-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 40px;
}

.collection-header-content {
  max-width: 800px;
  margin: 0 auto;
}

.collection-title {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.collection-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
  font-weight: 300;
}

.collection-controls {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 18px 0;
  margin-bottom: 40px;
  position: static;
  top: auto;
  z-index: auto;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.controls-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  flex-wrap: wrap;
}

.filter-section {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1 1 420px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1 1 260px;
}

.category-filter {
  flex: 0 0 auto;
}

.collection-search-input,
.collection-category-select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.collection-search-input::placeholder {
  color: #9aa3af;
}

.collection-search-input:focus,
.collection-category-select:focus,
.sort-select:focus {
  outline: none;
  border-color: rgba(124, 90, 19, 0.45);
  box-shadow: 0 0 0 3px rgba(245, 193, 64, 0.16);
}

.sort-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.sort-select {
  min-height: 48px;
  min-width: 220px;
  padding: 0 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  font-size: 14px;
  color: #333;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.sort-select:hover {
  border-color: rgba(124, 90, 19, 0.45);
}

.view-section {
  display: flex;
  gap: 8px;
}

.view-btn {
  padding: 10px;
  border: 2px solid #e0e0e0;
  background-color: white;
  border-radius: 6px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.3s ease;
}

.view-btn:hover {
  border-color: #007bff;
  color: #007bff;
}

.view-btn.active {
  border-color: #007bff;
  background-color: #007bff;
  color: white;
}

.view-btn svg {
  width: 20px;
  height: 20px;
}

.results-count {
  font-size: 14px;
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}

.products-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: visible;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 60px;
  overflow: visible;
}

@media (min-width: 768px) {
  .products-grid:not(.list-view) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .products-grid:not(.list-view) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.products-grid.list-view {
  grid-template-columns: 1fr;
  gap: 20px;
}

.products-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.products-grid.list-view .product-card:hover {
  border-color: rgba(15, 23, 42, 0.14);
}

.products-grid.list-view .product-image-container {
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
}

.products-grid.list-view .product-content {
  padding: 1rem 1.1rem 1rem 1rem;
}

.products-grid.list-view .product-footer {
  display: flex;
  align-items: center;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
  grid-column: 1 / -1;
}

.no-products {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 18px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .collection-title {
    font-size: 36px;
  }

  .collection-subtitle {
    font-size: 16px;
  }

  .controls-container {
    gap: 15px;
    padding: 0 15px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .product-image-container {
    height: auto;
  }

  .products-grid.list-view .product-card {
    grid-template-columns: 170px minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .collection-header {
    padding: 40px 15px;
  }

  .collection-title {
    font-size: 28px;
  }

  .collection-subtitle {
    font-size: 14px;
  }

  .collection-controls {
    top: 64px;
    padding: 12px 0 14px;
    margin-bottom: 16px;
  }

  .controls-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 12px;
  }

  .filter-section,
  .sort-section,
  .results-count,
  .category-filter,
  .search-box {
    width: 100%;
  }

  .filter-section {
    gap: 10px;
  }

  .collection-search-input,
  .collection-category-select,
  .sort-select {
    width: 100%;
    min-height: 44px;
  }

  .sort-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .sort-label {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    line-height: 1;
    flex: 0 0 auto;
  }

  .sort-select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .results-count {
    text-align: center;
    justify-self: center;
  }

  .view-section {
    display: none;
  }

  .products-container {
    padding: 0;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .products-grid.list-view {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .products-grid.list-view .product-card {
    grid-template-columns: 128px minmax(0, 1fr);
    width: 100%;
  }
}
