:root {
  --primary-green: #0f291e;
  --secondary-green: #1a4231;
  --cream-bg: #fdf5e6;
  --gold: #b8860b;
  --gold-hover: #daa520;
  --text-dark: #2c2c2c;
  --text-light: #fdf5e6;
  --maroon: #611C35;
}

body {
  background-color: var(--cream-bg);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Cinzel', serif;
}

.sinhala-text {
  font-family: 'Mukta', sans-serif;
}

/* Top language bar */
.top-bar {
  background-color: #0b1d15;
  color: #fff;
  text-align: right;
  padding: 5px 20px;
  font-size: 0.85rem;
}
.lang-toggle {
  display: inline-block;
  cursor: pointer;
}
.lang-toggle span {
  padding: 0 5px;
  color: #a0a0a0;
}
.lang-toggle span.active {
  color: #fff;
  font-weight: bold;
}
.lang-separator {
  color: #666;
  margin: 0 5px;
}

/* Navbar */
.navbar {
  background-color: var(--primary-green);
  padding: 15px 0;
}
.navbar-brand {
  color: var(--gold) !important;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.nav-link {
  color: var(--text-light) !important;
  transition: color 0.3s;
  font-size: 0.95rem;
  margin: 0 5px;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold) !important;
}
.cart-btn {
  border: 1px solid #4a5d4e;
  border-radius: 4px;
  padding: 5px 15px;
  background: transparent;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
}
.cart-icon {
  position: relative;
  margin-left: 15px;
  font-size: 1.2rem;
  color: var(--text-light);
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--gold);
  color: var(--primary-green);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}



/* Hero Section */
.hero-section {
  position: relative;
  background-color: var(--primary-green);
  padding: 120px 0;
  text-align: center;
  border-bottom: 8px solid var(--gold); /* Thicker border to match image */
  overflow: hidden;
}

/* Background Video styling */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

/* Hero Overlay Tint */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(15, 41, 30, 0.75), rgba(15, 41, 30, 0.9));
  z-index: 2;
}

/* Hero Content wrapper above video & overlay */
.hero-content-inner {
  position: relative;
  z-index: 3;
}
/* Shape Divider & Bottom Badge */
.hero-shape-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  z-index: 4; /* Sits above the video and overlay */
}

.hero-shape-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.hero-shape-divider .shape-fill {
  fill: #fdf5e6; /* Matches --cream-bg */
}

.hero-bottom-badge {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 55px;
  background-color: var(--cream-bg);
  border-radius: 50%;
  border: 3px solid var(--gold);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: floatBadge 3s infinite ease-in-out;
}

.hero-bottom-badge i {
  color: var(--primary-green);
  font-size: 1.3rem;
}

@keyframes floatBadge {
  0% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
  100% { transform: translateX(-50%) translateY(0); }
}
.hero-title {
  color: var(--gold);
  font-size: 4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}
.hero-subtitle {
  color: var(--text-light);
  font-size: 1.2rem;
  max-width: 700px;
  margin: 20px auto;
}

/* Buttons */
.btn-gold {
  background-color: var(--gold);
  color: var(--primary-green);
  border: 2px solid var(--gold);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  padding: 10px 30px;
  text-transform: uppercase;
  transition: all 0.3s;
  border-radius: 4px;
}
.btn-gold:hover {
  background-color: transparent;
  color: var(--gold);
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
}
.btn-whatsapp:hover {
  background-color: #20b858;
  color: white;
}

/* About / 7 Rice Varieties Section */
.about-section {
  background-color: var(--cream-bg);
  padding: 80px 0;
}
.about-title {
  color: var(--primary-green);
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  font-weight: 700;
}
.about-image {
  border: 4px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  width: 100%;
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}
.benefit-icon {
  background-color: #f0e6d2; /* Light tan/cream for icon bg */
  color: #333; /* Dark brown/black for icon */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-right: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.benefit-text {
  padding-top: 5px;
}
.benefit-text h5 {
  color: var(--text-dark);
  margin-bottom: 2px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}
.benefit-text p {
  color: #555;
  font-size: 0.9rem;
  margin: 0;
}

/* Products Section (Horizontal Layout like image) */
.products-section {
  background-color: var(--cream-bg);
  padding: 60px 0;
}
/* Products Section (Horizontal Layout like image) */
.products-section {
  background-color: var(--cream-bg);
  padding: 60px 0;
}
.product-panel {
  display: flex;
  background-color: #f5edd6; /* Darker cream container */
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border: 1px solid rgba(184, 134, 11, 0.15);
  padding: 25px;
  align-items: stretch;
  gap: 30px;
}
.product-panel.alt-layout {
  flex-direction: row-reverse;
}

.product-image-area {
  flex: 0 0 40%;
  background-color: transparent; /* transparent to let the panel background show */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 15px;
  border: none;
  perspective: 800px; /* Enable 3D space */
}

/* 3D Product Box Container */
.product-box-3d {
  width: 165px;
  height: 250px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-20deg) rotateX(10deg);
  transition: transform 0.5s ease;
}
.product-panel:hover .product-box-3d {
  transform: rotateY(-5deg) rotateX(5deg);
}

.box-face {
  position: absolute;
  border-radius: 6px;
  height: 100%;
}

.box-face.front {
  width: 100%;
  background-color: var(--primary-green);
  border: 2px solid var(--gold);
  padding: 10px;
  z-index: 2;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.15);
}
.product-panel.alt-color .box-face.front {
  background-color: var(--maroon);
}

