:root {
  --brand-green: #4C6A52;
  --brand-green-dark: #374C3C;
  --brand-olive: #8A9A3C;
  --brand-brown: rgb(64, 32, 17);
  --brand-rust: #B5502A;
  --brand-rust-dark: #96401F;
  --brand-cream: #F2E4C4;
  --brand-cream-soft: #FAF4E6;
  --brand-ink: rgb(42, 30, 20);

  /* Bootstrap variable overrides */
  --bs-primary: var(--brand-rust);
  --bs-primary-rgb: 181, 80, 42;
  --bs-secondary: var(--brand-green-dark);
  --bs-secondary-rgb: 55, 76, 60;
  --bs-dark: var(--brand-brown);
  --bs-dark-rgb: 61, 35, 20;
  --bs-light: var(--brand-cream);
  --bs-light-rgb: 242, 228, 196;
  --bs-body-bg: var(--brand-cream-soft);
  --bs-body-color: var(--brand-ink);
  --bs-body-font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-border-radius: 0.6rem;
  --bs-border-radius-lg: 1rem;
  --bs-border-radius-pill: 999px;
  --bs-link-color: var(--brand-green-dark);
  --bs-link-hover-color: var(--brand-rust);
}

/* overflow-x:hidden goes on html, not body — setting it on body alone makes
   browsers implicitly promote body into its own scroll container (with
   overflow-y:auto), which breaks window.scrollTo()/window.scrollY. */
html { overflow-x: hidden; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { animation: fadeInPage 0.5s ease; }
@keyframes fadeInPage { from { opacity: 0; } to { opacity: 1; } }
h1, h2, h3, h4, h5, .navbar-brand, .display-1, .display-2, .display-3, .display-4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--brand-green-dark);
  font-weight: 600;
}
a { text-decoration: none; }
.btn { transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease; }
.btn:active { transform: scale(0.96); }
.nav-link { transition: background-color 0.2s ease, color 0.2s ease; }

/* -------------------------------------------------------------------- */
/* Scroll-reveal animation (assets/js/animations.js toggles .is-visible) */
/* -------------------------------------------------------------------- */
p.reveal {
  width: 80%;
}
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  body { animation: none; }
  .btn, .nav-link, .toast-msg { transition: none !important; }
  .hero-slide { animation: none; transform: translateX(0); opacity: 0; }
  .hero-slide:nth-child(1) { opacity: 1; }
}

/* -------------------------------------------------------------------- */
/* Buttons — explicit overrides so the CDN build always matches the palette */
/* -------------------------------------------------------------------- */
.btn { border-radius: 999px; font-weight: 700; padding: 0.75rem 1.6rem; }
.btn-sm { padding: 0.5rem 1rem; }
.btn-primary { background-color: var(--brand-rust); border-color: var(--brand-rust); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--brand-rust-dark); border-color: var(--brand-rust-dark); }
.btn-dark { background-color: var(--brand-green-dark); border-color: var(--brand-green-dark); color: var(--brand-cream); }
.btn-dark:hover, .btn-dark:focus { background-color: var(--brand-brown); border-color: var(--brand-brown); color: var(--brand-cream); }
.btn-outline-dark { color: var(--brand-green-dark); border-color: var(--brand-green-dark); border-width: 2px; }
.btn-outline-dark:hover { background-color: var(--brand-green-dark); border-color: var(--brand-green-dark); }
.btn-outline-light { border-width: 2px; }

/* -------------------------------------------------------------------- */
/* Navbar */
/* -------------------------------------------------------------------- */
.site-navbar {
  background: var(--brand-brown); border-bottom: 1px solid rgba(61,35,20,0.12); padding: 0.9rem 0;
  transition: box-shadow 0.25s ease, padding 0.25s ease;
}
.site-navbar.is-scrolled { box-shadow: 0 4px 16px rgba(61,35,20,0.12); padding: 0.6rem 0; }
.navbar-brand { font-size: 1.15rem; font-weight: 700; }
.brand-logo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.footer-brand .brand-logo { width: 32px; height: 32px; }

/* Nav links: smaller type + an animated underline that grows from the
   center on hover, and stays fully drawn for the current page. */
.nav-item { text-align: center; }
.nav-link {
  position: relative;
  display: inline-block;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--brand-cream-soft);
  padding: 0.55rem 0.2rem !important;
  margin: 0 0.55rem;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-rust);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), color 0.2s ease;
}
.nav-link:hover, .nav-link.active { background: transparent; color: var(--brand-cream); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
    color: var(--brand-cream);
}
.cart-link { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; position: relative; padding: 0; }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--brand-rust); color: #fff; font-size: 0.68rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
@media (max-width: 991.98px) {
  #mainNav { padding-top: 0.75rem; }
  .nav-item { text-align: center; }
  .nav-link { padding: 0.75rem 0.2rem !important; margin: 0; }
}

