/* ========================================
   Product Listing Modern Design
   ======================================== */

/* View Controls */
.view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.view-toggle {
  display: flex;
  gap: 10px;
}

.view-btn {
  background: #fff;
  border: 2px solid #e0e0e0;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  color: #666;
}

.view-btn:hover {
  border-color: #227a8a;
  color: #227a8a;
}

.view-btn.active {
  background: #227a8a;
  border-color: #227a8a;
  color: #fff;
}

.product-count {
  font-size: 14px;
  color: #666;
}

.product-count strong {
  color: #227a8a;
  font-weight: 600;
}

/* Products Container */
.products-container {
  display: grid;
  gap: 25px;
  margin-bottom: 40px;
}

/* Grid View (Default) */
.products-container.grid-view {
  grid-template-columns: repeat(3, 1fr);
}

/* List View */
.products-container.list-view {
  grid-template-columns: 1fr;
}

.products-container.list-view .product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.products-container.list-view .product-image {
  flex: 0 0 250px;
  margin-right: 30px;
  margin-bottom: 0;
}

.products-container.list-view .product-info {
  flex: 1;
  text-align: left;
}

.products-container.list-view .product-actions {
  justify-content: flex-start;
}

/* Product Card */
.product-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
  border-color: #d0d0d0;
}

/* Product Badges */
.product-badges {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-eco {
  background: #c8e6c9;
  color: #2e7d32;
}

.badge-3d {
  background: #90a4ae;
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.badge-certified {
  background: #ffd54f;
  color: #f57c00;
}

/* Product Image */
.product-image {
  position: relative;
  background: #f5f5f5;
  padding: 30px;
  text-align: center;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}

.product-card:hover .product-image {
  background: #eef7f9;
}

.product-image img {
  max-width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

/* Product Info */
.product-info {
  padding: 0 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-code {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  font-family: 'Courier New', monospace;
}

.product-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.product-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-title a:hover {
  color: #227a8a;
}

/* Product Specs */
.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.spec-badge {
  background: #f0f0f0;
  color: #555;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

/* Product Features */
.product-features {
  margin-bottom: 15px;
  flex: 1;
}

.product-features p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Product Actions */
.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.btn-compare {
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #666;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.btn-compare:hover {
  background: #f8f9fa;
  border-color: #227a8a;
  color: #227a8a;
}

.btn-compare input[type="checkbox"] {
  margin: 0;
}

.btn-details {
  background: #227a8a;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-details:hover {
  background: #1a5f6d;
  transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 991px) {
  .products-container.grid-view {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .products-container.grid-view {
    grid-template-columns: 1fr;
  }
  
  .products-container.list-view .product-card {
    flex-direction: column;
  }
  
  .products-container.list-view .product-image {
    flex: 1;
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
  }
  
  .view-controls {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .product-badges {
    top: 10px;
    left: 10px;
  }
  
  .badge {
    font-size: 9px;
    padding: 4px 8px;
  }
  
  .badge-3d {
    width: 35px;
    height: 35px;
    font-size: 10px;
  }
  
  .product-image {
    padding: 20px;
  }
  
  .product-title {
    font-size: 16px;
  }
}

/* Add these styles to your existing product-listing.css file */

/* View Controls - NEW */
.view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.view-toggle {
  display: flex;
  gap: 10px;
}

.view-btn {
  background: #fff;
  border: 2px solid #e0e0e0;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  color: #666;
}

.view-btn:hover {
  border-color: #227a8a;
  color: #227a8a;
}

.view-btn.active {
  background: #227a8a;
  border-color: #227a8a;
  color: #fff;
}

.product-count strong {
  color: #227a8a;
}

/* Update existing or add these */
.products-container.grid-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.products-container.list-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.products-container.list-view .product-card {
  display: flex;
  flex-direction: row;
}

.products-container.list-view .product-image {
  flex: 0 0 250px;
  margin-right: 30px;
}

/* Responsive */
@media (max-width: 991px) {
  .products-container.grid-view {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .products-container.grid-view {
    grid-template-columns: 1fr;
  }
  .products-container.list-view .product-card {
    flex-direction: column;
  }
  .products-container.list-view .product-image {
    width: 100%;
    margin-right: 0;
  }
}