:root {
  --primary: #7CB342; /* salat green */
  --primary-dark: #558B2F;
  --primary-light: #AED581;
  --accent: #8BC34A;
  --bg: #F5F7F5;
  --white: #FFFFFF;
  --gray: #757575;
  --gray-light: #E0E0E0;
  --gray-dark: #424242;
  --text: #333333;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 8px 0;
  font-size: 0.9rem;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.header-main {
  padding: 12px 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 50px;
  width: auto;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 8px 14px;
  border-radius: 20px;
  color: var(--gray-dark);
  font-weight: 500;
}

.nav a:hover, .nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.currency-switch {
  display: flex;
  background: var(--gray-light);
  border-radius: 20px;
  overflow: hidden;
}

.currency-switch button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray);
  transition: var(--transition);
}

.currency-switch button.active {
  background: var(--primary);
  color: white;
}

.cart-btn {
  position: relative;
  background: var(--primary);
  color: white !important;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-btn:hover {
  background: var(--primary-dark);
  color: white !important;
}

.cart-count {
  background: white;
  color: var(--primary-dark);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Social floating */
.social-float {
  position: fixed;
  bottom: 100px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.social-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.social-btn:hover {
  transform: scale(1.1);
}

.social-btn.whatsapp { background: #25D366; }
.social-btn.telegram { background: #0088cc; }

/* Chat widget */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1001;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(124, 179, 66, 0.4);
  transition: var(--transition);
}

.chat-toggle:hover {
  transform: scale(1.05);
}

.chat-box {
  display: none;
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 420px;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  flex-direction: column;
  overflow: hidden;
}

.chat-box.open {
  display: flex;
}

.chat-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9faf9;
}

.chat-msg {
  margin-bottom: 12px;
  max-width: 85%;
}

.chat-msg.user {
  margin-left: auto;
}

.chat-msg .bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
}

.chat-msg.user .bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-msg.admin .bubble {
  background: white;
  border: 1px solid var(--gray-light);
  border-bottom-left-radius: 4px;
}

.chat-msg .time {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 4px;
  text-align: right;
}

.chat-form {
  padding: 12px;
  border-top: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-form input, .chat-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}

.chat-form input:focus, .chat-form textarea:focus {
  border-color: var(--primary);
}

.chat-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.chat-form button:hover {
  background: var(--primary-dark);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 24px;
  opacity: 0.95;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--bg);
  transform: translateY(-2px);
}

.btn-green {
  background: var(--primary);
  color: white;
}

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary-dark);
}

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

/* Products */
.section {
  padding: 50px 0;
}

.section-title {
  text-align: center;
  font-size: 1.9rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 36px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.product-card .img-wrap {
  height: 180px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.product-card .body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .category {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card h3 {
  font-size: 1.1rem;
  margin: 6px 0;
  color: var(--gray-dark);
}

.product-card .desc {
  font-size: 0.9rem;
  color: var(--gray);
  flex: 1;
  margin-bottom: 12px;
}

.product-card .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.product-card .actions {
  display: flex;
  gap: 8px;
}

.product-card .actions .btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
}

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.news-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.news-card .img-wrap {
  height: 160px;
  background: #e8f5e9;
}

.news-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card .body {
  padding: 18px;
}

.news-card .date {
  font-size: 0.85rem;
  color: var(--gray);
}

.news-card h3 {
  margin: 8px 0;
  font-size: 1.15rem;
}

.news-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  background: var(--gray-dark);
  color: #ccc;
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer h4 {
  color: white;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.footer a {
  color: #bbb;
  display: block;
  margin-bottom: 8px;
}

.footer a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid #555;
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* Cart page */
.cart-table {
  width: 100%;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border-collapse: collapse;
}

.cart-table th, .cart-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

.cart-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.cart-table img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.qty-input {
  width: 60px;
  padding: 6px;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  text-align: center;
}

.cart-summary {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.cart-summary .total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--gray-dark);
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.2);
}

/* Admin */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--gray-dark);
  color: white;
  padding: 20px 0;
  flex-shrink: 0;
}

.admin-sidebar .logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid #555;
  margin-bottom: 20px;
}

.admin-sidebar a {
  display: block;
  padding: 12px 20px;
  color: #ccc;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
  background: var(--primary);
  color: white;
}

.admin-content {
  flex: 1;
  padding: 30px;
  background: var(--bg);
}

.admin-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

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

.admin-table th, .admin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

.admin-table th {
  background: var(--primary-light);
}

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* Responsive */
@media (max-width: 768px) {
  .header-main .container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .nav {
    justify-content: center;
  }
  
  .header-actions {
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .admin-layout {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
  }
  
  .chat-box {
    width: calc(100vw - 30px);
    right: -10px;
  }
  
  .social-float {
    bottom: 90px;
    right: 12px;
  }
  
  .social-btn {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .logo-text {
    font-size: 1.2rem;
  }
}

/* Page content */
.page-content {
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-content h2 {
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.page-content ul {
  margin-left: 20px;
  margin-bottom: 16px;
}

/* Articles */
.article-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
}

.article-card .img-wrap {
  flex: 0 0 280px;
  height: 200px;
  background: #e8f5e9;
}

.article-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card .body {
  flex: 1;
  padding: 24px;
  min-width: 250px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: var(--primary-light);
}
