@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #FFFFFF;
  color: #333;
  line-height: 1.6;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scrollbar */
}

.top-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%; /* Ensure container stays within viewport */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%; /* Ensure container fits viewport */
}

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

.header {
  background-color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 15px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo img {
  height: 50px;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.logo-text h1 {
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-text p {
  font-size: 0.75rem;
  color: #666;
}

.nav {
  display: flex;
  gap: 20px;
  transition: all 0.3s ease;
}

.nav-link {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #1A3C34;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: #1A3C34;
  font-weight: bold;
}

.nav-link:hover {
  color: #1A3C34;
}

.menu-toggle-checkbox {
  display: none;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  border: none;
  background: none;
  cursor: pointer;
  color: #1A3C34;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

/* Products Dropdown */
.nav .nav-link.products-link {
  position: relative;
}

.nav .nav-link.products-link:hover .dropdown {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1A3C34;
  min-width: 200px;
  max-width: 100%; /* Prevent dropdown from exceeding viewport */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  padding: 0.5rem 0;
}

.dropdown a {
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  display: block;
  font-weight: 600;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.dropdown a:hover {
  background-color: #A9C9A4;
}

/* Animations for Navbar */
[data-animate="fade-in"] {
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.about-section {
  padding: 60px 0;
  background-color: #FFFFFF;
}

.content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.text-content,
.image-content {
  flex: 1;
  min-width: 0;
}

.text-content h2 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.text-content p {
  font-size: 1rem;
  color: #666;
}

.image-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.overlay {
  position: relative;
  margin-top: 0.5rem;
  text-align: center;
}

.overlay p {
  font-size: 1rem;
  font-weight: bold;
  color: #004c3f;
  margin: 0;
}

.overlay img {
  display: none;
}

.category-nav {
  margin-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #4b5563;
  width: 100%;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.tab-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: #eff6ff;
  color: #004c3f;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
  white-space: nowrap;
  max-width: 100%; /* Prevent overflow */
}

.tab-button:hover, .tab-button.active {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.product-item {
  position: relative;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  cursor: pointer;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.product-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  transition: filter 0.3s ease-in-out;
}

.product-item:hover .product-image {
  filter: brightness(0.8);
}

.product-description {
  font-size: 0.9rem;
  margin: 0.5rem 0;
  color: #666;
  overflow-wrap: break-word; /* Prevent long text from overflowing */
}

.add-to-cart {
  background: #A9C9A4;
  border: none;
  padding: 8px 16px;
  color: #fff;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: transform 0.3s;
}

.add-to-cart:hover {
  transform: scale(1.05);
}

.cart-icon {
  margin-left: 1rem;
  color: #A9C9A4;
  font-size: 1.2em;
  cursor: pointer;
  position: relative;
}

#cart-count {
  background: #004c3f;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
  position: absolute;
  top: -5px;
  right: -10px;
}

.main-content-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  margin-top: 2rem;
  width: 100%;
}

.footer {
  background-color: #1A3C34;
  color: #bbb;
  padding: 40px 0;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.footer-section h4 {
  font-weight: bold;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.footer-section p {
  font-size: 0.875rem;
}

.footer-section a {
  color: #bbb;
  text-decoration: none;
}

.footer-section a:hover {
  color: #FFFFFF;
}

.footer-text {
  font-size: 0.75rem;
  border-top: 1px solid #666;
  padding-top: 10px;
  text-align: center;
}

.footer-section img {
  width: 80px;
  height: 84px;
  margin-right: 10px;
}

.action-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}

.action-button {
  background-color: #A9C9A4;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s;
}

.action-button:hover {
  transform: scale(1.1);
}

.action-button svg {
  fill: none;
  stroke: #FFFFFF;
  width: 24px;
  height: 24px;
}

/* Additional styles for product details, cart, etc. */
.product-details {
  padding-top: 120px;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.product-details .container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

.back-button {
  position: absolute;
  top: 10px;
  left: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #A9C9A4;
  transition: color 0.3s;
}

.back-button:hover {
  color: #004c3f;
}

#product-info {
  margin-top: 20px;
  width: 100%;
}

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

/* Cart Page Specific Styles */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  transition: box-shadow 0.3s;
  width: 100%;
  flex-wrap: wrap; /* Allow wrapping to prevent overflow */
}

.cart-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item span {
  flex: 1;
  font-size: 1rem;
  color: #333;
  min-width: 0;
  overflow-wrap: break-word; /* Prevent long text from overflowing */
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1rem;
  min-width: 0;
}

.qty-btn {
  background: #1A3C34;
  border: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

.qty-btn:hover {
  background: #A9C9A4;
}

.remove-item {
  background: transparent;
  border: none;
  color: #1A3C34;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  transition: color 0.3s;
}

.remove-item:hover {
  color: #A9C9A4;
}

.cart .section-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #1A3C34;
  text-align: center;
}

.cart .continue-shopping {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #eff6ff;
  border-radius: 9999px;
  color: #1A3C34;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.cart .continue-shopping:hover {
  background-color: #dbeafe;
  color: #1d4ed8;
}

#proceed-to-checkout {
  display: inline-block;
  margin-top: 1rem;
  padding: 10px 20px;
  background: #A9C9A4;
  color: #fff;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.3s, background 0.3s;
  width: 100%;
  max-width: 200px;
  text-align: center;
}

#proceed-to-checkout:hover {
  transform: scale(1.05);
  background: #1A3C34;
}

@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .product-item {
    padding: 0.75rem;
  }

  .category-tabs {
    gap: 0.3rem;
  }

  .tab-button {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 40;
    padding: 1rem 0;
  }

  .menu-toggle-checkbox:checked ~ .nav {
    display: flex;
  }

  .nav-link {
    margin: 0;
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e9e9e7;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav .nav-link.products-link .dropdown {
    display: none !important;
  }

  .content-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .image-parent {
    order: -1;
    max-width: 100%;
  }

  .image-content-two {
    display: none;
  }

  .text-content h2 {
    font-size: 2rem;
    text-align: center;
  }

  .text-content p {
    text-align: center;
  }

  .overlay {
    position: relative;
    margin: 0.5rem auto;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
  }

  .overlay p {
    font-size: 0.9rem;
    font-weight: bold;
    color: #004c3f;
    margin: 0;
  }

  .overlay img {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .product-item {
    padding: 0.5rem;
    flex-direction: column;
    align-items: center;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .quantity-controls {
    margin: 0.5rem 0;
    width: 100%;
    justify-content: center;
  }

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

  .action-buttons {
    bottom: 15px;
    right: 15px;
    gap: 8px;
  }

  .action-button {
    width: 45px;
    height: 45px;
  }

  .action-button svg {
    width: 20px;
    height: 20px;
  }

  .product-details {
    padding-top: 100px;
    min-height: calc(100vh - 100px);
  }

  .back-button {
    top: 5px;
    left: 10px;
    font-size: 1.3rem;
  }

  #proceed-to-checkout {
    max-width: 180px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .product-item {
    padding: 0.5rem;
  }

  .category-tabs {
    gap: 0.2rem;
  }

  .tab-button {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
  }

  .cart-item {
    padding: 0.5rem;
  }

  .cart .section-title {
    font-size: 1.3rem;
  }

  .action-buttons {
    bottom: 10px;
    right: 10px;
  }

  .action-button {
    width: 40px;
    height: 40px;
  }

  .action-button svg {
    width: 18px;
    height: 18px;
  }

  .product-details {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
  }

  .back-button {
    font-size: 1.2rem;
  }

  .product-info {
    margin-top: 15px;
  }
}

@media (max-width: 360px) {
  .logo-text h1 {
    font-size: 1rem;
  }

  .logo-text p {
    font-size: 0.65rem;
  }

  .logo img {
    height: 40px;
  }

  .cart-icon {
    font-size: 1em;
  }

  #cart-count {
    font-size: 0.7rem;
    padding: 1px 5px;
  }
}