/* cfpg.css – Filterable Product Grid Styles */
/* === Filter Control === */
.cfpg-filter-controls {
  display: inline-flex !important;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  width: auto !important;
}
.cfpg-filter-label {
  margin-right: 8px;
  color: #333;
  font-family: 'Roboto', Helvetica, Arial, Lucida, sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.6em;
  text-transform: uppercase;
}
.cfpg-filter-controls select {
  background: transparent;
  color: #cf2721;
  font-size: 18px;
  font-weight: 800;
  padding: 8px 22px 8px 8px;
  appearance: none;
  cursor: pointer;
  field-sizing: content;
  border: 1px solid #000;
}
.cfpg-filter-controls select:focus {
  color: #cf2721;
}
.cfpg-filter-controls select option {
  color: #000;
}
.cfpg-filter-controls::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 4px;
  padding-right: 4px;
  width: 10px;
  height: 6px;
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2210%22%20height%3D%226%22%20viewBox%3D%220%200%2010%206%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M1%201l4%204%204-4%22%20stroke%3D%22%23cf2721%22%20stroke-width%3D%222%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22/%3E%3C/svg%3E") no-repeat center;
}
/* === Grid Container === */
.cfpg-grid {
  display: flex;
  flex-wrap: wrap;
  margin: -10px;
  position: relative;
}
/* === Grid Items: 5 cols desktop === */
.cfpg-item {
  box-sizing: border-box;
  width: calc(20% - 20px) !important;
  margin: 10px;
  text-decoration: none;
  border: 1px solid #f5f5f5;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform .4s ease, opacity .4s ease, box-shadow .2s ease;
}
.cfpg-item:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}
/* === Thumbnail (3:2 ratio) === */
.cfpg-thumb {
  position: relative;
  width: 100%; padding-top: 66.6667%; overflow: hidden;
}
.cfpg-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* === Title === */
.cfpg-title {
  padding: 10px;
  min-height: 4.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #333;
  font-weight: 500;
}
/* === Tablet: 3 columns === */
@media (max-width: 1024px) {
  .cfpg-item { width: calc((100% - 60px) / 3) !important; }
}
/* === Phone: 2 columns === */
@media (max-width: 600px) {
  .cfpg-item { width: calc((100% - 40px) / 2) !important; }
}