:root {
  --bg-color: #f9f6f0;
  --heading-color: #979178;
  --text-color: #1a1a1a;
  --card-bg: rgb(237, 229, 218);
  --btn-bg: black;
  --btn-text: white;
  --hero-bg-image: url(./images/hero-back.png);
}

[data-theme="dark"] {
  --bg-color: #111a29;
  --heading-color: #c7bcbc;
  --text-color: #f1f1f1;
  --card-bg: #1b2638;
  --btn-bg: #d2aa5a;
  --btn-text: #111a29;
  --hero-bg-image: url(./images/dark\ hero\ back.png);
}
[data-theme="dark"] #cart img {
  filter: brightness(0) invert(1); /* turns a dark SVG white in dark mode */
}
[data-theme="dark"] .card-title,
[data-theme="dark"] .card-text {
  color: var(--text-color);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ---------- NAV ---------- */

.nav-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: clamp(15px, 3vw, 25px) clamp(20px, 8vw, 100px);
  gap: 20px;
  z-index: 10;
}

.logo h1 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(25px, 4vw, 55px);
  color: var(--text-color);
}
span {
  color: rgba(224, 166, 95, 0.733);
  font-size: clamp(20px, 4vw, 48px);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(15px, 3vw, 60px);
}

.nav a {
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 30px);
  color: var(--text-color);
  text-decoration: none;
  text-transform: capitalize;
  white-space: nowrap;
}
.nav a.active {
  color: rgba(224, 166, 95, 0.733);
}
#cart {
  cursor: pointer;
}
#cart img {
  width: clamp(20px, 2vw, 25px);
  height: clamp(20px, 2vw, 25px);
  display: block;
  transition: filter 0.3s ease;
}

/* ---------- HERO ---------- */
@keyframes floatBottle {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-18px); }
  100% { transform: translateY(0px); }
}
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero {
  background-image: var(--hero-bg-image);
  width: 100%;
  min-height: 100vh;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: clamp(110px, 15vw, 160px) clamp(20px, 6vw, 100px)
    clamp(40px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
  transition: background-image 0.35s ease;
}

.hero-content {
  flex: 1 1 320px;
  min-width: 0;
}

.hero h2 {
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  max-width: 400px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.25;
  color: var(--text-color);
  opacity: 0; /* stays invisible until the animation runs */
  animation: fadeSlideUp 0.8s ease-out forwards;
}
#farm {
  font-size: large;
}

.hero p {
  font-weight: 500;
  max-width: 400px;
  font-size: clamp(15px, 1, 8vw, 30px);
  margin-top: 20px;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0;
  animation: fadeSlideUp 0.8s ease-out forwards;
  animation-delay: 0.3s;
}

.hero-btn {
  margin-top: 25px;
  padding: clamp(10px, 1.2vw, 14px) clamp(20px, 3vw, 28px);
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 600;
  border: none;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 40px 0 40px 0;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease-out forwards;
  animation-delay: 0.55s;
}
.hero-btn:hover {
  background-color: #2a2a2a;
  transform: translateY(-3px);}

.hero-img {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 400px;
  display: flex;
  justify-content: center;
  object-fit: cover;
}

.hero-img img {
  width: 100%;
  max-width: 350px;
  height: auto;
  display: block;
  object-fit: cover;
  animation: floatBottle 4s ease-in-out infinite;

}

/* features */
@keyframes appear {
  from{
    opacity: 0;
    scale: 0.5;
  }
  to{
    opacity: 1;
    scale: 1;
  }
}
#feature-h {
  font-weight: 600;
  font-size: 40px;
  margin: 30px 0 0 30px;
  color: var(--heading-color);
}
.feature-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  row-gap: 30px;
  column-gap: 30px;
  margin: 30px clamp(20px, 6vw, 100px);
  align-items: stretch;
}

.features {
  padding: clamp(15px, 3vw, 20px);
  background-color: var(--card-bg);
  text-align: center;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  color: var(--text-color);
  transition: background-color 0.35s ease, color 0.35s ease;

  animation: appear 5s linear;
  animation-timeline: view();
  animation-range: entry 0% cover 40%; 
}

.features h4 {
  font-size: clamp(18px, 2.2vw, 22px);
}

