

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Battambang", sans-serif;
}

body {
  padding-top: 70px;
  background: #f9f9f9;
}

/* ================= CLEAN PRICE DISPLAY STYLES ================= */
.price-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  line-height: 1;
}

.price-usd {
  color: #009846;
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: -0.02em;
}

.price-separator {
  color: #cbd5e0;
  font-weight: 600;
  font-size: 0.9em;
  user-select: none;
}

.price-riel {
  color: #64748b;
  font-weight: 600;
  font-size: 0.95em;
  font-family: "Battambang", cursive;
}

.current-price-dual .price-display {
  font-size: 1.2rem;
}

.current-price-dual .price-usd {
  font-size: 1.3em;
  color: #009846;
}

.old-price-dual {
  margin-top: 4px;
  opacity: 0.6;
}

.old-price-dual .price-display {
  font-size: 0.9rem;
  text-decoration: line-through;
  opacity: 0.7;
}

.old-price-dual .price-usd,
.old-price-dual .price-riel {
  color: #95a5a6;
  font-weight: 500;
}

/* Products Section */
.products-section {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

.section-header {
  margin-bottom: 30px;
}

.section-header h1 {
  font-size: 36px;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 700;
}

.section-header p {
  color: #7f8c8d;
  font-size: 16px;
}

/* Category Pills */
.category-pills {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.category-pills::-webkit-scrollbar {
  height: 6px;
}

.category-pills::-webkit-scrollbar-thumb {
  background: #009846;
  border-radius: 10px;
}

.category-pill {
  padding: 12px 28px;
  border: none;
  border-radius: 30px;
  background: #fff;
  color: #2c3e50;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  flex-shrink: 0;
}

.category-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.category-pill.active {
  background: #009846;
  color: #fff;
}

/* Filter Bar */
.filter-bar {
  background: #e8f5e9;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-search {
  flex: 1;
  min-width: 250px;
}

.filter-search input {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #c8e6c9;
  border-radius: 25px;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.filter-search input:focus {
  border-color: #009846;
}

.filter-select {
  padding: 12px 20px;
  border: 2px solid #c8e6c9;
  border-radius: 25px;
  outline: none;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  min-width: 180px;
}

.view-toggle {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.view-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.view-btn i {
  color: #666;
}

.view-btn.active,
.view-btn:hover {
  background: #009846;
}

.view-btn.active i,
.view-btn:hover i {
  color: #fff;
}

/* Product Count */
.product-count {
  margin-bottom: 25px;
  color: #7f8c8d;
  font-size: 14px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
  transition: all 0.3s ease;
}

.product-grid.list-view {
  grid-template-columns: 1fr;
}

.product-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-grid.list-view .product-card {
  flex-direction: row;
  align-items: center;
  padding: 20px;
  gap: 30px;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-grid.list-view .product-card:hover {
  transform: translateY(0) translateX(5px);
}

.product-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.product-grid.list-view .product-image {
  width: 180px;
  height: 180px;
  border-radius: 10px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badges {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge.sale {
  background: #e74c3c;
  color: #fff;
}

.badge.best-seller {
  background: #009846;
  color: #fff;
}

.badge.new {
  background: #f39c12;
  color: #fff;
}

.wishlist-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wishlist-btn:hover {
  background: #e74c3c;
  transform: scale(1.1);
}

.wishlist-btn:hover i {
  color: #fff;
}

.wishlist-btn i {
  color: #666;
  font-size: 16px;
}

.product-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-grid.list-view .product-info {
  padding: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.product-info-left {
  flex: 1;
}

.product-info-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-grid.list-view .product-info-right {
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.product-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.product-grid.list-view .product-title {
  font-size: 22px;
  margin-bottom: 5px;
}

.product-description {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 12px;
}

.product-grid.list-view .product-description {
  font-size: 14px;
  margin-bottom: 10px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.product-grid.list-view .product-rating {
  margin-bottom: 0;
}

.stars {
  color: #f39c12;
  font-size: 14px;
}

.rating-count {
  font-size: 13px;
  color: #95a5a6;
}

.product-price {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.product-grid.list-view .product-price {
  align-items: flex-end;
  margin-bottom: 0;
}

.current-price-dual {
  margin-bottom: 2px;
}

.add-to-cart-btn {
  width: 100%;
  padding: 12px;
  background: #009846;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.product-grid.list-view .add-to-cart-btn {
  width: auto;
  padding: 14px 28px;
  white-space: nowrap;
}

.add-to-cart-btn:hover {
  background: #007a38;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 152, 70, 0.3);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.add-to-cart-btn i {
  font-size: 16px;
}

/* Hidden class for filtering */
.product-card.hidden {
  display: none !important;
}

/* ========== RESPONSIVE STYLES ========== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .products-section {
    max-width: 100%;
    padding: 0 15px;
    margin: 30px auto;
  }

  .section-header h1 {
    font-size: 28px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-search {
    min-width: 100%;
  }

  .filter-select {
    min-width: 100%;
  }

  .view-toggle {
    margin-left: 0;
    justify-content: flex-start;
  }

  .current-price-dual .price-display {
    font-size: 1.1rem;
  }
}

/* Mobile Landscape (577px - 767px) */
@media (max-width: 767px) {
  body {
    padding-top: 60px;
  }

  .section-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .section-header p {
    font-size: 14px;
  }

  .category-pills {
    gap: 10px;
    margin-bottom: 20px;
  }

  .category-pill {
    padding: 10px 20px;
    font-size: 13px;
  }

  .filter-bar {
    padding: 20px;
    gap: 15px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-image {
    height: 200px;
  }

  .product-info {
    padding: 15px;
  }

  .product-title {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .product-description {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .current-price-dual .price-display {
    font-size: 1rem;
  }

  .current-price-dual .price-usd {
    font-size: 1.2em;
  }

  .old-price-dual .price-display {
    font-size: 0.8rem;
  }

  .add-to-cart-btn {
    padding: 10px;
    font-size: 13px;
  }

  /* List view adjustments for tablet/mobile */
  .product-grid.list-view {
    grid-template-columns: 1fr;
  }

  .product-grid.list-view .product-card {
    flex-direction: column;
    padding: 0;
  }

  .product-grid.list-view .product-image {
    width: 100%;
    height: 200px;
    border-radius: 0;
  }

  .product-grid.list-view .product-info {
    padding: 15px;
    flex-direction: column;
  }

  .product-grid.list-view .product-info-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .product-grid.list-view .product-price {
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .product-grid.list-view .add-to-cart-btn {
    width: 100%;
  }

  .product-grid.list-view .product-title {
    font-size: 16px;
  }
}

/* Mobile Portrait (320px - 576px) */
@media (max-width: 576px) {
  .products-section {
    margin: 20px auto;
    padding: 0 10px;
  }

  .section-header h1 {
    font-size: 20px;
  }

  .section-header p {
    font-size: 13px;
  }

  .category-pills {
    gap: 8px;
    margin-bottom: 15px;
  }

  .category-pill {
    padding: 8px 16px;
    font-size: 12px;
  }

  .filter-bar {
    padding: 15px;
    gap: 12px;
  }

  .filter-search input,
  .filter-select {
    padding: 10px 15px;
    font-size: 13px;
  }

  .view-toggle {
    width: 100%;
    justify-content: center;
  }

  .product-count {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .product-image {
    height: 250px;
  }

  .product-info {
    padding: 15px;
  }

  .product-title {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .product-description {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .product-rating {
    margin-bottom: 10px;
  }

  .stars {
    font-size: 13px;
  }

  .rating-count {
    font-size: 12px;
  }

  .product-price {
    margin-bottom: 12px;
  }

  .current-price-dual .price-display {
    font-size: 1.1rem;
  }

  .price-display {
    gap: 6px;
  }

  .add-to-cart-btn {
    padding: 12px;
    font-size: 14px;
  }

  .product-badges {
    top: 10px;
    left: 10px;
  }

  .badge {
    padding: 5px 12px;
    font-size: 11px;
  }

  .wishlist-btn {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .wishlist-btn i {
    font-size: 14px;
  }

  /* Single column for mobile */
  .product-grid.list-view .product-card {
    flex-direction: column;
  }

  .product-grid.list-view .product-image {
    width: 100%;
    height: 250px;
  }
}

/* Extra Small Mobile (max 375px) */
@media (max-width: 375px) {
  .section-header h1 {
    font-size: 18px;
  }

  .category-pill {
    padding: 7px 14px;
    font-size: 11px;
  }

  .product-title {
    font-size: 15px;
  }

  .current-price-dual .price-display {
    font-size: 0.95rem;
  }

  .price-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .price-separator {
    display: none;
  }
}