:root {
  --primary-color: #2e8b57;
  --secondary-color: #ffb703;
  --secondary-hover: #ffa500;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f7f7f7;
  --card-bg: #ffffff;
  --border-color: #cccccc;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

section h2 {
  color: var(--primary-color);
  font-size: 2rem;
}

.btn {
  margin-top: 15px;
  background: var(--secondary-color);
  color: var(--text-dark);
  border: none;
  padding: 15px 25px;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

.btn:hover {
  background: var(--secondary-hover);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

nav {
  display: flex;
}

.nav {
  display: none;
}

.hamburger {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.8rem;
  cursor: pointer;
  display: block;
}

.cart-icon {
  position: relative;
  color: var(--text-light);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: 15px;
}

.cart-icon span {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--secondary-color);
  color: var(--text-dark);
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.menu-sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 250px;
  height: 100%;
  background: var(--primary-color);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 80px 25px;
  gap: 25px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
  transition: right 0.4s ease;
  z-index: 200;
}

.menu-sidebar a {
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.menu-sidebar a:hover {
  color: var(--secondary-color);
}

.menu-sidebar.show {
  right: 0;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 150;
}

.menu-overlay.show {
  display: block;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main Sections */

/* Hero Section */
.hero {
  position: relative;
  background: url("https://images.unsplash.com/photo-1518843875459-f738682238a6?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTZ8fHZlZ2V0YWJsZXN8ZW58MHx8MHx8fDA%3D&fm=jpg&q=60&w=3000")
    center/cover no-repeat;
  color: var(--text-light);
  text-align: center;
  padding: 100px 20px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.hero h1,
.hero p,
.hero .btn {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
}

.hero p {
  font-size: 1rem;
}

.hero h1,
.hero p {
  max-width: 700px;
  margin: auto;
}

/* Products Section */
.products {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

.products-page {
  padding: 40px 20px;
  text-align: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}

.card h3 {
  font-size: 1rem;
}

.card p {
  color: var(--secondary-hover);
}

.add-cart-btn {
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
}

.add-cart-btn:hover {
  background: var(--secondary-color);
  color: var(--text-dark);
}

/* About Section */
.about {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 20px;
  background-color: var(--bg-light);
  text-align: center;
}

.about.content {
  order: 2;
  flex: 1;
}

.about.img {
  order: 1;
  flex: 1;
}

.about img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}

/* Contact Section */
.contact {
  padding: 50px 20px;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: auto;
}

input,
textarea {
  margin: 10px 0;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

/* Filters (Products Page) */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}

.filters input[type="text"],
.filters select,
.filters input[type="range"] {
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  font-size: 1rem;
}

#priceValue {
  color: var(--primary-color);
  font-weight: 600;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  transition: 0.4s ease;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.cart-sidebar.show {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-color);
  color: white;
  padding: 15px 20px;
}

#closeCart {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 90;
}

#overlay.show {
  display: block;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
}

.cart-item img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-item-controls button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.cart-item-controls.remove {
  background: red;
  padding: 3px 6px;
}

.cart-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid #ddd;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2e8b57;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Desktop Styles */

@media (min-width: 769px) {
  /* --- Header --- */
  header {
    padding: 20px 40px;
  }

  .nav {
    display: flex;
    gap: 15px;
  }

  .nav a {
    color: var(--text-light);
    transition: 0.3s;
  }

  .nav a:hover {
    color: var(--secondary-color);
  }

  .hamburger {
    display: none;
  }

  /* --- Hero --- */
  .hero {
    padding: 150px 50px;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  /* --- Product Grid --- */
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .card img {
    height: 200px;
  }

  /* --- About Section --- */
  .about {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 60px 50px;
    text-align: left;
  }

  .about.content {
    order: 1;
    flex: 1 1 500px;
  }

  .about.img {
    order: 2;
    flex: 1 1 450px;
  }

  .about img {
    height: 450px;
  }
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 40px 20px 20px;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  max-width: 1200px;
  margin: auto;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-logo img {
  width: 45px;
  height: 45px;
}

.footer-col h4 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  color: var(--secondary-color);
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: var(--text-light);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
}

.footer-col p {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 5px;
}

.social-links a {
  color: var(--text-light);
  font-size: 1.3rem;
  transition: 0.3s;
}

.social-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 15px;
  margin-top: 25px;
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 25px;
  background: var(--secondary-color);
  border: none;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow);
  z-index: 99;
}

.back-to-top:hover {
  background: var(--secondary-hover);
  transform: scale(1.1);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 769px) {
  .footer {
    text-align: left;
    padding: 50px 40px 20px;
  }

  .footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
  }

  .footer-col {
    align-items: flex-start;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .social-links {
    justify-content: flex-start;
  }
}

.cart-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.proceed-btn {
  background: var(--secondary-color);
  color: var(--text-dark);
}

.proceed-btn:hover {
  background: var(--secondary-hover);
}
