/* Ensure footer sticks to bottom */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Let main content expand to fill space */
main {
  flex: 1;
}

/* Footer styling remains clean and centered */
.site-footer {
  background-color: #f6f3ec;
  padding: 20px 16px;
  text-align: center;
  font-size: 14px;
  color: #555;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
/* ----------- Base ----------- */
body.page {
  background: #f5f2ea;
  color: #3a5e38;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

/* Utility container to align content */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ----------- Top Bar ----------- */
.topbar {
  background: #3a5e38;
  color: #fff;
  text-align: center;
  padding: 6px 10px;
  font-size: 14px;
}

/* ----------- Header ----------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.logo {
  height: 56px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: 18px;
  justify-content: center;
  padding-bottom: 8px;
}

.main-nav a {
  color: #3a5e38;
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.01em;
}

/* Cart icon and count badge */
#cart-icon {
  position: relative;
}

#cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #3a5e38;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  display: none;
}
/* Cart Remove link styling */
.cart-items button.remove-btn {
  background: none;
  border: none;
  color: #3a5e38; /* Deep earthy green */
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.cart-items button.remove-btn:hover {
  color: #b9a76b; /* Soft gold tone */
  opacity: 0.8;
}
/* ----------- Hero Section ----------- */
/* ----------- Hero Section (Refined) ----------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 60px; /* top-right-bottom-left */
  box-sizing: border-box;
}

.hero-copy {
  padding-left: 30px; /* gives breathing room on left side */
}

.hero-copy h1 {
  font-size: 1.9rem;
  margin-bottom: 10px;
  line-height: 1.3;
  color: #3a5e38;
}

.hero-copy p {
  color: #3a5e38;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-media img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
/* ----------- Features / Product Cards ----------- */
.feature-grid,
.product-grid {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.feature,
.product-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(58, 94, 56, 0.08);
  text-align: center;
}

.product-card img {
  max-width: 200px;
  border-radius: 12px;
}
/* Buttons */
.btn {
  display: inline-block;
  background: #3a5e38;          /* Rooted Smile green */
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* make sure visited links in hero don’t turn purple */
.hero a,
.hero a:visited {
  color: #fff;
  text-decoration: none;
}
/* ----------- Footer ----------- */
.site-footer {
  background: #fff;
  padding: 14px 16px 18px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.footer-links a {
  color: #3a5e38;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.fda {
  font-size: 12px;
  color: #5d7a5b;
  max-width: 600px;
  margin: 4px auto 6px;
}

/* ----------- Responsive ----------- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-media {
    order: -1;
  }
  .main-nav {
    gap: 12px;
  }
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  height: 100%;
  background: #f9f7f2;
  box-shadow: -4px 0 12px rgba(0,0,0,0.1);
  padding: 24px;
  transition: right 0.3s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-drawer.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-footer {
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 16px;
  text-align: center;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 92vw;
  height: 100%;
  background: #f5f2ea;
  box-shadow: -6px 0 20px rgba(0,0,0,0.12);
  z-index: 9999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cart-drawer.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.28);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 0;
}
.cart-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #3a5e38;
}

.cart-free-ship {
  padding: 0 20px;
}
.free-ship-bar {
  background: rgba(58,94,56,0.14);
  height: 6px;
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.free-ship-fill {
  height: 100%;
  width: 0%;
  background: #3a5e38;
  transition: width 0.2s ease-out;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px 0;
}
.cart-line {
  border-bottom: 1px solid rgba(0,0,0,0.03);
  padding: 10px 0 12px;
}
.cart-line-name {
  font-weight: 500;
  color: #3a5e38;
  margin: 0;
}
.cart-line-price {
  margin: 4px 0 8px;
}
.cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(58,94,56,0.3);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  color: #3a5e38;
}
.remove-line {
  background: none;
  border: none;
  color: #a14d4d;
  font-size: 12px;
  cursor: pointer;
}
.cart-empty {
  text-align: center;
  padding: 30px 0;
}

.cart-drawer-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid rgba(0,0,0,0.03);
}
.cart-footer-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 500;
}
.btn-block {
  width: 100%;
}
.cart-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  height: 9px;
  width: 9px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.15);
  display: none;
  opacity: 0;
  transition: background-color 0.4s ease, opacity 0.4s ease, transform 0.3s ease;
}
.cart-dot.show {
  display: inline-block;
  opacity: 1;
  transform: scale(1);
}
/* Cart Drawer Slide Animation */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px; /* start off-screen */
  width: 360px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 12px rgba(0,0,0,0.1);
  transition: right 0.4s ease-in-out;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  right: 0; /* slides in */
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-in-out;
  z-index: 1000;
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: all;
}


/* Cart drawer item image — refined size & rounded */
.cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 12px;
}

/* Ensure cart item layout stays aligned */
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item-body {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  font-size: 15px;
  color: #3a5e38;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  color: #3a5e38;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.qty-btn {
  border: none;
  background: #f3f3f0;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #3a5e38;
  transition: background-color 0.2s ease;
}

.qty-btn:hover {
  background: #e6e6e1;
}
/* Remove button */
.remove-btn {
  background: none;
  border: none;
  color: #3a5e38;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.3s ease, opacity 0.3s ease;
}
.remove-btn:hover {
  color: #b9a76b;
  opacity: 0.8;
}

/* Fade animation for removal */
.cart-item {
  transition: opacity 0.4s ease;
}