/* -------------------------------------------------------------------- */
/* Hero */
/* -------------------------------------------------------------------- */
.hero {
  position: relative;
  color: #fff;
  padding: 8rem 0;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* -------------------------------------------------------------------- */
/* Hero image slider — 3 full-bleed slides that auto-advance, sliding in
   from the right and out to the left. No arrows/dots; fully automatic. */
/* -------------------------------------------------------------------- */
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateX(100%);
  animation: heroSlide 15s linear infinite;
  animation-fill-mode: backwards;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }

@keyframes heroSlide {
  0%     { transform: translateX(100%); }
  6.67%  { transform: translateX(0); }
  33.33% { transform: translateX(0); }
  40%    { transform: translateX(-100%); }
  100%   { transform: translateX(-100%); }
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(42,30,20,0.55), rgba(42,30,20,0.5));
}
.hero .container { position: relative; z-index: 2; max-width: 860px; }
.hero .eyebrow {
  background: rgba(181, 80, 42, 0.92);
  display: inline-block; padding: 0.4rem 1rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.4rem); }
@media (max-width: 480px) { .hero { padding: 5rem 0; min-height: 60vh; } }
@media (max-width: 350px) { .hero { padding: 3.5rem 0; min-height: 56vh; } }

/* -------------------------------------------------------------------- */
/* Promise strip */
/* -------------------------------------------------------------------- */
.promise-strip { background: var(--brand-green-dark); color: var(--brand-cream); padding: 2.75rem 0; }
.promise-item svg { width: 30px; height: 30px; color: var(--brand-rust); margin-bottom: 0.5rem; }
.promise-item h4 { color: var(--brand-cream); font-size: 1rem; margin-bottom: 0.2rem; }
.promise-item p { color: rgba(242,228,196,0.75); font-size: 0.88rem; margin: 0; }

