:root {
  --color-primary: #2F5836; /* Dark Green from Logo */
  --color-primary-light: #8DC24D; /* Light Green */
  --color-primary-dark: #1E3B22;
  --color-secondary: #FAFAFA; /* Off-white premium background */
  --color-text-dark: #222222;
  --color-text-light: #ffffff;
  --color-accent: #F2A640; /* Orange/Gold from sun */
  --color-bg-light: #ffffff;
  --color-bg-dark: #1E3B22;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Georgia', 'Playfair Display', serif;
  
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
}
body {
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  background-color: var(--color-secondary);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary-dark);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Base button styles */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-text-light);
}

/* Card styles */
.card {
  background: var(--color-bg-light);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
}

/* Product Tag */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--color-primary-dark);
  margin: 0 4px 4px 0;
  background-color: transparent;
}

/* Sale Badge (Obral) */
.badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--color-accent);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(242, 166, 64, 0.4);
}

/* Layout Utilities */
.page-layout {
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .page-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}
.sidebar {
  width: 100%;
  padding-right: 2rem;
}
@media (min-width: 768px) {
  .sidebar {
    width: 250px;
    flex-shrink: 0;
  }
}
.content-main {
  flex: 1;
}

/* Search Bar */
.search-bar {
  display: flex;
  margin-bottom: 2rem;
  align-items: center;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem 1rem;
}
.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  padding: 0.5rem;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 1rem;
}
.progress-label {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  color: white;
  text-transform: uppercase;
}
.progress-bar-bg {
  width: 100%;
  background-color: rgba(255,255,255,0.2);
  height: 4px;
}
.progress-bar-fill {
  background-color: var(--color-primary);
  height: 100%;
}
html { scroll-behavior: smooth; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

html {
  scroll-behavior: smooth;
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}
.animate-fade-in.visible {
  opacity: 1;
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

.glass-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 12px;
}

/* Modern Navbar */
.navbar {
  background-color: var(--color-primary-dark);
  padding: 0.8rem 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-logo img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.nav-logo:hover img {
  transform: rotate(5deg) scale(1.05);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

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

.lang-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
}

.admin-link {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid var(--color-accent);
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.admin-link:hover {
  background: var(--color-accent);
  color: white;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

.hamburger-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-primary-dark);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    gap: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: stretch !important;
  }

  .nav-links.show {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  
  .nav-link {
    padding: 0.7rem 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
    font-size: 0.95rem !important;
  }

  .nav-link::after {
    display: none;
  }

  .nav-links .lang-selector {
    justify-content: flex-start !important;
    margin-left: 0 !important;
    padding: 0.7rem 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links a[href="/products"] {
    text-align: center;
    margin: 0.8rem 0 0.5rem 0 !important;
    padding: 10px 24px !important;
  }

  .nav-links a[href="/admin"] {
    text-align: center;
    margin: 0 !important;
    padding: 0.5rem 0 !important;
  }
}

.social-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}

.social-icon:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
  color: white;
}

.footer-social {
  background: white;
  color: var(--color-primary-dark);
}

.footer-social:hover {
  background: var(--color-accent) !important;
  color: white !important;
}

/* Load Animations */
@keyframes fadeUpLoad {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
.animate-load-up {
    animation: fadeUpLoad 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.delay-100 { animation-delay: 0.1s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }
