/*
  What: Shop page styles (product grid and card sizing tweaks).
  Connected to: shop.html, js/shop.js
  Amrei pls make me work: None; styling only.
*/
/* Shop-specific overrides for product grid and card sizing */

/* Make items smaller with bigger margins (gaps) */
.products-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  max-width: calc(4 * 200px + 3 * 28px);
  margin: 0 auto;
}

/* Slightly tighter card */
.product-card {
  border-radius: 14px;
}
.product-card img {
  aspect-ratio: 1 / 1;
}
.product-info {
  padding: 10px 12px 12px 12px;
}
.product-name { font-size: 20px; }
.product-price { font-size: 14px; }

/* Add a touch more padding around the grid on shop page */
.shop-layout .window-left .window-body {
  padding: clamp(20px, 3.5vw, 36px);
}

/* Responsive column count for the products grid */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: calc(3 * 200px + 2 * 28px);
  }
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: calc(2 * 200px + 1 * 28px);
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: none;
  }
  .product-name { font-size: 18px; }
}

/* Center the two windows and narrow their widths */
.shop-layout {
  justify-content: center;
}

.shop-layout .window-left {
  flex: 0 0 auto;
  max-width: calc(4 * 200px + 3 * 28px + 2 * 48px);
}

.shop-layout .window-right {
  width: 320px;
}

@media (max-width: 980px) {
  .shop-layout {
    justify-content: stretch;
  }
  .shop-layout .window-left,
  .shop-layout .window-right {
    max-width: none;
    width: 100%;
  }
}

/* Let icon buttons show labels beside icons in headers */
.shop-layout .window-header .icon-btn {
  width: auto;
  height: 28px;
  padding: 0 10px;
  gap: 8px;
}
.shop-layout .window-header .icon-btn .label {
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  line-height: 1;
}

/* Category chips (front-end only UI) */
.products-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px 0; }
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.category-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  cursor: pointer;
}
.cat-chip:hover { background: rgba(255,255,255,0.14); }
.cat-chip.active {
  background: rgba(167, 139, 250, 0.22);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 10px rgba(167,139,250,0.35);
}

/* Styled dropdowns for Category and Price (glass + purple glow) */
.filters .field { display: grid; gap: 4px; }
.filters .field-label { color: rgba(255,255,255,0.85); font-size: 15px; }
.filters select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(255, 255, 255, 0.2) url('../images/icons/chevron-down.svg') no-repeat right 10px center;
  background-size: 10px 10px;
  border: 1px solid #8a2be2;
  color: white;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
  padding: 6px 28px 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-family: 'Witches Note Free', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 0 0 rgba(167,139,250,0);
}

.filters select:focus {
  outline: none;
  border-color: #9370db;
  box-shadow: 0 0 8px #8a2be2, 0 0 12px #9370db;
}

.filters select option {
  color: white;
  background: rgba(0, 0, 0, 0.8);
  font-family: 'Witches Note Free', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.filters .category-select,
.filters .category-select option {
  font-family: 'Ghostburn', 'Melkia Starlight', 'Combo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.filters .price-select,
.filters .price-select option {
  font-family: 'Ghostburn', 'Melkia Starlight', 'Combo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.category-select,
.price-select {
  background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent white */
  border: 1px solid #8a2be2; /* Purple border */
  border-radius: 4px;
  padding: 8px;
  color: white;
  outline: none;
  transition: all 0.3s ease;
}

.category-select:focus,
.price-select:focus {
  box-shadow: 0 0 8px #8a2be2, 0 0 12px #9370db; /* Glowing effect */
  border-color: #9370db;
}