.features p {
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.6;
}

.features img {
  width: 100%;
  max-width: 400px;
  height: clamp(150px, 25vw, 220px);
  object-fit: cover;
  border-radius: 6px;
  margin-top: auto;
}
/* stats */

.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(30px, 6vw, 80px);
  padding: clamp(50px, 8vw, 90px) clamp(20px, 6vw, 100px);

  text-align: center;
}

.stat h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-family: Georgia, "Times New Roman", Times, serif;
  margin-bottom: 8px;
  color: var(--text-color);
}

.stat p {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--text-color);
  color: black;
}

/* cards */

.card-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 60px);
}
#card-h {
  font-size: 40px;
  text-align: center;
  background: linear-gradient(40deg, #eae2c1, #333336);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.card {
  width: clamp(20rem, 32vw, 28rem);
  flex: 1 1 320px;
  display: flex;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
}
.card-img {
  transition: transform 0.45s ease;
}

.card:hover .card-img {
  transform: scale(1.08);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  background-color: var(--card-bg);
  color: var(--text-color);
  transition: background-color 0.35s ease, color 0.35s ease;
}
.card-title {
  font-size: clamp(25px, 1.6vw, 32px);
}

.card-text {
  font-weight: 500;
  flex: 1;
}

.card .btn {
  color: var(--btn-text);
  margin-top: auto;
  align-self: flex-start;
  background-color: var(--btn-bg);
  border: none;
  font-weight: 600;
  font-size: clamp(15px, 1.6vw, 20px);
  transition: background-color 0.3s ease;
  transition: background-color 0.2s ease, transform 0.2s ease, gap 0.2s ease;

}
.card .btn:hover {
  background-color: var(--btn-bg);
  opacity: 0.85;
  gap: 12px;
}
.cart-color {
  filter: brightness(0) invert(1);
}
#more-btn {
  font-size: clamp(16px, 1.5vw, 22px);
  color: var(--text-color);
  text-align: center;
  position: relative;
  left: 43%;
  color: black;
}
/* our story */
#story-h {
  margin-left: 30px;
  font-size: 40px;
  margin-bottom: 20px;
  color: var(--heading-color);
}
.story-container {
  border-radius: 20px;
  overflow: hidden; 
}

.story-container .carousel-inner {
  height: 100vh;
}

.story-container .carousel-item img {
  width: 100%;
  height: 100vh;
  object-fit: cover; 
}
.carousel-inner p {
  font-weight: 600;
}

/* ---------- CART DRAWER ---------- */

.cart-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 200; 
}

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

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background-color: var(--bg-color);
  color: var(--text-color);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s ease, background-color 0.35s ease;
  z-index: 201;
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 4vw, 30px);
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.cart-drawer-header h3 {
  font-size: 24px;
  color: var(--text-color);
}

.cart-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.cart-close:hover {
  opacity: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: clamp(15px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  gap: 14px;
}

.cart-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

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

.cart-item-info h4 {
  font-size: 15px;
  margin-bottom: 2px;
  color: var(--text-color);
}

.cart-item-info p {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 8px;
  color: var(--text-color);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-color);
  border-radius: 30px;
  padding: 3px 6px;
  width: fit-content;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.qty-btn:hover {
  opacity: 0.85;
}

.qty-value {
  min-width: 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-color);
}

.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.remove-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.5;
  cursor: pointer;
}

.remove-btn:hover {
  opacity: 1;
  color: #c0392b;
}

.cart-item-price {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-color);
}

.cart-drawer-footer {
  padding: clamp(15px, 3vw, 24px);
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-color);
}

.total-row {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-color);
}

.checkout-btn {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  font-size: 17px;
  font-weight: 600;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s ease;
}

.checkout-btn:hover {
  opacity: 0.85;
}

.continue-link {
  text-align: center;
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.7;
  text-decoration: none;
}

.continue-link:hover {
  opacity: 1;
  text-decoration: underline;
}

body.cart-open {
  overflow: hidden;
}

/* theme btn */

.theme-toggle-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300; /* above the cart drawer (201) so it's always reachable */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.theme-toggle-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.theme-toggle-icon:hover {
  transform: scale(1.08);
}
