/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --dark: #212529;
  --text: #333;
  --text-light: #6c757d;
  --white: #fff;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background-color: #f9fafc;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Navbar */
.navbar {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a:focus {
  color: white;
}

.menu-toggle {
  display: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main Layout */
.main-grid {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 2rem;
  margin: 2rem 0;
}

/* Products */
.products h2 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  color: var(--dark);
  position: relative;
  padding-bottom: 0.5rem;
}

.products h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.product-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: block;
  min-height: 300px;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.product-item h3 {
  font-size: 1.1rem;
  margin: 1rem 1rem 0.5rem;
}

.product-item p {
  color: var(--text-light);
  padding: 0 1rem 0.8rem;
  font-size: 0.95rem;
}

.price {
  font-weight: bold;
  color: #2e7d32;
  padding: 0 1rem 1rem;
  font-size: 1.2rem;
}

/* Sidebar */
.sidebar h2 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  color: var(--dark);
  position: relative;
  padding-bottom: 0.5rem;
}

.sidebar h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.social-icons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: var(--white);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateX(5px);
}

.social-link i {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover i {
  background: white;
  color: var(--primary);
}

/* Newsletter */
.newsletter {
  margin-top: 1.5rem;
}

.newsletter h3 {
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: var(--text-light);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.newsletter input,
.newsletter button {
  width: 100%;
  padding: 0.6rem;
  margin: 0.4rem 0;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 1rem;
}

.newsletter input {
  outline: none;
}

.newsletter button {
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter button:hover {
  background: var(--primary-dark);
}

/* Footer */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-col p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col a:hover {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.sidebar-toggle {
  display: none;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 300px;
  text-align: center;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: var(--primary-dark);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: white;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    padding: 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    color: var(--dark);
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
  }

  .product-item,
  .product-item h3,
  .product-item p,
  .price {
    text-align: center;
  }

  .product-item img {
    height: 220px;
  }

  .sidebar {
    order: 2;
    margin-top: 2rem;
  }

  .social-link {
    padding: 1rem;
    font-size: 1.05rem;
    gap: 1rem;
  }

  .social-link i {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .newsletter input,
  .newsletter button {
    padding: 0.8rem;
    font-size: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-col h3 {
    font-size: 1.3rem;
  }

  .footer-col p,
  .footer-col ul li {
    font-size: 1rem;
  }

  .copyright {
    font-size: 0.95rem;
  }
}