:root {
  --primary-color: #ff6f00;
  --secondary-color: #388e3c;
  --bg-color: #f1f3f6;
  --card-bg: #ffffff;
  --text-dark: #212121;
  --text-light: #878787;
  --border-color: #e0e0e0;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
}

/* HEADER */
header {
  background-color: var(--card-bg);
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

h1 {
  font-size: 24px;
  color: var(--primary-color);
  font-weight: 700;
}

/* SEARCH */
.search-bar {
  flex: 1;
  max-width: 500px;
  min-width: 250px;
}

.search-bar input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  outline: none;
  transition: 0.2s;
}

.search-bar input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(255,111,0,0.3);
}

/* HERO BANNER */
.hero-banner {
  background: linear-gradient(135deg, #ff6f00, #ff9800);
  color: white;
  text-align: center;
  padding: 30px 20px;
}

.hero-banner h2 {
  font-size: 24px;
  margin-bottom: 5px;
}

.hero-banner p {
  font-size: 14px;
  opacity: 0.9;
}

/* FILTERS */
.filters-container {
  max-width: 1200px;
  margin: 15px auto;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.filter-btn {
  padding: 6px 15px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* PRODUCTS GRID */
.products-container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

/* PRODUCT CARD */
.product-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.3s;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.product-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

/* IMAGE */
.image-container {
  height: 200px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

/* BADGES */
.trending-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff1744;
  color: white;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 3px;
  animation: pulse 1.2s infinite;
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #2e7d32;
  color: white;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 3px;
}

/* INFO */
.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-tag {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  margin: 6px 0;
  height: 40px;
  overflow: hidden;
}

.product-price {
  font-size: 20px;
  font-weight: bold;
  color: #d32f2f;
}

.old-price {
  text-decoration: line-through;
  font-size: 13px;
  color: var(--text-light);
}

/* DESCRIPTION */
.product-description {
  font-size: 13px;
  color: var(--text-light);
  margin: 10px 0;
  flex-grow: 1;
}

/* BUTTON */
.buy-btn {
  background: var(--secondary-color);
  color: white;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.buy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 12px rgba(56,142,60,0.4);
}

/* LOADING */
.loading {
  text-align: center;
  grid-column: 1/-1;
  padding: 40px;
  color: var(--text-light);
  font-size: 18px;
}

/* FOOTER */
footer {
  background: #111;
  color: #ccc;
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

footer .disclaimer {
  margin-top: 10px;
  font-size: 12px;
  color: #888;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

/* MOBILE */
@media (max-width: 600px) {
  h1 {
    font-size: 20px;
  }

  .product-name {
    font-size: 14px;
  }

  .product-price {
    font-size: 16px;
  }

  .buy-btn {
    font-size: 13px;
    padding: 8px;
  }
}

/* ANIMATION */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}