/* Minimal Clean Design */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

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

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #44B78B;
  text-decoration: none;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 8px;
  margin-right: 20px;
}

.lang-flag {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.lang-flag:hover {
  background: rgba(68, 183, 139, 0.1);
}

.lang-flag.active {
  background: rgba(68, 183, 139, 0.2);
  box-shadow: 0 0 0 1px #44B78B;
}

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

.nav-item {
  position: relative;
  color: #333;
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.2s;
}

.nav-item:hover {
  color: #44B78B;
}

/* Dropdown Categories */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  display: none;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  display: block;
}

/* Mega dropdown layout (categories → subcategories) */
.dropdown-mega .dropdown-columns {
  display: flex;
  min-width: 560px;
}
.dropdown-mega .dropdown-cats {
  width: 240px;
  border-right: 1px solid #f0f0f0;
}
.dropdown-mega .dropdown-cat-item {
  padding: 10px 12px;
  cursor: pointer;
}
.dropdown-mega .dropdown-cat-item:hover {
  background: #f8f9fa;
  color: #44B78B;
}
.dropdown-mega .dropdown-subcats {
  flex: 1;
  padding: 10px 12px;
}
.dropdown-mega .dropdown-subcats a {
  display: inline-block;
  margin: 6px 10px 6px 0;
  padding: 6px 10px;
  border: 1px solid #eee;
  border-radius: 14px;
  text-decoration: none;
  color: #333;
  font-size: 12px;
}
.dropdown-mega .dropdown-subcats a:hover {
  border-color: #44B78B;
  color: #44B78B;
}

.dropdown-item {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: #44B78B;
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* Search */
.search-form {
  display: flex;
  max-width: 400px;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.search-input:focus {
  border-color: #44B78B;
}

.search-btn {
  padding: 8px 16px;
  background: #44B78B;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* Cart */
.cart-link {
  position: relative;
  color: #333;
  text-decoration: none;
  padding: 8px;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #e62e04;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

/* Full-screen Carousel */
.carousel {
  position: relative;
  height: 70vh;
  overflow: hidden;
  background: #f8f9fa;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img,
.carousel-slide picture {
  width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center center;
  will-change: transform;
}

/* Scaling (Ken Burns) effect only on active slide */
.carousel-slide.active img {
  animation: kenBurns 6s ease-in-out forwards;
}

.carousel-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dot.active {
  background: #44B78B;
}

/* Ken Burns keyframes */
@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.product-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-title {
  font-size: 14px;
  margin-bottom: 8px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px; /* reserve space for two lines to equalize card heights */
}

.product-price {
  font-size: 16px;
  font-weight: bold;
  color: #44B78B;
  margin-bottom: 12px;
}

.product-btn {
  width: 100%;
  padding: 10px;
  background: #44B78B;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: auto; /* push button to the bottom for equal card height */
}

.product-btn:hover {
  background: #389770;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
}

/* Desktop styles */
@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }
}

/* Mobile Bottom Bar */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .search-form {
    display: none;
  }
  
  .cart-link {
    display: none;
  }
  
  .language-switcher {
    display: none;
  }
  
  body {
    padding-bottom: 70px;
  }
  
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: flex !important;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 100;
  }
  /* Reset default button styles to avoid square borders on mobile buttons */
  .mobile-nav button.mobile-nav-item {
    background: transparent;
    border: none;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
  }
  .mobile-nav button.mobile-nav-item:focus { outline: none; }


  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    position: relative;
  }
  
  .mobile-nav-item.active {
    color: #44B78B;
  }
  
  .mobile-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0;
    line-height: 1;
    color: #6b7280; /* neutral by default */
  }
  .mobile-nav-item:hover .mobile-icon,
  .mobile-nav-item:active .mobile-icon,
  .mobile-nav-item:focus .mobile-icon {
    color: #2f8f69; /* darker green on interaction */
  }

  .cart-badge-mobile {
    position: absolute;
    top: 2px;
    right: 18px;
    background: #e62e04;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 4px;
  }
  
  .carousel {
    height: 40vh;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  /* Prevent carousel image zoom/scaling on mobile */
  .carousel-slide img {
    object-fit: contain;
    transform: none !important;
  }
  .carousel-slide.active img {
    animation: none !important;
    transform: none !important;
  }
}

/* Hide footer on mobile */
@media (max-width: 768px) {
  footer {
    display: none;
  }
}

/* Simple animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}
