@import url(./product-detail.css);
@import url(./card.css);
@import url(./contact.css);
@import url(./checkout.css);

:root {
    --primary-color: #5D9C59;
    --secondary-color: #F9A825;
    --font-color: #333;
    --color-accent: #E67E22;
    --bg-color: #F5F5DC;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--font-color);
  font-family: var(--font-main);
  font-weight: 500;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: flex-end;
}

.nav-header {
  background-color: #ffb121;
  padding: 10px 0;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.nav-bounds {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
}

.nav-logo {
  height: 70px;
  border-radius: 12px;
  transition: transform 0.3s ease;
}
.nav-logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: black;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.nav-links a.active {
  background-color: var(--primary-color);
  color: white;
}

.cart {
  font-size: 20px;
  cursor: pointer;
  font-weight: bold;
}

.cart-link {
  position: relative;
  text-decoration: none;
  color: white;
}

.cart-link i {
  transition: transform 0.3s ease, color 0.3s ease;
}

.cart-link:hover i {
  transform: scale(1.15);
  color: var(--primary-color);
}


.cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--color-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.admin-btn {
  background: var(--primary-color);
  color: white !important;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.admin-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.admin-btn i {
  font-size: 1rem;
}

.search-bar {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 500px;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #ccc;
}

.search-bar input {
  border: none;
  outline: none;
  padding: 8px 12px;
  font-size: 14px;
  flex: 1;
}

.search-bar button {
  background: var(--primary-color);
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar button:hover {
  background: var(--secondary-color);
}

.search-bar svg {
  width: 18px;
  height: 18px;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px;
  gap: 28px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
  box-sizing: border-box;
}

.about-sammasati {
  padding: 20px;
  background-color: #ffffff;
  border-radius: 12px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.about-sammasati h2 {
  color: var(--primary-color);
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.about-sammasati p {
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.about-gallery {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.about-gallery img {
  width: 30%;
  border-radius: 8px;
  object-fit: cover;
}

.shop-intro {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px 20px;
  margin: 20px auto;
  width: 100%;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.shop-intro h2 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.shop-intro p {
  font-size: 1rem;
  color: var(--font-color);
  line-height: 1.4;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.category-list li {
  margin: 10px 0;
}

.category-list a {
  text-decoration: none;
  color: var(--font-color);
}

.category-list a:hover {
  color: var(--primary-color);
}

.contact-form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin: 8px 0 4px;
}

.contact-form input,
.contact-form textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.contact-form button {
  margin-top: 10px;
  padding: 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--secondary-color);
}

.filters {
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filters h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.filters-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filters-options .filter {
  background-color: var(--primary-color); 
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filters-options .filter:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filters-options .filter.active {
  background-color: var(--secondary-color);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(249, 168, 37, 0.4);
}

.filters-options .filter:active {
  transform: translateY(0);
}

.product-container {
  flex: 1;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
}

.product-item {
  border-radius: 10px;
  background-color: #ffffff;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.product-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 12px;
  object-fit: cover;
}

.product-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

.product-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-item h4 {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 10px 0 6px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: color 0.3s ease;
}

.product-item p {
  font-size: 1rem;
  color: var(--font-color);
  margin: 6px 0;
  font-weight: 500;
  transition: color 0.3s ease;
}

.product-item:hover h4 {
  color: var(--secondary-color);
}

.product-item:hover p {
  color: #555;
}

.product-item .price {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-accent);
}

.product-item button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.product-item button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

.price {
  font-weight: bold;
  color: var(--color-accent);
  font-size: 0.95rem;
  margin: 8px 0;
}

.product-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.product-detail {
  background-color: #ffffff;
  border-radius: 16px;
  margin-top: 10px;
  padding: 20px;
  font-size: 16px;
  color: var(--font-color);
}

footer {
  background-color: #000000;
  color: white;
  text-align: center;
  padding: 20px 0;
  width: 100%;
  position: relative;
  bottom: 0;
  left: 0;
  z-index: 100;
}

footer p {
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icons a {
  color: white;
  font-size: 24px;
  transition: color 0.3s ease, transform 0.2s ease;
}

.social-icons a:hover {
  color: var(--secondary-color);
  transform: scale(1.1);
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.quantity-input {
  width: 60px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
  text-align: center;
}

.stock-info {
  color: #555;
  font-size: 0.9rem;
  margin-top: 5px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

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

.toast.hidden {
  display: none;
}


@media (max-width: 768px) {
  main {
    flex-direction: column;
    padding: 16px;
  }

  .about-sammasati,
  .shop-intro,
  .product-container {
    width: 100% !important;
    padding: 20px 16px;
  }

  .about-gallery {
    grid-template-columns: 1fr !important;
  }

  .product-list {
    grid-template-columns: 1fr !important; 
  }

  .nav-bounds {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-bar {
    order: 2;
    width: 100%;
  }
  .nav-links {
    order: 3;
    justify-content: center;
    flex-wrap: wrap;
  }
  .nav-logo {
    order: 1;
    align-self: center;
  }
  .nav-links a {
    width: 100%;
    text-align: center;
  }
  aside {
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 20px;
  }
  .product-list {
    grid-template-columns: repeat(1, 1fr); 
  }
  .filters {
    justify-content: center;
    text-align: center;
  }

  .filters-options {
    justify-content: center;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .filters-options .filter {
    flex: 1 1 calc(50% - 12px);
    text-align: center;
  }
}

@media (max-width: 480px) {
  main {
    width: 100%;
    box-sizing: border-box;
  }
  .about-sammasati h2 {
    font-size: 1.1rem;
  }
  .about-sammasati p {
    font-size: 0.9rem;
  }
  .about-gallery img {
    width: 100%;
    max-width: 100%;
  }
  .shop-intro h2 {
    font-size: 1.3rem;
  }
  .product-item h4 {
    font-size: 1rem;
  }
  .product-item p {
    font-size: 0.9rem;
  }
  footer {
    position: relative;
  }
  .filters-options .filter {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (min-width: 1025px) {
  body {
    padding-bottom: 120px; 
  }
  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
  }
}

