:root {
  --primary-color: #28a745;
  --primary-dark: #166534; /* Dark Green (used for text) */
  --primary-darker: #14532d;
  --primary-light: #e7f1ff;
  --secondary-color: #f8f9fa;
  --text-dark: #212529;
  --text-light: #6c757d;
  --border-color: #dee2e6;
  --danger-color: #dc3545;
  --font-family: 'Poppins', 'Segoe UI', sans-serif;
  --font-size: 16px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 18px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size);
  background: var(--secondary-color);
  color: var(--text-dark);
  padding-top: 100px; /* Space for fixed navbar */
}

/* Top Bar - Keep as dark green */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--primary-dark); /* Dark green */
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 14px;
  z-index: 1050;
  transition: transform 0.3s ease;
}

.top-bar a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  transition: var(--transition);
}

.top-bar.hidden {
  transform: translateY(-100%);
}

.top-bar a:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* Navigation Bar - White Background */
.navbar.sticky-top {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  background: #ffffff; /* ✅ White background */
  z-index: 1040;
  padding: 1rem 2rem;
  box-shadow: var(--shadow-md);
  transition: top 0.3s ease;
  border-bottom: 1px solid #dee2e6; /* Optional: light border */
}

/* Menu Links - Bold & Dark Green */
.navbar .nav-link {
  color: #166534 !important;   /* Dark Green */
  font-weight: 700 !important; /* Bold */
  font-size: 1rem;
  margin: 0 10px;
  transition: color 0.3s ease !important;
}

/* Hover Effect */
.navbar .nav-link:hover {
  color: #14532d !important; /* Slightly darker */
  background-color: #f8f9fa !important;
  border-radius: 4px;
}

/* Search Bar - Clean Look */
.search-bar-container input {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 12px;
}
.search-bar-container input,
.search-bar-container button {
  padding: 10px 15px;
  font-size: 14px;
}

.search-bar-container input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.search-bar-container button {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search-bar-container button {
  background: #166534;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
}

/* Cart Icon - Keep Red Badge */
.cart-icon {
  position: relative;
  margin-left: 15px;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section Title */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 24px;
  background-color: var(--primary-dark);
  border-radius: 4px;
}

/* Buttons */
.view-all-btn,
.btn-outline-primary {
  font-weight: 600;
  color: var(--primary-dark);
  border: 1px solid var(--primary-dark);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.view-all-btn i {
  margin-left: 6px;
}

.view-all-btn:hover,
.btn-outline-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* Product Card */
.rokomari-card {
  border: 1px solid #eee;
  border-radius: 10px;
  background-color: #fff;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
  text-align: center;
  height: 100%;
}

.rokomari-card .product-img {
  height: 180px;
  object-fit: contain;
  padding: 10px;
  background-color: #f8f9fa;
  width: 100%;
}

.rokomari-card .product-title {
  font-size: 0.85rem;
  font-weight: 600;
  height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0.25rem 0;
}

.rokomari-card .product-price {
  font-weight: 600;
  color: var(--primary-dark);
}

.rokomari-card .product-old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 0.85rem;
  margin-left: 6px;
}

.rokomari-discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 58px;
  height: 58px;
  background-color: #dc3545;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.rokomari-discount-badge .discount-inner {
  line-height: 1;
}

.rokomari-discount-badge .discount-inner span {
  font-size: 11px;
}

@media (max-width: 576px) {
  .rokomari-discount-badge {
    width: 44px;
    height: 44px;
    font-size: 11px;
  }
  .rokomari-discount-badge .discount-inner span {
    font-size: 9px;
  }
}

/* Category Card */
.category-card {
  background: #fff;
  padding: 1rem;
  text-align: center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-img-container {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-img-container img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.category-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.category-count {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Floating Ads */
.floating-ad {
  position: fixed;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: none;
  transition: var(--transition);
}

.floating-ad.show {
  display: block;
}

.position-left {
  left: 20px;
  bottom: 20px;
  width: 250px;
  height: 300px;
}

.position-right {
  right: 20px;
  bottom: 20px;
  width: 250px;
  height: 300px;
}

.position-middle {
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: 350px;
  height: 350px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

/* Pagination - Green Background, Bold White Text */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  list-style: none;
  padding: 0;
  gap: 8px;
}

.pagination li a {
  padding: 10px 16px;
  font-weight: 700; /* Bold */
  color: #ffffff !important; /* White text */
  background-color: #28a745; /* Green background (Bootstrap success color) */
  border: 1px solid #28a745;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover & Active State */
.pagination li.active a,
.pagination li a:hover {
  background-color: #218838 !important; /* Darker green on hover */
  border-color: #218838 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(33, 136, 56, 0.2);
}

/* Optional: Add space between buttons */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  list-style: none;
  padding: 0;
  gap: 6px;
}

/* Hover Effects */
.hover-action-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}

.rokomari-card:hover .hover-action-buttons {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.hover-action-buttons .btn {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 991px) {
  aside {
    margin-bottom: 1.5rem;
  }
  .search-bar-container {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar.sticky-top {
    padding: 0.8rem 1rem;
  }
  .floating-ad {
    display: none !important;
  }
}
/* Style the Hamburger Icon */
.navbar-toggler {
  border: none;
  outline: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23166534' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Optional: Add hover effect */
.navbar-toggler:hover .navbar-toggler-icon {
  opacity: 0.8;
}

/* Smooth mobile menu animation */
@media (max-width: 991.98px) {
  .navbar .collapse {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 250ms ease, opacity 200ms ease;
  }
  .navbar .collapse.show {
    max-height: 80vh; /* enough room for a tall menu; adjust if needed */
    opacity: 1;
  }
}

/* Smooth top-bar hide/show */
.top-bar.hidden {
  transform: translateY(-100%);
}
.top-bar {
  transition: transform 200ms ease;
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .navbar .collapse,
  .top-bar {
    transition: none !important;
  }
}