.box-face.side {
  width: 20px;
  background-color: #06110c;
  transform: rotateY(90deg) translateZ(154px) translateX(10px);
  border: 1px solid var(--gold);
  box-shadow: 5px 5px 15px rgba(0,0,0,0.25);
}
.product-panel.alt-color .box-face.side {
  background-color: #3b1120;
}

/* Inside the front face of the box */
.box-arch-border {
  border: 1px solid rgba(184, 134, 11, 0.4);
  border-radius: 50% 50% 0 0 / 20% 20% 0 0;
  height: 100%;
  padding: 15px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.box-logo {
  color: var(--gold);
  font-size: 0.8rem;
}
.box-brand-title {
  color: var(--gold);
  font-size: 0.55rem;
  letter-spacing: 1.5px;
  font-family: 'Cinzel', serif;
  font-weight: bold;
}
.box-product-name-en {
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 5px;
  letter-spacing: 0.5px;
}
.box-product-tag-en {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.box-product-name-si {
  color: #ccc;
  font-size: 0.65rem;
  line-height: 1.2;
}
.box-footer-pattern {
  color: var(--gold);
  font-size: 0.55rem;
  letter-spacing: 2px;
}

.product-content {
  flex: 1;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  color: var(--text-dark);
}
.product-content::before {
  display: none; /* Removed the old arch top line */
}

.product-title {
  color: #111;
  font-size: 2rem;
  margin-bottom: 2px;
  text-align: left;
  font-weight: 700;
}
.product-subtitle {
  text-align: left;
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #333;
  font-weight: 600;
}
.product-desc {
  text-align: left;
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 20px;
}

.product-body-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  gap: 20px;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.product-features li {
  font-size: 1.15rem;
  margin-bottom: 6px;
  font-weight: 700;
  color: #111;
}
.product-features li::before {
  display: none;
}

.product-bowl-image {
  max-width: 180px;
  max-height: 120px;
  object-fit: contain;
}

.product-price-action {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.product-price {
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: bold;
  margin-bottom: 10px;
}

/* Preparation Section */
.prep-section {
  background-color: var(--primary-green);
  padding: 80px 0;
  text-align: center;
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
}
.prep-title {
  color: var(--gold);
  margin-bottom: 50px;
  font-size: 2.5rem;
}
.prep-steps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}
.prep-step {
  color: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 150px;
}
.prep-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  /* Thin gold outline style */
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
}
.prep-step h5 {
  font-size: 1.2rem;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.prep-arrow {
  font-size: 2rem;
  color: var(--gold);
  margin-top: 20px;
}

/* Footer */
.footer {
  background-color: #081a13;
  color: var(--text-light);
  padding: 50px 0 20px;
}
.footer-title {
  color: var(--gold);
  margin-bottom: 20px;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}
.footer-links a:hover {
  color: var(--gold);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .navbar-brand img {
    width: 60px !important;
    height: 60px !important;
  }
  .navbar-brand {
    font-size: 1rem !important;
  }
  .hero-title {
    font-size: 2.2rem !important;
  }
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .product-panel {
    flex-direction: column !important;
    padding: 15px;
    gap: 20px;
  }
  .product-panel.alt-layout {
    flex-direction: column !important;
  }
  .product-image-area {
    flex: 0 0 auto;
    width: 100%;
    height: 220px;
    padding: 20px;
  }
  .product-image {
    max-height: 180px;
  }
  .product-content {
    padding: 0 10px;
  }
  .product-title {
    font-size: 1.6rem;
  }
  .product-subtitle {
    font-size: 1.1rem;
  }
  .product-body-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .product-features li {
    font-size: 1rem;
  }
  .product-bowl-image {
    max-width: 120px;
    align-self: flex-end;
    margin-top: -30px;
  }
  .product-price-action {
    align-items: stretch;
    width: 100%;
    margin-top: 15px;
  }
  .product-price {
    text-align: left;
    margin-bottom: 5px;
    font-size: 1.3rem;
  }
  .btn-whatsapp {
    width: 100%;
    text-align: center;
  }
}

/* WhatsApp Floating FAB */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 999;
  transition: all 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff;
  background-color: #20b858;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--primary-green);
  border-top: 2px solid var(--gold);
  display: none; /* Desktop hidden */
  justify-content: space-around;
  align-items: center;
  z-index: 998;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}
.mobile-bottom-nav-item i {
  font-size: 1.2rem;
  margin-bottom: 2px;
}
.mobile-bottom-nav-item:hover, .mobile-bottom-nav-item.active {
  color: var(--gold);
  opacity: 1;
}

/* Mobile Nav adjustments */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex; /* Show only on mobile */
  }
  .whatsapp-float {
    bottom: 80px; /* Shift up to prevent overlapping the bottom nav */
    width: 50px;
    height: 50px;
    font-size: 25px;
  }
  body {
    padding-bottom: 60px; /* Prevent footer content from being cut off by nav bar */
  }
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-green);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* High z-index to overlay all content */
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.preloader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.preloader-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background-color: #ffffff;
  margin-bottom: 25px;
  animation: pulse 2s infinite ease-in-out;
  object-fit: cover;
}
.preloader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(184, 134, 11, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(184, 134, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(184, 134, 11, 0); }
}
