/* ================================================================
   products.css — Aqua Laundry · PRODUCTS PAGE
   ================================================================
   ⚠️  ต้องโหลด main.css ก่อนไฟล์นี้เสมอ
   โค้ดที่ซ้ำกันทุกหน้า (hero, breadcrumb, :root tokens,
   utilities, keyframes) ถูกย้ายไปรวมที่ main.css แล้ว
   ================================================================ */

/* === CSS Variables === */
:root {
  --primary-gradient: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
  --primary-dark: #023E8A;
  --primary-light: #90E0EF;
  --primary-pale: #CAF0F8;
  --secondary-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --accent-orange: #F59E0B;
  --accent-purple: #8B5CF6;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-blue: 0 10px 30px rgba(0, 119, 182, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* === Base Reset === */
.products-page {
  background: var(--gray-50);
  min-height: 100vh;
}

/* === Main Layout === */
.products-container {
  margin-top: 0;
  padding-top: 1.5rem;
  position: relative;
  z-index: 10;
}

.products-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding-bottom: 60px;
}

/* === Filter Sidebar === */
.filter-sidebar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 0.75rem;
  box-shadow:
    0 8px 32px rgba(0, 119, 182, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.05);
  height: fit-content;
  position: sticky;
  top: 100px;
  align-self: flex-start;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-sidebar:hover {
  box-shadow:
    0 12px 40px rgba(0, 119, 182, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}


/* Mobile Filter Toggle */
.filter-toggle-mobile {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100;
  background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 119, 182, 0.4);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.filter-toggle-mobile:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 119, 182, 0.5);
}

.filter-toggle-mobile .badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #EF4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* Mobile Filter Overlay */
.filter-overlay-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.filter-overlay-mobile.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Mobile Filter Sidebar */
.filter-sidebar-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: white;
  z-index: 1300;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.filter-sidebar-mobile.active {
  right: 0;
}

.filter-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 2px solid var(--gray-100);
  background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1400;
  flex-shrink: 0;
}

.filter-mobile-header h3 {
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-mobile-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.filter-mobile-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.filter-mobile-content {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.filter-mobile-footer {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 1rem 1.5rem;
  border-top: 2px solid var(--gray-100);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
  z-index: 1400;
  flex-shrink: 0;
}

.btn-apply-filters,
.btn-clear-filters-mobile {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-apply-filters {
  background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
  color: white;
}

.btn-apply-filters:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 182, 0.3);
}

.btn-clear-filters-mobile {
  background: white;
  color: #EF4444;
  border: 2px solid #EF4444;
}

.btn-clear-filters-mobile:hover {
  background: #EF4444;
  color: white;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-100);
}

.filter-header h3 {
  font-size: 1.1rem;
  color: var(--gray-800);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-header h3 i {
  color: #0077B6;
}

/* Filter Sections */
.filter-section {
  margin-bottom: 1.25rem;
  position: relative;
  background: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 100%);
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.3s ease;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border-bottom: 2px solid var(--gray-100);
  transition: all 0.2s;
  position: relative;
  z-index: 2;
}

.filter-title i {
  transition: transform 0.3s ease, color 0.2s;
  color: var(--gray-400);
  font-size: 0.85rem;
}

.filter-title:hover i {
  color: #0077B6;
}

.filter-title.active i {
  transform: rotate(180deg);
  color: #0077B6;
}

.filter-title .filter-section-icon {
  margin-right: 0.5rem;
  font-size: 1rem;
  color: #0077B6;
}

/* Filter Options */
.filter-options {
  max-height: 200px;
  overflow-y: auto;
  padding: 0.75rem;
  background: white;
  position: relative;
  z-index: 1;
}

.filter-options::-webkit-scrollbar {
  width: 5px;
}

.filter-options::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 10px;
}

.filter-options::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
  border-radius: 10px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #023E8A 0%, #0077B6 100%);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  border: 1px solid transparent;
}

.filter-option:hover {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border-color: #BAE6FD;
  transform: translateX(4px);
}

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

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  cursor: pointer;
  accent-color: #0077B6;
  flex-shrink: 0;
  transition: all 0.2s;
}

.filter-option:hover input[type="checkbox"],
.filter-option:hover input[type="radio"] {
  border-color: #0077B6;
}

.filter-option input[type="checkbox"]:checked,
.filter-option input[type="radio"]:checked {
  border-color: #0077B6;
}

