/**
 * Marketplace Shared Card Styles
 * Used across all category pages for consistent product display
 */

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  background: #ffffff;
}

/* Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.product-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Product Image Container */
.product-image {
  position: relative;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: #f8f9fa;
}
.product-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
  background: #fff;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Loading skeleton for images */
.product-image img[src=""],
.product-image img:not([src]) {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Install badge overlay */
.install-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: rgba(26, 43, 60, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9cb00;
  transition: all 0.2s;
  z-index: 2;
}
.install-icon:hover {
  background: #1a2b3c;
  transform: scale(1.1);
}
.install-icon svg {
  width: 16px;
  height: 16px;
  fill: #f9cb00;
}

/* Product Info */
.product-info {
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-brand {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #1a2b3c;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 8px;
  align-self: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
  color: #1a1a2e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-specs-mini {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

/* Price Display */
.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #1a2b3c;
  margin-bottom: 12px;
}
.price-retail {
  text-decoration: line-through;
  color: #aaa;
  font-size: 14px;
  font-weight: 400;
  margin-right: 6px;
}
.price-savings {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}
.price-tier {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #f9cb00;
  background: rgba(249, 203, 0, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Buttons */
.product-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 10px 20px;
  background: none;
  color: #1a2b3c;
  border: 2px solid #f9cb00;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.product-btn:hover {
  background: #f9cb00;
  color: #1a2b3c;
}

.add-to-cart-btn {
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  min-height: 42px;
  touch-action: manipulation;
}
.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.add-to-cart-btn:active {
  transform: scale(0.98);
}
.add-to-cart-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.get-quote-btn {
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #1a2b3c, #2d4a5e);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  text-align: center;
  min-height: 42px;
  line-height: 22px;
}
.get-quote-btn:hover {
  opacity: 0.9;
}

.calc-project-btn {
  width: 100%;
  padding: 8px 16px;
  background: none;
  color: #1a2b3c;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.2s;
}
.calc-project-btn:hover {
  border-color: #f9cb00;
  background: rgba(249, 203, 0, 0.05);
}

/* Product Count */
.product-count {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

/* Pricing Banner */
.pricing-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(90deg, #1a2b3c 0%, #2d4356 100%);
  border-radius: 12px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.pricing-banner.show {
  display: flex;
}
.pricing-banner-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.pricing-banner-btn {
  background: #f9cb00;
  color: #1a2b3c;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* Filters */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-btn {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 25px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: #555;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: #f9cb00;
  background: #f9cb00;
  color: #1a2b3c;
}
.filter-select {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: #333;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 13px;
  color: #888;
  margin-bottom: 24px;
}
.breadcrumbs a {
  color: #888;
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
  color: #555;
}

/* Responsive */
@media (max-width: 991px) {
  .products-grid {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .product-info {
    padding: 12px 10px;
  }
  .product-title {
    font-size: 13px;
  }
  .product-price {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .product-btn {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12px;
  }
  .add-to-cart-btn,
  .get-quote-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 38px;
  }
  .filters {
    gap: 8px;
  }
  .filter-btn {
    padding: 6px 14px;
    font-size: 12px;
    min-height: 36px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-image img {
    aspect-ratio: 1;
  }
}
