/* Base Reset and Variables */
:root {
  --primary: #2563eb;
  --secondary: #7c3aed;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #94a3b8;
  --success: #2a9d8f;
  --warning: #fbbf24;
  --danger: #e63946;
}

li {
  list-style: none;
}
a {
  text-decoration: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 15px;
}

.logo {
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  font-weight: 700;
  color: white;
}

.logo span {
  color: var(--warning);
}

nav ul {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1.5rem);
}

nav a {
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--warning);
}

/* Category Header */
.category-header {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  margin-bottom: 2rem;
}

.category-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--warning);
}

.breadcrumb span {
  color: var(--light);
}

/* Filter Options */
.filter-options {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.filter-group h3 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #444;
}

.filter-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  font-size: 0.9rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.product-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-img {
  height: 200px;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.05);
}

.product-content {
  padding: 1.25rem;
}

.product-content h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: #333;
}

.product-price {
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.original-price {
  text-decoration: line-through;
  color: var(--gray);
  margin-right: 0.5rem;
}

.discount-badge {
  background: var(--danger);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.product-rating {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.stars {
  color: var(--warning);
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  background: var(--primary);
  color: white;
}

.btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-amazon {
  background: #ff9900;
  color: #111;
}

.btn-flipkart {
  background: #2874f0;
  color: white;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin: 3rem 0;
}

.pagination a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  margin: 0 0.25rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #444;
  transition: all 0.3s ease;
}

.pagination a.active,
.pagination a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: clamp(1.5rem, 4vw, 3rem) 0 1rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0 15px;
}

.footer-col h3 {
  color: var(--warning);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #cbd5e1;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: clamp(1rem, 3vw, 2rem);
  border-top: 1px solid #334155;
  color: var(--gray);
  font-size: 0.85rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 576px) {
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }
}
