body {
  font-family: Arial, sans-serif;
  background: #f3f1ec; /* warm parchment */
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Premium Announcement Bar */
.announcement-bar {
  background: #1b431e; /* Deeper, richer green */
  color: white;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.announcement-bar:hover {
  background: #235527;
  transform: translateY(1px);
}

.announcement-bar .alert-icon {
  width: 20px;
  height: 20px;
  animation: bell-swing 3s infinite ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

@keyframes bell-swing {
  0% { transform: rotate(0); }
  10% { transform: rotate(12deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(4deg); }
  40% { transform: rotate(0); }
  100% { transform: rotate(0); }
}

.announcement-bar .live-tag {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  color: white;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
  
  header {
    position: relative;
    color: white;
    padding: 3.5rem 1.5rem 1.75rem;
    text-align: center;
    width: 100%;
    z-index: 1; /* Lower than modal z-index */
  
    /* Cozy village background */
    background-image:
      linear-gradient(
        rgba(32, 45, 32, 0.55),
        rgba(32, 45, 32, 0.75)
      ),
      url("assets/village-optimized.jpg");
  
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  header h1 {
    margin: 0;
    font-size: 2.25rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    word-wrap: break-word;
  }

  @media (max-width: 480px) {
    header h1 {
      font-size: 1.75rem;
    }
    header {
      padding: 3.5rem 1rem 1.5rem;
    }
  }
  
  header p {
    margin: 0.6rem 0 1rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    color: white;
  }

  .header-left p {
    color: white !important;
  }

  /* Hero Section for all pages */
  .feature-hero {
    margin-top: 1.1rem;
    display: flex;
    justify-content: center;
  }
  .feature-hero-inner {
    max-width: 1100px;
    width: calc(100% - 2rem);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    backdrop-filter: blur(8px);
    text-align: left;
  }
  .feature-hero-inner h2 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    color: white;
  }
  .feature-hero-inner p {
    margin: 0;
    opacity: 0.92;
    color: white;
  }
  
  /* Tabs look like soft wood/foliage */
  .tabs {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(70, 110, 70, 0.45);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 0.35rem;
    border-radius: 999px;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }
  
  .products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
    align-items: stretch;
  
    max-width: 1400px;   /* wider container */
    margin: 2.5rem auto;
    padding: 0 2rem;     /* soft edge padding */
  }
  .product {
    background: #faf9f6;
    padding: 0.9rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;

    border: 1px solid #e2ddd2;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
  }

  .product:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
  }

  button {
    transition: transform 0.1s ease, filter 0.2s ease;
  }

  button:active {
    transform: scale(0.96);
  }

.product-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8f5e9, #dcedc8);
  background-image: var(--img, linear-gradient(135deg, #e8f5e9, #dcedc8));
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: inset 0 -40px 60px rgba(0, 0, 0, 0.15);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.16));
  pointer-events: none;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cart {
  background: white;
  margin: 1rem;
  padding: 1rem;
  border-radius: 8px;
}

  /* NEW Robust Centering Class */
  .btn-flex-center {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
  }

.product-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.product-actions button {
  flex: 1;
  max-width: calc(50% - 0.25rem);
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  min-height: 36px;
}

.product-actions button.ghost {
  background: transparent;
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.35);
}

.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  max-width: 1400px;
  margin: 2.5rem auto -1rem;
  gap: 1.5rem;
  position: relative;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  overflow: visible; /* Allow pulse/lift without clipping */
  padding: 8px 0; /* Vertical breathing room for animations */
}

.category-btn {
  background: white;
  color: #2e3a2e;
  border: 1px solid #e2ddd2;
  padding: 0.6rem 1.35rem; /* Slightly larger targets */
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.category-btn:hover {
  background: #fdfaf3;
  border-color: #2e7d32;
  transform: translateY(-2px); /* Lift higher */
}

.category-btn.active {
  background: #2e7d32;
  color: white;
  border-color: #2e7d32;
  box-shadow: 0 6px 15px rgba(46, 125, 50, 0.2);
}

@media (max-width: 600px) {
  .sort-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 0 1.5rem;
    margin-top: 1.5rem;
  }

  .category-filters {
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .sort-trigger {
    width: 100%;
    justify-content: center;
  }
  
  .sort-menu {
    left: 1.5rem !important;
    right: 1.5rem !important;
    width: auto !important;
    max-width: none !important;
  }
}

.sort-trigger {
  background: #fff;
  border: 1px solid #e2ddd2;
  border-radius: 14px;
  padding: 0.5rem 0.75rem;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #1f2a1f;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.sort-trigger .chevron {
  font-size: 1rem;
}

.sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 2rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e2ddd2;
  box-shadow: 0 18px 38px rgba(0,0,0,0.14);
  display: none;
  min-width: 160px;
  overflow: hidden;
  z-index: 20;
}

.sort-menu.open {
  display: block;
}

.sort-menu button {
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border: none;
  background: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2b2b2b;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.sort-menu button:hover {
  background: #f6f6f6;
}

.sort-menu button.active {
  background: #e1f2e5;
  color: #2e7d32;
}

.product h2 {
  margin: 0;
}

.product p {
  margin: 0;
  color: #354335;
}

.product-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #496149;
}

.stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #2e7d32; /* Dark green back */
  color: #e8f5e9; /* Light green text */
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
}

