/* CSS Variables */
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #7209b7;
  --accent: #f72585;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --success: #4cc9f0;
  --warning: #ff9e00;
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button,
.btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: var(--transition);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and Navigation */
.header {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo i {
  color: var(--secondary);
}

.main-nav {
  display: flex;
  gap: 25px;
}

.nav-link {
  font-weight: 600;
  color: var(--dark);
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-icons {
  display: flex;
  gap: 15px;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light);
  color: var(--primary);
  transition: var(--transition);
  position: relative;
}

.nav-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
  background: rgba(67, 97, 238, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-container {
  display: flex;
  max-width: 500px;
  width: 100%;
}

.search-bar input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 30px 0 0 30px;
  border: 2px solid #e0e7ff;
  border-right: none;
  font-size: 1rem;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-bar .btn {
  padding: 12px 24px;
  border-radius: 0 30px 30px 0;
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.search-bar .btn:hover {
  background: var(--primary-dark);
}

/* Banner */
.banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-align: center;
  padding: 70px 20px 50px;
  margin: 0 auto 40px;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.05"><polygon points="1000,100 1000,0 0,100"></polygon></svg>');
  background-size: cover;
}

.banner-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.banner h1 {
  font-size: 3rem;
  margin-bottom: 16px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.banner p {
  font-size: 1.3rem;
  margin-bottom: 25px;
  opacity: 0.9;
}

.banner .btn {
  background: white;
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.banner .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 20px 0 40px;
}

.section-title {
  font-size: 1.8rem;
  margin: 30px 0 20px;
  color: var(--dark);
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* Categories */
.categories {
  display: flex;
  gap: 15px;
  margin: 25px 0;
  overflow-x: auto;
  padding: 10px 5px;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.category-btn {
  padding: 10px 20px;
  background: white;
  border-radius: 30px;
  font-weight: 600;
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  transition: var(--transition);
  border: 2px solid transparent;
}

.category-btn.active,
.category-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Product Grid and Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 0;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--hover-shadow);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 20px;
}

.product-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--dark);
}

.product-card .category {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card .price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin: 10px 0;
}

.product-card .description {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 15px;
  line-height: 1.5;
}

.product-card .button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.product-card .btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(67, 97, 238, 0.1);
}

.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 50px 0 30px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--success);
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column a {
  color: #adb5bd;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #adb5bd;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    padding: 15px 0;
  }

  .main-nav {
    display: none;
  }

  .banner h1 {
    font-size: 2.2rem;
  }

  .banner p {
    font-size: 1.1rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .categories {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .logo span {
    display: none;
  }

  .banner {
    padding: 50px 15px 40px;
  }

  .banner h1 {
    font-size: 1.8rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}