/* Global Styles */
:root {
  --color-honey-gold: #e6b325;
  --color-amber-yellow: #f7c948;
  --color-cream-white: #fff8e7;
  --color-warm-brown: #5a3e2b;
  --color-soft-beige: #f1e3c1;
  --color-accent-olive: #a3a847;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Georgia", serif;
  background: linear-gradient(135deg, #fff8e7 0%, #fdf3d7 50%, #fff8e7 100%);
  background-attachment: fixed;
  color: var(--color-warm-brown);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

/* Honeycomb Background Pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 20% 50%, rgba(230, 179, 37, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, rgba(165, 168, 71, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

/* Animated Bees */
.bee {
  position: fixed;
  font-size: 24px;
  opacity: 0.6;
  z-index: 10;
  animation: fly 15s infinite ease-in-out;
}

.bee-1 {
  top: 10%;
  right: 10%;
  animation: fly-diagonal-1 20s infinite ease-in-out;
}

.bee-2 {
  top: 60%;
  left: 5%;
  animation: fly-diagonal-2 25s infinite ease-in-out;
}

.bee-3 {
  bottom: 20%;
  right: 15%;
  animation: fly-diagonal-3 30s infinite ease-in-out;
}

@keyframes fly-diagonal-1 {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(30px, -40px);
  }
  50% {
    transform: translate(0, 0);
  }
  75% {
    transform: translate(-30px, -40px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes fly-diagonal-2 {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(40px, 20px);
  }
  50% {
    transform: translate(30px, 40px);
  }
  75% {
    transform: translate(-30px, 20px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes fly-diagonal-3 {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-40px, -30px);
  }
  50% {
    transform: translate(0, -50px);
  }
  75% {
    transform: translate(40px, -30px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 248, 231, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(90, 62, 43, 0.1);
  z-index: 100;
  padding: 1rem 0;
  animation: slide-down 0.6s ease-out;
}

@keyframes slide-down {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-warm-brown);
  transition: transform 0.3s ease, color 0.3s ease;
  
  white-space: nowrap; 	/* keeps it in one line */
  overflow: visible; 	/* allows text to show fully */
  text-overflow: unset; 	/* disables the "..." */
}
.logo:hover {
  transform: scale(1.05);
  color: var(--color-honey-gold);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-warm-brown);
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
}

/* improved nav link underline animation */
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-honey-gold);
  transition: width 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-honey-gold);
}

.banner-scroll {
  background: var(--color-honey-gold);
  color: white;
  padding: 0.75rem 0;
  overflow: hidden; 	/* hide overflowing content */
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative; 	/* required for absolute children */
  width: 100%;
}

.banner-content {
  display: inline-block;
  white-space: nowrap; 	/* keep text in one line */
  padding-left: 100%; 	/* start off-screen right */
  animation: scroll-banner 15s linear infinite;
  font-size: 1rem; 	/* adjust as needed */
}

@keyframes scroll-banner {
  0% {
    transform: translateX(0); 	/* starts off-screen right because of padding-left */
  }
  100% {
    transform: translateX(-100%); 	/* moves fully to left */
  }
}

/* Responsive for mobile */
@media (max-width: 480px) {
  .banner-content {
    font-size: 0.9rem;
    padding-left: 100%; 	/* ensures it starts off-screen on small screens */
  }
}



/* Hero Section */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(230, 179, 37, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fade-in-up 1s ease-out;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--color-warm-brown);
  margin-bottom: 1rem;
  font-weight: bold;
  /* added text animation */
  animation: fade-in-up 1s ease-out 0.2s both;
  text-shadow: 2px 2px 4px rgba(230, 179, 37, 0.1);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-warm-brown);
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fade-in-up 1s ease-out 0.4s both;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Products Section */
.products-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-warm-brown);
  margin-bottom: 3rem;
  animation: fade-in 1s ease-out;
  /* added letter spacing animation */
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--color-honey-gold);
  border-radius: 2px;
  animation: expand 0.8s ease-out;
}

