:root {
  --primary-color: #28a745;
  --primary-dark: #166534;
  --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;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--text-dark);
  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 {
  transition: transform 0.3s ease;
}

.top-bar.hidden {
  transform: translateY(-100%);
}


.top-bar a:hover {
  color: rgba(255, 255, 255, 0.75);
}

.navbar.sticky-top {
  position: fixed;
  top: 40px; /* will be adjusted with JS */
  left: 0;
  right: 0;
  background: var(--primary-darker);
  z-index: 1040;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  transition: top 0.3s ease;
}

.navbar .logo-container img {
  height: 40px;
}

.navbar .nav-links a {
  margin-left: 20px;
  color: white; /* ✅ White text */
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.navbar .nav-links a:hover {
  color: #f1f1f1; /* ✅ Light hover color */
}

.search-bar-container {
  flex: 1;
  margin: 0 30px;
  display: flex;
  max-width: 500px;
}

.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;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 24px;
  background-color: var(--primary-dark);
  border-radius: 4px;
}

.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;
}

.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 .hover-buttons {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
.rokomari-card:hover .hover-buttons {
  opacity: 1;
  transform: translateY(0);
}

.rokomari-card .hover-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 10px;
}

.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-card .btn {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 10px;
}

.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 {
  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;
}

.category-count {
  font-size: 0.9rem;
  color: var(--text-light);
}

.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 {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

.pagination li a {
  padding: 8px 14px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition);
}

.pagination li.active a,
.pagination li a:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

@media (max-width: 991px) {
  aside {
    margin-bottom: 1.5rem;
  }
  .search-bar-container {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar.sticky-top {
    flex-direction: column;
    padding: 0.8rem 1rem;
  }
  .navbar .nav-links {
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .floating-ad {
    display: none !important;
  }
}
.product-image-container {
  position: relative;
  overflow: hidden;
}

.product-image-container .hover-action-buttons {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.rokomari-card:hover .hover-action-buttons {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hover-action-buttons .btn {
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Zoom & Blur Effect on Hover */
.product-image-container {
  position: relative;
  overflow: hidden;
}

.product-image-container img {
  transition: transform 0.4s ease, filter 0.4s ease;
}

.rokomari-card:hover .product-image-container img {
  transform: scale(1.08);
  filter: blur(1px);
}

/* Hover Buttons Slide In */
.product-image-container .hover-action-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.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);
}

.floating-ad {
  position: fixed;
  z-index: 9999;
  max-width: 160px;
  background: #fff;
  border: 1px solid #ddd;
  padding: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.position-left { top: 100px; left: 0; }
.position-right { top: 100px; right: 0; }
.position-middle { bottom: 10px; left: 50%; transform: translateX(-50%); }

.floating-ad .close-btn {
  position: absolute;
  top: 0;
  right: 2px;
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #888;
  cursor: pointer;
}
