:root {
  --font-primary: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-secondary: "Georgia", Times, "Times New Roman", serif;
}

.view {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}
.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-controls {
  margin-bottom: 3rem;
  margin-top: 3rem;

  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  color: var(--font-primary);

  border-radius: 50px;
  cursor: pointer;
  font-weight: 400;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: color-mix(in srgb, var(--accent-secondary) 85%, black);
  color: white;
}

.filter-btn.active {
  background-color: var(--accent-secondary);
  color: white;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: var(--bg-card);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px var(--card-shadow);
}

.product-image-placeholder {
  height: 200px;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}
.product-image-placeholder img{
  width: 250px;
  height: 200px;
}
.product-image-placeholder svg {
  width: 50px;
  height: 50px;
  stroke: var(--text-primary);
}

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-primary);
  margin-bottom: 0.5rem;
  flex-grow: 1;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-secondary);
  color: var(--accent-secondary);
}

#product-detail-view .container {
  max-width: 1000px;
  text-align: left;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-color);

  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  margin-bottom: 3rem;
  margin-top: 3rem;
  transition: all 0.3s ease;
}
.back-button:hover {
  background-color: color-mix(in srgb, var(--accent-secondary) 85%, black);
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.detail-image-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background-color: var(--bg-card);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.detail-image-placeholder img {
  width: 100px;
  height: 100px;
  stroke: var(--text-primary);
}

.detail-info .product-category {
  font-size: 1rem;
}
.detail-info .product-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.detail-info .product-price {
  font-size: 2rem;
  color: var(--accent-primary);
  margin-bottom: 2rem;
}
.detail-description {
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 300;
}

/* --- responsive  --- */
@media (max-width: 992px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}
