/* Global Styles */
:root {
  --primary-color: #232f3e;
  --secondary-color: #febd69;
  --accent-color: #ff9900;
  --light-color: #f3f3f3;
  --dark-color: #131921;
  --text-color: #a5a5a5;
  --border-color: #ddd;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  font-size: 62.5%;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  padding: 5px 10px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  font-size: 1.4rem;
  font-weight: 400;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.hero-btn {
  padding: 10px 20px;
}

.btn:hover {
  background-color: var(--accent-color);
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background-color: #e68900;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Header Styles */
header {
  background-color: var(--dark-color);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.logo a {
  font-size: 3rem;
  font-weight: bold;
  color: var(--secondary-color);
}

.logo i {
  font-size: 3rem;
  margin-right: 2rem;
}
.logo span {
  color: white;
  font-size: 3rem;
}

.logo .fa-shopping-bag {
  font-size: 3rem;
}

.search-box {
  flex-grow: 1;
  max-width: 600px;
  margin: 0 20px;
  display: flex;
  position: relative;
}

.search-box input {
  flex-grow: 1;
  padding: 12px;
  border: none;
  border-radius: 15px;
  font-size: 1.3rem;
}

.search-box button {
  background-color: var(--secondary-color);
  border: none;
  padding: 0 20px;
  cursor: pointer;
  border-radius: 0 15px 15px 0;
  position: absolute;
  right: -5px;
  height: 100%;
  transform: translate(-50% -50%);
  font-size: 2.3rem;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.5rem;
  padding: 40px 0;
  color: #555;
}

.user-actions {
  display: flex;
  align-items: center;
  position: relative;
}

.user-actions a {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-actions span {
  font-size: 1.2rem;
}

.user-actions i {
  font-size: 2rem;
  margin-bottom: 5px;
}

.wishlist-count {
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  position: absolute;
  top: -5px;
  right: 37px;
}

.cart-count {
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  position: absolute;
  top: -5px;
  right: -15px;
}

.main-nav {
  background-color: var(--primary-color);
  padding: 10px 0;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
}

.main-nav li {
  margin-right: 20px;
}

.main-nav a {
  color: white;
  font-size: 14px;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--secondary-color);
}
.main-nav .fa-bars {
  font-size: 1.4rem;
  margin-right: 5px;
}

/* Hero Section */
.hero {
  background:
    linear-gradient(rgba(14, 13, 13, 0.6), rgba(22, 21, 21, 0.6)),
    url("images/bg_1.png");
  background-size: cover;
  background-position: center;
  color: rgb(40, 40, 41);
  padding: 80px 0;
  text-align: center;
  margin-bottom: 30px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
   color: white;
}

.hero p {
  font-size: 20px;
  font-weight: bold;
  max-width: 800px;
  margin: 0 auto 30px;
  color: white;
}

.shop-by-category {
  display: flex;
  flex-direction: column;
  text-align: center;
  margin-bottom: 10px;
}

.shop-by-category h1 {
  font-size: 4rem;
  color: #46505e;
}

.shop-by-category p {
  font-size: 1.4rem;
}

.category-wrapper {
  overflow: hidden;
  width: 100%;
}

.category-track {
  display: flex;
  gap: 20px;
  width: max-content;
}

.category-track a {
  text-decoration: none;
  color: inherit;
}
.card {
  width: 300px;
  height: 300px;
  padding: 20px 30px;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* IMAGE WRAPPER */
.image {
  width: 100%;
  height: 80%;
  overflow: hidden;
  border-radius: 10px;
}

.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* TEXT SECTION */
.category-info h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-info p {
  font-size: 1.4rem;
  color: #555;
}

.category-info span {
  margin-right: 5px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #111;
}
/* Main Content */
.main-content {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
}

/* Filters Sidebar */
.filters-sidebar {
  flex: 0 0 280px;
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 130px;
}

.filters-sidebar h2 {
  font-size: 18px;
}

.filter-section {
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 18px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-options.category {
  height: 200px;
  overflow-y: auto;
}

.filter-option {
  display: flex;
  align-items: center;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

.filter-option label {
  cursor: pointer;
  font-size: 1.2rem;
}

.price-range {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.price-range span {
  font-size: 1.3rem;
}
.price-range input {
  width: 45%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1.3rem;
}

.brand {
  height: 200px;
  overflow-y: auto;
}
/* Products Grid */
.products-section {
  flex: 1;
  font-size: 1.3rem;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background-color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.products-header h2 {
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 500;
}

.sort-options {
  display: flex;
  align-items: center;
}

.sort-options span {
  font-size: 1.3rem;
}

.sort-options select {
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-left: 10px;
  font-size: 1.3rem;
}

.sort-options select option {
  font-size: 1.3rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}
.products-grid.no-results {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.5rem;
  padding: 40px 0;
  color: #555;
}

.product-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--danger-color);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  z-index: 1;
}

.product-image {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
}

.product-image img {
  max-height: 100%;
  object-fit: contain;
  transition: all 500ms ease-in-out;
  cursor: pointer;
}

.product-image img:hover {
  transform: scale(1.2);
}

.product-info {
  padding: 20px;
}

.product-category {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.product-name {
  font-weight: bold;
  margin-bottom: 5px;
  /* height: 40px; */
  overflow: hidden;
}

.product-name small {
  font-size: 1rem;
  font-weight: 400;
}

.product-rating {
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.product-rating i,
.product-rating span {
  font-size: 1.3rem;
}

.product-price {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.current-price {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
}

.original-price {
  display: inline-block;
  position: relative;
  color: #999;
  margin-left: 10px;
  font-size: 1.7rem;
  text-decoration-color: red;
  text-decoration-thickness: 3px;
}

.original-price::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: red;
  transform: rotate(-15deg);
}

.discount {
  color: var(--danger-color);
  font-weight: bold;
  margin-left: 10px;
  font-size: 1.3rem;
}

.product-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wishlist-icon i {
  color: var(--secondary-color);
  font-size: 4rem;
  cursor: pointer;
  transition: all 300ms ease;
}

.wishlist-icon i:hover {
  color: var(--danger-color);
}

.wishlist-icon i.selected {
  color: var(--danger-color);
}

.wish-cart.active {
  color: var(--danger-color);
}

.pagination {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;

  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 15px 10px;
}

.pagination i {
  cursor: pointer;
  font-size: 1.4rem;
}

.pagination span {
  font-size: 1.5rem;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h3 {
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  font-size: 1.2rem;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-section p {
  font-size: 1.2rem;
}

.footer-section .fab {
  font-size: 1.5rem;
  margin-right: 10px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-bottom p {
  font-size: 1.3rem;
}

/* API Integration Note */
.api-note {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--accent-color);
}

.api-note h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.api-note p {
  margin-bottom: 15px;
}

.code-block {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
  font-family: monospace;
  overflow-x: auto;
}

.suggested-products .products-grid {
  display: flex;
  align-items: center;
  position: relative;
  gap: 1rem;
}

.suggested-products .products-grid .grid {
  display: flex;
  gap: 1rem;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 1rem 0;
  width: 100%;
}

.fa-chevron-left, 
.fa-chevron-right {
  font-size: 3.5rem;
  cursor: pointer;
  padding: 1rem;
  user-select: none;
}

.suggested-products .products-grid .grid .product-card {
  min-width: 220px; 
  flex-shrink: 0;
}
/* Spinner */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #666;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
  }

  .filters-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .top-nav {
    flex-wrap: wrap;
  }

  .search-box {
    order: 3;
    margin-top: 15px;
    max-width: 100%;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .products-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .user-actions a span:not(.cart-count) {
    display: none;
  }

  .user-actions a {
    margin-left: 15px;
  }

  .hero {
    padding: 50px 0;
  }

  .hero h1 {
    font-size: 28px;
  }
}