.filter-option label {
  flex: 1;
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.filter-option:hover label {
  color: #0077B6;
}

.filter-count {
  font-size: 0.75rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  transition: all 0.2s;
}

.filter-option:hover .filter-count {
  background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
  color: white;
}

/* Price Range */
.price-range-section {
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.price-range-container {
  padding: 1.25rem;
  background: white;
  position: relative;
  z-index: 1;
}

.price-range-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.price-input-group {
  flex: 1;
  position: relative;
}

.price-input-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.price-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
  background: white;
  transition: all 0.2s;
}

.price-input:focus {
  outline: none;
  border-color: #0077B6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.price-input-divider {
  color: var(--gray-400);
  font-weight: 600;
  padding-top: 1.5rem;
}

/* Price Slider */
.price-slider-container {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  margin: 1rem 0;
  padding: 0.5rem 0;
}

.price-slider-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  z-index: 1;
}

.price-slider-fill {
  position: absolute;
  height: 4px;
  background: linear-gradient(90deg, #0077B6, #00B4D8);
  border-radius: 2px;
  z-index: 2;
  left: 0%;
  width: 100%;
}

.price-slider {
  position: absolute;
  width: 100%;
  height: 20px;
  background: transparent;
  outline: none;
  z-index: 3;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: white;
  border: 2px solid #0077B6;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.price-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border: 2px solid #0077B6;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.price-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Price Display */
.price-display {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* Other Filters */
.other-filters {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--gray-200);
}

/* === Products Main Area === */
.products-main {
  background: transparent;
}

.products-toolbar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.results-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.results-count {
  font-size: 0.95rem;
  color: var(--gray-700);
  font-weight: 600;
}

.results-count .count {
  color: #0077B6;
  font-weight: 800;
}

.view-options {
  display: flex;
  gap: 0.5rem;
}

.btn-view {
  width: 42px;
  height: 42px;
  border: 1px solid var(--gray-300);
  background: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-600);
}

.btn-view:hover {
  border-color: #0077B6;
  color: #0077B6;
  background: var(--gray-50);
}

.btn-view.active {
  background: #0077B6;
  border-color: #0077B6;
  color: white;
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 600;
}

.sort-select {
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: white;
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  min-width: 160px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230077B6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.sort-select:focus {
  outline: none;
  border-color: #0077B6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

/* === Products Grid === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Grid View - Card Style */
.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.02);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 180, 216, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #00B4D8 0%, #0077B6 50%, #03045E 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 60px rgba(0, 119, 182, 0.2);
  border-color: rgba(0, 180, 216, 0.15);
}

.product-card:hover::before {
  transform: scaleX(1);
}


.product-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.product-badge {
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

.badge-new {
  background: var(--secondary-gradient);
  color: white;
}

.badge-sale {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
}

.badge-best {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
}

.product-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

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

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  min-height: 2.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.stars {
  color: #F59E0B;
  font-size: 0.85rem;
}

.rating-count {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-left: 0.25rem;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.current-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0077B6;
}

.original-price {
  font-size: 0.9rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.discount {
  font-size: 0.75rem;
  color: #10B981;
  font-weight: 800;
  background: #ECFDF5;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.product-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.btn-view-details {
  width: 100%;
  padding: 0.85rem;
  background: #0077B6;
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-view-details:hover {
  background: #023E8A;
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn-view-details i {
  transition: transform 0.3s;
}

.btn-view-details:hover i {
  transform: translateX(5px);
}

/* === List View - 2 Columns Layout === */
.products-grid.list-view {
  grid-template-columns: 1fr;
}

.product-card.list-view {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: auto;
  min-height: 200px;
}

.product-card.list-view .product-badges {
  top: 0.75rem;
  left: 0.75rem;
}

.product-card.list-view .product-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.product-card.list-view .product-content {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
}

.product-card.list-view .product-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-card.list-view .product-title {
  font-size: 1.2rem;
  min-height: auto;
  -webkit-line-clamp: 2;
  margin-bottom: 0.5rem;
}

.product-card.list-view .product-description {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.product-card.list-view .product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.product-card.list-view .feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 0.35rem 0.75rem;
  border-radius: 15px;
  font-weight: 500;
}

.product-card.list-view .feature-tag i {
  color: #0077B6;
  font-size: 0.75rem;
}

.product-card.list-view .product-actions-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  min-width: 180px;
}

.product-card.list-view .product-price {
  margin-bottom: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.product-card.list-view .current-price {
  font-size: 1.75rem;
}

.product-card.list-view .product-footer {
  margin-top: 1rem;
  padding-top: 0;
  width: 100%;
}

.product-card.list-view .btn-view-details {
  min-width: 180px;
}

/* === Pagination === */

/* === Quick View Modal === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 900;
  padding: 1rem;
}

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

.quick-view-modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
  position: relative;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--gray-700);
  box-shadow: var(--shadow-md);
  z-index: 10;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #EF4444;
  color: white;
  transform: rotate(90deg);
}

.modal-content {
  padding: 2rem;
}

/* === Loading State === */
.products-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-skeleton {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.skeleton-image {
  height: 220px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.skeleton-content {
  padding: 1.25rem;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  margin-bottom: 0.75rem;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* === Empty State === */
.products-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  grid-column: 1 / -1;
}

.empty-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  background: var(--primary-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #0077B6;
}

.products-empty h3 {
  font-size: 1.4rem;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.products-empty p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.btn-reset-filters {
  padding: 0.75rem 1.5rem;
  background: #0077B6;
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-filters:hover {
  background: #023E8A;
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

/* === Toast Notifications === */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  animation: toastSlideIn 0.3s ease-out;
  border-left: 4px solid #0077B6;
  max-width: 350px;
}

.toast-success {
  border-left-color: #10B981;
}

.toast-info {
  border-left-color: #3B82F6;
}

.toast-error {
  border-left-color: #EF4444;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.toast-content i {
  font-size: 1.25rem;
}

.toast-success i {
  color: #10B981;
}

.toast-info i {
  color: #3B82F6;
}

.toast-error i {
  color: #EF4444;
}

.toast span {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.9rem;
}

.toast-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--gray-700);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fade-out {
  animation: toastFadeOut 0.3s ease-out forwards;
}

@keyframes toastFadeOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* === Responsive Design === */

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

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .products-wrapper {
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
  }

  .product-card.list-view {
    grid-template-columns: 240px 1fr;
  }
}

/* Tablet Portrait */
@media (max-width: 992px) {
  .products-wrapper {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    display: none;
  }

  .filter-toggle-mobile {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .product-card.list-view {
    grid-template-columns: 200px 1fr;
  }

  .product-card.list-view .product-content {
    padding: 1.25rem;
    gap: 1rem;
  }

  .product-card.list-view .product-actions-wrapper {
    min-width: 150px;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .products-hero {
    padding: 50px 0 70px;
  }

  .hero-content h1 {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-content h1 i {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .products-toolbar {
    padding: 1rem;
    gap: 0.75rem;
  }

  .results-info {
    width: 100%;
  }

  .toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .sort-options {
    flex: 1;
  }

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

  .view-options {
    flex-shrink: 0;
  }

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

  /* List view becomes vertical on mobile */
  .product-card.list-view {
    grid-template-columns: 1fr;
  }

  .product-card.list-view .product-image {
    height: 220px;
    min-height: 220px;
  }

  .product-card.list-view .product-content {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .product-card.list-view .product-actions-wrapper {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: auto;
  }

  .product-card.list-view .product-price {
    flex-direction: row;
    align-items: baseline;
  }

  .product-card.list-view .product-footer {
    width: 100%;
  }

  .product-card.list-view .btn-view-details {
    min-width: auto;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .filter-sidebar-mobile {
    width: 280px;
  }
}

/* Mobile Portrait */
@media (max-width: 576px) {
  .products-hero {
    padding: 40px 0 60px;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-content h1 i {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  .products-wrapper {
    gap: 1rem;
    padding-bottom: 40px;
  }

  .products-toolbar {
    padding: 0.875rem;
  }

  .results-count {
    font-size: 0.85rem;
  }

  .sort-label {
    display: none;
  }

  .btn-view {
    width: 38px;
    height: 38px;
  }

  .product-image {
    height: 200px;
  }

  .product-content {
    padding: 1rem;
  }

  .product-title {
    font-size: 0.95rem;
    min-height: 2.6rem;
  }

  .current-price {
    font-size: 1.35rem;
  }

  .btn-view-details {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .product-card.list-view .product-image {
    height: 180px;
    min-height: 180px;
  }

  .product-card.list-view .product-title {
    font-size: 1.05rem;
  }

  .product-card.list-view .current-price {
    font-size: 1.5rem;
  }


  .products-empty {
    padding: 3rem 1.5rem;
  }

  .empty-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  .products-empty h3 {
    font-size: 1.2rem;
  }

  .products-empty p {
    font-size: 0.9rem;
  }

  .filter-sidebar {
    padding: 1rem;
  }

  .filter-header h3 {
    font-size: 1rem;
  }

  .price-range-values {
    flex-direction: column;
    gap: 0.75rem;
  }

  .price-input-divider {
    display: none;
  }

  .modal-content {
    padding: 1.25rem;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 380px) {
  .hero-content h1 {
    font-size: 1.35rem;
  }

  .products-toolbar {
    padding: 0.75rem;
  }

  .btn-view {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .product-content {
    padding: 0.875rem;
  }

  .current-price {
    font-size: 1.25rem;
  }

  .btn-view-details {
    padding: 0.65rem;
    font-size: 0.8rem;
  }
}