body {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
  color: #333;
  display: flex;
  flex-direction: column;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    text-align: center;
}

.language-selector {
  text-align: right;
  padding: 10px 20px;
}

.language-selector .active {
  font-weight: bold;
}

.container {
    max-width: 800px;
    min-height: 100%;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

h1 { margin-top: 0; }

p  { line-height: 1.6; }

.wrapper {
    text-align: center;
}

.button-container { margin-top: 30px; }

.button {
  display: inline-block;
  margin: 10px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  /* background-color: #0f77ee; */
  background-color: #3498db;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #0d6ddb;
}

.message_ok {
  display: inline-block;
  margin: 10px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #4CAF50;
  text-decoration: none;
  border: none;
  border-radius: 5px;
}

.message_fail {
  display: inline-block;
  margin: 10px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #d60606;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

main {
  flex: 1 0 auto;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #f8f8f8;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-logo {
  font-weight: bold;
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile Navigation Styles */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 1.5rem;
  color: #333;
}

.mobile-nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: #333;
  transition: transform 0.3s ease;
}

/* Responsive styles for small screens */
@media (max-width: 768px) {
  .main-nav {
    padding: 1rem;
    flex-wrap: wrap;
  }
  
  .mobile-nav-toggle {
    display: block;
    order: 3;
    margin-left: auto;
  }
  
  .nav-logo {
    order: 1;
    flex: 1;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    order: 4;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .nav-links.active {
    max-height: 300px;
  }
  
  .nav-links li {
    margin: 0.5rem 0;
  }
  
  .language-selector {
    order: 2;
    padding: 0;
    margin-right: 10px;
  }
  
}

.nav-links li {
  margin: 1rem 1rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #0066cc;
}

.nav-links a.active {
  color: #0066cc;
  border-bottom: 2px solid #0066cc;
}

.admin-button {
  background-color: #444;
}

.admin-button:hover {
  background-color: #333;
}
.admin-login {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-actions {
  margin-top: 20px;
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Admin Dashboard Styles */
.admin-dashboard {
  padding: 20px;
}

.admin-welcome {
  background-color: #e8f5e9;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.admin-section {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.admin-actions {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 4px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.logout-button {
  background-color: #f44336;
}

.logout-button:hover {
  background-color: #d32f2f;
}

/* Loader */

.loader {
  border:        16px solid #cfcece; /* Light grey */
  border-top:    16px solid #3498db; /* Blue */
  border-radius: 50%;
  width:         100px;
  height:        100px;
  margin-inline: auto;
  animation: loader_spin 2s linear infinite;
}

@keyframes loader_spin {
  0%   { transform: rotate(0deg);   }
  100% { transform: rotate(360deg); }
}

/* Progress Bar */

.meter {
  box-sizing: content-box;
  height: 20px; /* Can be anything */
  position: relative;
  margin: 60px 0 20px 0; /* Just for demo spacing */
  background: #555;
  border-radius: 25px;
  padding: 10px;
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3);
}

.meter > span {
  display: block;
  height: 100%;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  background-color: rgb(43, 194, 83);
  background-image: linear-gradient(
    center bottom,
    rgb(43, 194, 83) 37%,
    rgb(84, 240, 84) 69%
  );
  box-shadow: inset 0 2px 9px rgba(255, 255, 255, 0.3),
    inset 0 -2px 6px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.meter > span:after,
.animate > span > span {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  z-index: 1;
  background-size: 50px 50px;
  animation: move 2s linear infinite;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  overflow: hidden;
}

.animate > span:after {
  display: none;
}

@keyframes move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

.orange > span {
  background-image: linear-gradient(#f1a165, #f36d0a);
}

.red > span {
  background-image: linear-gradient(#f0a3a3, #f42323);
}

.nostripes > span > span,
.nostripes > span::after {
  background-image: none;
}

.dashboard-container {
  max-width: 1200px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-section {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
}

.user-table th, .user-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.user-table th {
  background-color: #4CAF50;
  color: white;
  font-weight: 500;
}

.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.chart {
  height: 250px;
  background-color: #f9f9f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.chart:hover {
  transform: translateY(-3px);
}

/* Product page */
.product-page {
  max-width: 1000px;
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.product-title {
  font-size: 2rem;
  margin: 0;
}

.product-tag {
  background-color: #4CAF50;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.product-main-image {
  height: 350px;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
}

.product-main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.product-thumbnails img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.product-thumbnails img:hover {
  transform: scale(1.05);
}

.product-description {
  margin-bottom: 30px;
  text-align: left;
}

.product-features {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.feature-icon {
  font-size: 2rem;
}

.producer-section {
  margin-bottom: 30px;
  text-align: left;
}

.producer-info {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.producer-image {
  flex: 0 0 150px;
}

.producer-image img {
  width: 100%;
  border-radius: 8px;
}

.producer-details {
  flex: 1;
}

.location-section {
  margin-bottom: 30px;
  text-align: left;
}

.location-caption {
  font-style: italic;
  margin-top: 10px;
  color: #666;
}

.cta-section {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 60px; /* Add space for the sticky button on mobile */
}

/* Sticky button styles */
.sticky-button-container {
  margin-top: 30px;
}

@media (max-width: 768px) {
  .sticky-button-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    margin-top: 0;
    text-align: center;
  }
  
  .sticky-button-container .button {
    margin: 0;
    width: 65%;
  }
}

@media (max-width: 768px) {
  .producer-info {
    flex-direction: column;
  }

  .producer-image {
    margin: 0 auto 15px;
  }
}

/* Product list styles */
.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-card-image {
  height: 200px;
  overflow: hidden;
}

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

.product-card-content {
  padding: 1.5rem;
}

.product-card-tag {
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
}

.product-card-description {
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.product-card-button:hover {
  background-color: #3e8e41;
}
footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: #333;
  color: #fff;
  width: 100%;
  box-sizing: border-box;
}

.footer-left {
  flex: 1;
  max-width: 70%;
}

.footer-left img {
  max-height: 60px;
  margin-bottom: 0.5rem;
}

.footer-right {
  padding-left: 1rem;
  text-align: right;
}

footer a {
  color: #4CAF50;
  text-decoration: none;
}

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

footer p {
  font-size: 0.8rem;
  margin: 0;
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
    text-align: center;
  }

  .footer-left {
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .footer-right {
    padding-left: 0;
    text-align: center;
  }

  .footer-left img {
    max-height: 50px;
  }
}
