/* ========== SHOP PAGE (tutti i prodotti) ========== */

.shop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  position: relative;
}

.shop-filters-overlay {
  position: fixed;
  inset: 0;
  z-index: 15000;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.shop-filters-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.shop-filters {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 15001;
  width: 300px;
  max-width: 85vw;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
}
.shop-filters.open {
  transform: translateX(0);
}
.shop-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.shop-filters-header-title {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-text);
  font-weight: 400;
}
.shop-filters-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  transition: color 0.2s;
}
.shop-filters-close:hover {
  color: var(--color-text);
}
.shop-filters-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.shop-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--color-primary, #A89F84);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: var(--font-body);
  border-radius: 0;
  transition: opacity 0.2s;
}
.shop-filters-toggle:hover {
  opacity: 0.85;
}
.shop-filters-toggle svg {
  width: 16px;
  height: 16px;
}
.shop-filters-toggle.active {
  opacity: 0.85;
}

.filter-group {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group-title {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  margin-bottom: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  transition: color 0.2s;
}
.filter-group-toggle:hover { color: var(--color-primary); }
.filter-group-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s;
  color: var(--color-text-light);
}
.filter-group.open .filter-group-toggle svg {
  transform: rotate(180deg);
}

.filter-group .filter-chips {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}
.filter-group.open .filter-chips {
  max-height: 600px;
  opacity: 1;
}

.filter-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  font-family: var(--font-body);
  border-radius: 0;
  transition: background 0.15s;
  user-select: none;
}
.filter-checkbox-label:hover {
  background: rgba(0,0,0,0.04);
}
.filter-checkbox-label .filter-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--color-text-light);
  opacity: 0.7;
}

.filter-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.filter-checkbox-box {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-radius: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.filter-checkbox:checked + .filter-checkbox-box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.filter-checkbox:checked + .filter-checkbox-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -1px;
}

.filter-price-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.filter-price-row input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  min-width: 0;
  width: 0;
}
.filter-price-row input:focus {
  border-color: var(--color-primary);
}
.filter-price-row span {
  font-size: 12px;
  color: var(--color-text-light);
  flex-shrink: 0;
}

.filter-reset {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  background: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: var(--color-text-light);
  font-family: var(--font-body);
  transition: border-color 0.2s, color 0.2s;
  text-align: center;
}
.filter-reset:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.shop-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  flex-wrap: wrap;
}

.shop-search-label {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  background: var(--surface, #fff);
  transition: border-color 0.2s;
}
.shop-search-label:focus-within {
  border-color: var(--color-primary, #A89F84);
}
.shop-search-label svg {
  width: 18px;
  height: 18px;
  color: #999;
  flex-shrink: 0;
}
.shop-search-label input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 100%;
  background: transparent;
}


.custom-select {
  position: relative;
  min-width: 180px;
  margin-left: auto;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--color-bg);
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: border-color 0.2s;
}
.custom-select-trigger:hover {
  border-color: var(--color-primary, #A89F84);
}
.custom-select-trigger:focus {
  border-color: var(--color-primary, #A89F84);
  outline: none;
}
.custom-select-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
  color: #999;
}
.custom-select.open .custom-select-trigger svg {
  transform: rotate(180deg);
}
.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  margin-top: 4px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: none;
  overflow: hidden;
}
.custom-select.open .custom-select-dropdown {
  display: block;
}
.custom-select-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: background 0.15s;
}
.custom-select-option:hover {
  background: var(--color-bg-alt);
}
.custom-select-option.selected {
  font-weight: 700;
  color: var(--color-primary, #A89F84);
}

.shop-count {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.shop-loadmore {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.shop-active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.shop-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.shop-active-tag:hover {
  opacity: 0.85;
}
.shop-active-tag svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
}

.filter-count-label {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .shop-filters {
    width: 100%;
    max-width: 100vw;
  }
  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .shop-search-label { min-width: 0; }
  .custom-select { width: 100%; }
}