.stock-chip:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.stock-chip.out-of-stock {
  background: rgba(46, 125, 50, 0.1);
  color: #24592a;
  cursor: default;
  pointer-events: none;
  transform: none;
}

.qty-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.28);
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
}

.qty-pill.show {
  display: inline-flex;
}

.qty-pill-number {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  color: #1f2a1f;
}

.qty-pill button {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(46, 125, 50, 0.4);
  color: #24592a;
  background: white;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.qty-pill button:hover {
  background: rgba(46, 125, 50, 0.1);
}

/* Custom Modal Styling */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: #faf9f6;
  border: 1px solid #e2ddd2;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  position: relative;
  text-align: center;
}

.modal-content h2 {
  margin-top: 0;
  color: #2e7d32;
  margin-bottom: 0.75rem;
}

.modal-content p {
  color: #4b4b4b;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-btn {
  width: 100%;
  padding: 0.85rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.modal-btn.primary {
  background: #2e7d32;
  color: white;
}

.modal-btn.secondary {
  background: white;
  color: #2e7d32;
  border: 1px solid #2e7d32;
}

.modal-btn:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
}

.waitlist-input {
  width: 100%;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid #d5d5d5;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  display: none;
}

.waitlist-input.show {
  display: block;
}

.feature-actions .qty-pill {
  margin-left: 0.25rem;
}

.waitlist-btn {
  background: #f5f5f5;
  color: #1f2a1f;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

button.disabled {
  opacity: 0.35;
  pointer-events: none;
}
  .tab {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    opacity: 0.9;
    font-size: 1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
  }

  @media (max-width: 480px) {
    .tabs {
      gap: 0.2rem;
      padding: 0.25rem;
      display: inline-flex; /* Use inline-flex to hug content */
      margin: 1rem auto 0; /* Center it */
    }
    .tab {
      padding: 0.4rem 0.55rem;
      font-size: 0.8rem;
      flex-shrink: 0;
    }
  }
  
  .tab:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
  }
  
  .tab.active {
    background: white;
    color: #2e7d32;
    opacity: 1;
  }

  .tab-important {
    font-weight: 800;
  }

  .tab-important.active {
    background: white;
    border: 1px solid white;
  }
  
  .coming-soon {
    background: white;
    margin: 1rem;
    padding: 1.25rem;
    border-radius: 8px;
  }
/* Cart in top-right (keeps centered header layout) */
header {
  position: relative; /* needed for absolute cart positioning */
}
header::after {
  content: "";
  display: block;
  height: 12px;
}


.cart-btn, .account-btn {
  position: absolute;
  top: 14px;
  background: rgba(92, 64, 51, 0.55); /* warm brown */
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.55rem 0.8rem;
  min-height: 42px;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  z-index: 100;
}

.cart-btn {
  right: 14px;
  display: none; /* Temporarily hidden for local popup focus */
}

.cart-dropdown {
  display: none !important; /* Temporarily hidden for local popup focus */
}

.account-btn {
  right: 14px;
}

.account-dropdown {
  display: none;
  position: absolute;
  right: 14px;
  top: 56px;
  width: 180px;
  background: white;
  color: #222;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  padding: 0.5rem;
  z-index: 1000;
  text-align: left;
}

.account-dropdown.open {
  display: block;
}

.account-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #2b2b2b;
  border: none;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: block;
  text-decoration: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.account-menu-item:hover {
  background: #f6f6f6;
  color: #2e7d32;
}

.cart-btn:hover, .account-btn:hover {
  background: rgba(92, 64, 51, 0.7);
}

.secondary-btn {
  background: #f3f4f6;
  color: #222;
}
@media (max-width: 1100px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr;
  }
}

/* Global Micro-interactions */
button {
  transition: transform 0.1s ease, filter 0.2s ease;
}

button:active {
  transform: scale(0.96);
}

@keyframes cart-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.cart-badge.bump {
  animation: cart-pulse 0.3s ease-out;
}

/* Global Footer */
.site-footer {
  background: #faf9f6;
  border-top: 1px solid #e2ddd2;
  padding: 4rem 2rem;
  margin-top: 5rem;
  text-align: center;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  color: #2e7d32;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: block;
  text-decoration: none;
}

.footer-tagline {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.social-link {
  color: #2e7d32;
  width: 44px;
  height: 44px;
  background: white;
  border: 1px solid #e2ddd2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.social-link:hover {
  transform: translateY(-5px);
  background: #2e7d32;
  color: white;
  border-color: #2e7d32;
  box-shadow: 0 10px 20px rgba(46, 125, 50, 0.15);
}

.footer-copyright {
  color: #999;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
