/* VilMart — The Village Marketplace brand overrides */

:root {
  --vm-green: #2f6b3a;
  --vm-green-dark: #1f4d28;
  --vm-green-soft: #e8f3ea;
  --vm-gold: #e6a817;
  --vm-earth: #f4f7f2;
  --vm-ink: #1c2b1f;
  --primary-color: #2f6b3a;
  --light-primary-color: #e8f3ea;
  --accent-color: #e6a817;
  --bs-primary: #2f6b3a;
  --bs-primary-rgb: 47, 107, 58;
  --bs-success: #2f6b3a;
}

body {
  background: #f4f7f2;
}

/* Ensure the sticky header sits above everything */
.vm-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1030 !important;
}

/* Neutralise any top-level header style from vendor CSS that fights our header */
header {
  background: transparent;
}

/* Remove old footer-bottom margin from vendor templates */
#footer-bottom { display: none !important; }


.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #2f6b3a;
  --bs-btn-border-color: #2f6b3a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1f4d28;
  --bs-btn-hover-border-color: #1f4d28;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1f4d28;
  --bs-btn-active-border-color: #1f4d28;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #9bb8a0;
  --bs-btn-disabled-border-color: #9bb8a0;
}

/* Only force white text on actual badge elements, not on price/text spans */
.badge.bg-primary {
  color: #fff !important;
  background-color: var(--vm-green) !important;
}


.brand-mark {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--vm-green);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-mark small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #5f7363;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Mobile header ---- */
.vm-mobile-bar {
  background: #fff;
  border-bottom: 1px solid #e6eee7;
}

.vm-icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e6eee7;
  border-radius: 50%;
  background: var(--vm-earth);
  color: var(--vm-green-dark);
  padding: 0;
  text-decoration: none;
  flex: 0 0 auto;
}

.vm-icon-btn:hover,
.vm-icon-btn:focus-visible {
  background: var(--vm-green-soft);
  color: var(--vm-green-dark);
}

.vm-icon-btn .navbar-toggler-icon {
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2831, 77, 40, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.vm-brand-compact {
  font-size: 1.35rem;
  line-height: 1.1;
}

.vm-brand-compact small {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.vm-cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--vm-gold);
  color: var(--vm-ink);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  border: 2px solid #fff;
  box-sizing: content-box;
}

.vm-mobile-search {
  position: relative;
  display: flex;
  align-items: center;
}

.vm-mobile-search .form-control {
  height: 44px;
  border-radius: 999px;
  background: var(--vm-earth);
  border: 1px solid #e6eee7;
  padding-right: 46px;
  font-size: 0.95rem;
}

.vm-mobile-search .form-control:focus {
  background: #fff;
  border-color: var(--vm-green);
  box-shadow: 0 0 0 0.2rem rgba(47, 107, 58, 0.15);
}

.vm-search-btn {
  position: absolute;
  right: 5px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--vm-green);
  color: #fff;
  padding: 0;
}

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

@media (max-width: 575.98px) {
  .vm-brand-compact {
    font-size: 1.2rem;
  }

  .vm-icon-btn {
    width: 38px;
    height: 38px;
  }
}

.vm-hero {
  background: 
    linear-gradient(120deg, rgba(47, 107, 58, 0.92), rgba(30, 70, 40, 0.75)),
    url("../images/banner-image-1.jpg") center/cover no-repeat;
  border-radius: 1.25rem;
  color: #fff;
  padding: 3.5rem 2.5rem;
  min-height: 360px;
}

.vm-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
}

.vm-hero .btn-warning {
  background: var(--vm-gold);
  border-color: var(--vm-gold);
  color: #1c2b1f;
  font-weight: 700;
}

.product-card {
  background: #fff;
  border: 1px solid #e6eee7;
  border-radius: 1rem;
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(31, 77, 40, 0.08);
}

.product-card .thumb {
  height: 180px;
  object-fit: contain;
  background: var(--vm-earth);
  width: 100%;
  padding: 1rem;
}

.stock-badge.in-stock {
  background: var(--vm-green-soft);
  color: var(--vm-green-dark);
}

.stock-badge.out-of-stock {
  background: #fdecea;
  color: #9b2c2c;
}

.dashboard-shell {
  min-height: 100vh;
  background: #f3f6f3;
}

.dashboard-sidebar {
  width: 260px;
  background: var(--vm-ink);
  color: #fff;
  min-height: 100vh;
}

.dashboard-sidebar a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  display: block;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
}

.dashboard-sidebar a:hover,
.dashboard-sidebar a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.stat-tile {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid #e6eee7;
}

.map-placeholder {
  background:
    repeating-linear-gradient(
      45deg,
      #dfe9e1,
      #dfe9e1 12px,
      #e8f0ea 12px,
      #e8f0ea 24px
    );
  border: 2px dashed #9bb8a0;
  border-radius: 1rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--vm-green-dark);
  padding: 2rem;
}

.role-card {
  border: 2px solid #e6eee7;
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.role-card.active,
.role-card:hover {
  border-color: var(--vm-green);
  background: var(--vm-green-soft);
}

.timeline-step {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1.25rem;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--vm-green);
}

.timeline-step.done::before {
  background: var(--vm-gold);
}

.rushpay-box {
  border: 1px solid #cfe0d3;
  background: #f7fbf8;
  border-radius: 1rem;
  padding: 1.25rem;
}

.online-toggle .form-check-input:checked {
  background-color: var(--vm-green);
  border-color: var(--vm-green);
}

@media (max-width: 991px) {
  .dashboard-sidebar {
    width: 100%;
    min-height: auto;
  }
}
