/**
 * SURPRISE GRANITE - SHOP PAGE ENHANCED
 * Premium product cards and shop styling
 * Version: 1.0
 */

/* ===== SHOP HERO ===== */
.shop-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  padding: 60px 24px 48px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.shop-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(249, 203, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.shop-hero h1 {
  font-family: var(--sg-font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 16px;
  letter-spacing: -1px;
}

.shop-hero h1 span {
  color: #f9cb00;
}

.shop-hero p {
  font-size: 18px;
  color: #6e6e73;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== SHOP LAYOUT ===== */
.shop-products {
  background: #f8fafc;
  padding: 48px 24px;
  min-height: 60vh;
}

.shop-products-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Section Header */
.shop-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.shop-section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-section-header h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #f9cb00, #e6b800);
  border-radius: 2px;
}

.shop-section-header a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #1a2b3c;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.shop-section-header a:hover {
  background: #2d4a5e;
  transform: translateY(-2px);
}

/* ===== PRODUCT GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1440px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Product Image */
.product-card-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f7;
}

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

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

/* Product Badge */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  z-index: 2;
}

.product-badge.sale {
  background: #ef4444;
  color: #ffffff;
}

.product-badge.new {
  background: #22c55e;
  color: #ffffff;
}

.product-badge.popular {
  background: #f9cb00;
  color: #1a2b3c;
}

/* Quick View Button */
.product-quick-view {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: #1d1d1f;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.product-card:hover .product-quick-view {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.product-quick-view:hover {
  background: #f9cb00;
}

/* Wishlist Button */
.product-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.product-wishlist svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #6e6e73;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.product-wishlist:hover svg,
.product-wishlist.active svg {
  fill: #ef4444;
  stroke: #ef4444;
}

/* Product Content */
.product-card-content {
  padding: 20px;
}

/* Product Category */
.product-category {
  font-size: 12px;
  font-weight: 500;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

/* Product Title */
.product-title {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-title a:hover {
  color: #f9cb00;
}

/* Product Rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.product-stars {
  display: flex;
  gap: 2px;
}

.product-stars svg {
  width: 14px;
  height: 14px;
  fill: #f9cb00;
}

.product-stars svg.empty {
  fill: #e2e8f0;
}

.product-reviews {
  font-size: 12px;
  color: #86868b;
}

/* Product Price */
.product-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #1d1d1f;
}

.product-price-unit {
  font-size: 13px;
  font-weight: 400;
  color: #86868b;
}

.product-price-compare {
  font-size: 14px;
  color: #86868b;
  text-decoration: line-through;
}

/* Add to Cart Button */
.product-add-cart {
  width: 100%;
  padding: 14px 20px;
  background: #1a2b3c;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.product-add-cart:hover {
  background: #f9cb00;
  color: #1a2b3c;
  transform: translateY(-2px);
}

.product-add-cart svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ===== PRODUCT FILTERS ===== */
.shop-filters {
  background: #ffffff;
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
}

.filter-select {
  padding: 10px 36px 10px 16px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #1d1d1f;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #f9cb00;
}

.filter-button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #6e6e73;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
  background: #f9cb00;
  color: #1a2b3c;
  border-color: #f9cb00;
}

/* Results Count */
.results-count {
  margin-left: auto;
  font-size: 14px;
  color: #86868b;
}

/* ===== CATEGORY PILLS ===== */
.category-pills {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #ffffff;
  color: #1d1d1f;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 100px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
  background: #1a2b3c;
  color: #ffffff;
  border-color: #1a2b3c;
}

.category-pill-icon {
  font-size: 18px;
}

/* ===== EMPTY STATE ===== */
.shop-empty {
  text-align: center;
  padding: 80px 24px;
}

.shop-empty svg {
  width: 80px;
  height: 80px;
  stroke: #e2e8f0;
  margin-bottom: 24px;
}

.shop-empty h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 12px;
}

.shop-empty p {
  font-size: 16px;
  color: #6e6e73;
  margin-bottom: 24px;
}

.shop-empty-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #f9cb00;
  color: #1a2b3c;
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.shop-empty-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 203, 0, 0.35);
}

/* ===== LOAD MORE ===== */
.load-more {
  text-align: center;
  padding: 48px 24px;
}

.load-more-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  background: transparent;
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-button:hover {
  background: #1a2b3c;
  color: #ffffff;
  border-color: #1a2b3c;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .shop-hero {
    padding: 40px 16px 32px;
  }

  .shop-hero h1 {
    font-size: 28px;
  }

  .shop-hero p {
    font-size: 16px;
  }

  .shop-products {
    padding: 32px 16px;
  }

  .shop-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

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

  .product-card-content {
    padding: 14px;
  }

  .product-title {
    font-size: 14px;
  }

  .product-price {
    font-size: 17px;
  }

  .product-add-cart {
    padding: 12px 16px;
    font-size: 13px;
  }

  .shop-filters {
    padding: 16px;
    gap: 12px;
  }

  .filter-select,
  .filter-button {
    flex: 1;
    min-width: calc(50% - 6px);
  }

  .results-count {
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    gap: 10px;
  }

  .product-card-content {
    padding: 12px;
  }

  .product-category {
    font-size: 10px;
  }

  .product-title {
    font-size: 13px;
    -webkit-line-clamp: 1;
  }

  .product-rating {
    margin-bottom: 8px;
  }

  .product-price-wrap {
    margin-bottom: 12px;
  }

  .product-price {
    font-size: 15px;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  .shop-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom-color: #334155;
  }

  .shop-hero h1 {
    color: #ffffff;
  }

  .shop-hero p {
    color: #94a3b8;
  }

  .shop-products {
    background: #0f172a;
  }

  .product-card {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .product-card-image {
    background: #334155;
  }

  .product-category,
  .product-reviews,
  .product-price-unit,
  .product-price-compare {
    color: #64748b;
  }

  .product-title,
  .product-price {
    color: #f1f5f9;
  }

  .product-add-cart {
    background: #334155;
  }

  .product-add-cart:hover {
    background: #f9cb00;
  }

  .shop-filters {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .filter-select {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
  }

  .category-pill {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }

  .category-pill:hover,
  .category-pill.active {
    background: #f9cb00;
    color: #1a2b3c;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card-image img,
  .product-quick-view {
    transition: none;
  }

  .product-card:hover {
    transform: none;
  }

  .product-card:hover .product-card-image img {
    transform: none;
  }
}
