/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: 80px;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 50px 0;
}

h1, h2, h3 {
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
  margin-bottom: 1rem;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 2000;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-weight: 500;
  font-size: 16px;
  transition: color 0.2s;
}

.nav-links a.active {
  color: #4caf50;
}

.nav-links a:hover {
  color: #4caf50;
}

.cart-search-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-icon, .search-icon {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.cart-icon {
  background-color: #4caf50;
  color: #fff;
}

.search-icon:hover, .cart-icon:hover {
  background-color: #3d8b40;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  padding: 8px;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
}

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

/* Search Popup */
.search-popup-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 2001;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.search-popup-container.show {
  transform: translateY(0);
}

.search-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 10px;
}

.search-container input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.search-container button {
  padding: 12px 20px;
  background: #4caf50;
  color: white;
  border-radius: 6px;
  font-weight: 500;
}

/* Main Shop Section */
.shop {
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Shop Header */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.shop-header h1 {
  font-size: 2rem;
  color: #111827;
}

.filter-sort-container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-select, .sort-select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
}

/* Cart Popup */
.cart-popup-container {
  position: fixed;
  right: 0;
  top: 84px;
  width: 100%;
  max-width: 400px;
  height: 70vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgb(53, 51, 51);
  background-color: rgb(238, 238, 238);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

.cart-popup-container.show {
  transform: translateX(0%);
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgb(177, 177, 177);
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  background: white;
}

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

.item-details-container {
  flex: 1;
  margin-left: 12px;
}

.item-details-container p {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.update-quantity-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.update-quantity-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #4caf50;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid rgb(177, 177, 177);
  background: white;
}

.subtotal-container {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.checkout-btn {
  width: 100%;
  height: 50px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: bold;
  background-color: #ffc107;
  color: #000;
  transition: background-color 0.3s;
}

.checkout-btn:hover {
  background-color: #e0a800;
}

.cart-note-container p {
  margin: 0;
  font-size: 14px;
  color: #666;
  text-align: center;
}

/* Added Message */
.added-message-container {
  position: fixed;
  top: 100px;
  right: 20px;
  background: #4caf50;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  z-index: 2000;
  transform: translateX(150%);
  transition: transform 0.3s ease;
}

.added-message-container.show {
  transform: translateX(0);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-category {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4caf50;
  margin-bottom: 16px;
}

.add-to-cart-btn {
  width: 100%;
  padding: 10px;
  background-color: #4caf50;
  color: white;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
  background-color: #3d8b40;
}

/* Show More Button */
.show-more-container {
  text-align: center;
  margin-top: 30px;
}

.show-more-btn {
  padding: 12px 30px;
  background-color: #4caf50;
  color: white;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.show-more-btn:hover {
  background-color: #3d8b40;
}

/* Footer */
footer {
  background-color: #4caf50;
  color: #fff;
  padding: 40px 20px 20px;
  margin-top: 50px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section h3 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
  margin: 8px 0;
  color: #fff;
  display: block;
}

.footer-section a:hover {
  text-decoration: underline;
}

.send-email input[type="email"] {
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 10px;
  width: 100%;
  border: none;
  border-radius: 4px;
}

.send-email button {
  padding: 10px 20px;
  background-color: #ffc107;
  color: #000;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.send-email button:hover {
  background-color: #e0a800;
}

.payment-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.payment-icons img {
  width: 50px;
  height: auto;
}

.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  .nav {
    padding: 10px 15px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 75%;
    max-width: 300px;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 20px 20px;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 2001;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  }

  .nav-links.open {
    transform: translateX(0%);
  }

  .nav-links a {
    font-size: 18px;
    padding: 8px 0;
    width: 100%;
  }

  .cart-search-container {
    flex-direction: column;
    gap: 10px;
  }

  .shop {
    padding: 20px 15px;
  }

  .shop-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-sort-container {
    width: 100%;
  }

  .filter-select, .sort-select {
    flex: 1;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .cart-popup-container {
    top: 70px;
    max-width: 100%;
    height: calc(100vh - 70px);
  }

  .added-message-container {
    top: 80px;
    right: 15px;
    left: 15px;
    text-align: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1025px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}