/* -------------------------------------------------------------------- */
/* Section heading */
/* -------------------------------------------------------------------- */
.section-heading { max-width: 640px; margin: 0 auto 2.5rem; }
.section-heading .eyebrow { color: var(--brand-rust); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
.section-heading p { color: #5b4a3a; }

/* -------------------------------------------------------------------- */
/* Product cards */
/* -------------------------------------------------------------------- */
.product-card { border: none; box-shadow: 0 2px 8px rgba(61,35,20,0.10); transition: transform 0.18s ease, box-shadow 0.18s ease; overflow: hidden; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(61,35,20,0.14); }
.product-card .thumb { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--brand-cream); display: block; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.product-card:hover .thumb img { transform: scale(1.07); }
.product-card .cat { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-olive); }
.product-card .price { font-weight: 800; color: #000; font-size: 1.05rem; }

/* -------------------------------------------------------------------- */
/* Sort control */
/* -------------------------------------------------------------------- */
.shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.sort-control { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.sort-control label { font-weight: 700; font-size: 0.85rem; color: var(--brand-green-dark); }
.sort-control select {
  border: 2px solid rgba(61,35,20,0.14); border-radius: 999px; background: #fff;
  color: var(--brand-ink); font-weight: 700; font-size: 0.85rem;
  padding: 0.5rem 2rem 0.5rem 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%233D2314' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 12px;
  appearance: none; -webkit-appearance: none;
}
.sort-control select:focus { outline: none; border-color: var(--brand-rust); }

/* -------------------------------------------------------------------- */
/* Pagination */
/* -------------------------------------------------------------------- */
.shop-pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.shop-pagination button {
  min-width: 40px; height: 40px; padding: 0 0.75rem; border-radius: 999px;
  border: 2px solid rgba(61,35,20,0.14); background: #fff; color: var(--brand-green-dark);
  font-weight: 800; font-size: 0.9rem; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.shop-pagination button:hover:not(:disabled):not(.active) { border-color: var(--brand-green-dark); }
.shop-pagination button.active { background: var(--brand-green-dark); border-color: var(--brand-green-dark); color: var(--brand-cream); }
.shop-pagination button:disabled { opacity: 0.35; cursor: default; }
.shop-pagination .page-arrow { font-size: 1.1rem; line-height: 1; }

/* Product grid page-change transition — a light fade/slide so switching
   pagination pages feels like an animated slider rather than an instant swap. */
#product-grid { transition: opacity 0.2s ease, transform 0.2s ease; }
#product-grid.is-paging { opacity: 0; transform: translateX(12px); }

/* -------------------------------------------------------------------- */
/* Product detail page */
/* -------------------------------------------------------------------- */
.product-detail-gallery img { width: 100%; border-radius: 1rem; box-shadow: 0 2px 8px rgba(61,35,20,0.10); }
.product-detail .cat { color: var(--brand-olive); font-weight: 800; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.06em; }
.product-detail .price { font-size: 1.6rem; font-weight: 800; color: var(--brand-rust); }
.product-detail .desc { color: #5b4a3a; }
.qty-stepper { display: inline-flex; align-items: center; border: 2px solid rgba(61,35,20,0.14); border-radius: 999px; overflow: hidden; }
.qty-stepper button { width: 40px; height: 40px; background: var(--brand-cream); border: none; font-size: 1.1rem; font-weight: 700; color: var(--brand-green-dark); }
.qty-stepper input { width: 46px; text-align: center; border: none; background: transparent; font-weight: 700; }
.trust-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: #5b4a3a; }
.trust-list svg { width: 18px; height: 18px; color: var(--brand-green); flex-shrink: 0; }

/* -------------------------------------------------------------------- */
/* Cart page */
/* -------------------------------------------------------------------- */
.cart-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 0.5rem; }
.cart-item .remove-link { font-size: 0.8rem; color: var(--brand-rust); font-weight: 700; }
.summary-card { background: #fff; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 2px 8px rgba(61,35,20,0.10); }
.summary-row.total { font-size: 1.15rem; font-weight: 800; border-top: 1px solid rgba(61,35,20,0.14); padding-top: 0.9rem; margin-top: 0.9rem; }
.summary-note { font-size: 0.82rem; color: var(--brand-olive); font-weight: 700; }

/* -------------------------------------------------------------------- */
/* Cart sidebar (slide-in drawer, opened from the header cart icon) */
/* -------------------------------------------------------------------- */
.cart-sidebar { --bs-offcanvas-width: 400px; background: var(--brand-cream-soft); }
.cart-sidebar .offcanvas-header { border-bottom: 1px solid rgba(61,35,20,0.12); padding: 1.1rem 1.25rem; }
.cart-sidebar .offcanvas-title { font-family: 'Fraunces', Georgia, serif; color: var(--brand-green-dark); }
.cart-sidebar-items { overflow-y: auto; }
.cart-sidebar-item { display: flex; gap: 0.75rem; padding: 1rem 0; border-bottom: 1px solid rgba(61,35,20,0.1); }
.cart-sidebar-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 0.5rem; flex-shrink: 0; }
.cart-sidebar-item .name { font-size: 0.88rem; font-weight: 700; color: var(--brand-ink); margin-bottom: 0.3rem; }
.cart-sidebar-item .price { font-size: 0.85rem; font-weight: 800; color: var(--brand-rust); }
.cart-sidebar-item .remove-link { font-size: 0.76rem; color: var(--brand-rust); font-weight: 700; }
.cart-sidebar .qty-stepper button { width: 30px; height: 30px; font-size: 0.95rem; }
.cart-sidebar .qty-stepper input { width: 34px; font-size: 0.85rem; }
#cart-sidebar-footer { border-top: 1px solid rgba(61,35,20,0.12); padding-top: 1rem; margin-top: 0.5rem; }
@media (max-width: 480px) {
  .cart-sidebar { --bs-offcanvas-width: 100%; }
}

/* -------------------------------------------------------------------- */
/* Content / policy pages */
/* -------------------------------------------------------------------- */
.page-hero { background: var(--brand-cream); padding: 3rem 0 2rem; border-bottom: 1px solid rgba(61,35,20,0.12); }
.policy-page p, .policy-page li { color: #5b4a3a; }

/* -------------------------------------------------------------------- */
/* Footer */
/* -------------------------------------------------------------------- */
.site-footer { background: var(--brand-brown); color: rgba(242,228,196,0.85); padding: 3.5rem 0 1rem; }
.site-footer h4 { color: var(--brand-cream); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.9rem; }
.site-footer a { color: rgba(242,228,196,0.85); }
.site-footer a:hover { color: var(--brand-cream); }
.site-footer ul li { margin-bottom: 0.5rem; }
.footer-brand { font-family: 'Fraunces', serif; font-size: 1.1rem; color: var(--brand-cream); font-weight: 700; margin-bottom: 0.6rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(242,228,196,0.1);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--brand-rust); }
.footer-bottom-text { color: rgba(242,228,196,0.6); font-size: 0.82rem; }

/* -------------------------------------------------------------------- */
/* Toast */
/* -------------------------------------------------------------------- */
.toast-msg {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(200%);
  opacity: 0; visibility: hidden;
  background: var(--brand-green-dark); color: var(--brand-cream);
  padding: 0.85rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(61,35,20,0.14); z-index: 1080;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  white-space: nowrap;
}
.toast-msg.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