@keyframes expand {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Product Cards */
.product-card {
  background: rgba(255, 248, 231, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(90, 62, 43, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* added staggered animation to cards */
  animation: fade-in-up 0.6s ease-out backwards;
}

.product-card:nth-child(1) {
  animation-delay: 0.1s;
}
.product-card:nth-child(2) {
  animation-delay: 0.2s;
}
.product-card:nth-child(3) {
  animation-delay: 0.3s;
}
.product-card:nth-child(4) {
  animation-delay: 0.4s;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(230, 179, 37, 0.3);
  border-color: var(--color-honey-gold);
  /* enhanced hover effect with scale */
}

.product-image {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-emoji {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
  /* added hover pause effect */
}

.product-card:hover .product-emoji {
  animation-play-state: paused;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.product-name {
  color: var(--color-warm-brown);
  font-size: 1.3rem;
  margin: 1rem 1rem 0.5rem;
}

.product-price {
  color: var(--color-honey-gold);
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0.5rem 1rem;
}

.product-description {
  color: var(--color-warm-brown);
  margin: 0.5rem 1rem 1.5rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

.product-buttons {
  display: flex;
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.product-buttons .btn {
  flex: 1;
  text-align: center;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  min-width: 44px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--color-honey-gold);
  color: white;
  box-shadow: 0 4px 15px rgba(230, 179, 37, 0.4);
}

.btn-primary:hover {
  background: var(--color-amber-yellow);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(230, 179, 37, 0.6);
}

/* improved button active state */
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  color: var(--color-warm-brown);
  border: 2px solid var(--color-honey-gold);
}

.btn-secondary:hover {
  background: var(--color-soft-beige);
  color: var(--color-warm-brown);
  transform: translateY(-2px);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  animation: reveal-on-scroll 0.8s ease-out forwards;
}

@keyframes reveal-on-scroll {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
.footer {
  background: var(--color-warm-brown);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  position: relative;
  /* added smooth fade-in animation to footer */
  animation: fade-in 0.8s ease-out;
}

.footer a {
  color: var(--color-amber-yellow);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer a:hover {
  color: var(--color-cream-white);
  text-decoration: underline;
}

.scroll-to-top {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-honey-gold);
  border-radius: 20px;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  animation: none;
}

/* improved scroll-to-top visibility animation */
.scroll-to-top:not(.hidden) {
  opacity: 1;
  visibility: visible;
  animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-to-top:hover {
  transform: scale(1.1) translateY(-3px);
}

.scroll-to-top:active {
  transform: scale(0.95);
}

.scroll-to-top.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-buttons {
    flex-direction: column;
  }

  .section-title {
    font-size: 2rem;
  }

  body {
    background-attachment: scroll;
  }

  a {
    min-height: 44px;
    display: inline-block;
    padding: 0.5rem 1rem;
  }

  /* Better spacing on mobile */
  .section-title {
    margin-bottom: 2rem;
  }

  .products-grid {
    gap: 1.5rem;
  }

  /* *** FIX START: Active Link Visibility in Mobile Menu ***
  */
  .nav-links a.active {
    /* Sets the background to white */
    background: white; 
    
    /* Forces the text color to dark brown for high contrast on the gold menu */
    color: var(--color-warm-brown) !important; 
    font-weight: 700;
  }
  /* *** FIX END ***
  */
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .nav-links {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .hero {
    min-height: 300px;
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .products-section {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .product-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Additional Animation Classes */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Improved Button States */
.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Scroll-based Animations */
.scroll-animated {
  animation: fade-in-up 0.8s ease-out;
}

/* Enhanced Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-honey-gold);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  nav,
  footer,
  .banner-scroll,
  .btn {
    display: none;
  }
}

input::placeholder,
textarea::placeholder {
  color: rgba(90, 62, 43, 0.5);
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
  :root {
    --color-honey-gold: #d4a500;
    --color-warm-brown: #3d2817;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Improved Typography for Better Readability */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Link Hover Effects */
a {
  transition: color 0.3s ease;
}

/* Form Input Styles */
input,
textarea {
  background-color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

input:focus,
textarea:focus {
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(230, 179, 37, 0.2);
}

/* ===== Honeycomb Mobile Menu ===== */
@media (max-width: 768px) {

  /* Menu Button */
  .menu-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    margin-left: auto;
    padding: 0.5rem;
    transition: transform 0.3s ease;
  }

  .menu-btn:hover {
    transform: scale(1.2) rotate(10deg);
  }

  .menu-btn .dot {
    width: 8px;
    height: 8px;
    background: var(--color-warm-brown);
    border-radius: 50%;
    transition: all 0.3s ease;
  }

  /* Nav links hidden by default */
  .nav-links {
    position: absolute;
    top: 60px;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--color-honey-gold);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    transform: scale(0);
    opacity: 0;
    transition: all 0.4s ease;
    transform-origin: top right;
  }

  /* Show menu */
  .nav-links.active { /* <-- FIXED: Changed from .show to .active */
    transform: scale(1);
    opacity: 1;
  }

  /* Link styling */
  .nav-links a {
    color: var(--color-warm-brown);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    transform: translateY(-20px);
    animation: link-pop 0.4s forwards;
  }

  .nav-links.active a { /* <-- FIXED: Changed from .show to .active */
    animation: link-pop 0.4s forwards;
  }

  .nav-links a:hover {
    transform: scale(1.1);
    background: var(--color-amber-yellow);
  }
}

/* Pop animation for links */
@keyframes link-pop {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}