/* =====================================================
   DehatiFarm — Design Tokens
   Palette: Harvest crate / village market stall
   ===================================================== */
:root {
  --df-olive:        #2F3E2E;   /* primary - deep leaf green */
  --df-olive-light:  #3E5240;
  --df-gold:         #C68B2E;   /* accent - turmeric gold */
  --df-gold-light:   #E0A94B;
  --df-paper:        #F7F3E9;   /* background - kraft paper */
  --df-paper-dark:   #EFE8D6;
  --df-brown:        #3B2E27;   /* text - roasted coffee */
  --df-brown-soft:   #6b5c4f;
  --df-red:          #A83A2C;   /* stamp red - sale/badges */
  --df-cream-card:   #FFFDF8;
  --df-border:       #E2D9C2;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 10px;
  --shadow-card: 0 2px 10px rgba(59,46,39,0.08);
  --shadow-card-hover: 0 10px 24px rgba(59,46,39,0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--df-brown);
  background: var(--df-paper);
  line-height: 1.6;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--df-olive);
  letter-spacing: -0.01em;
}

a { color: var(--df-olive); text-decoration: none; }
a:hover { color: var(--df-gold); }

::selection { background: var(--df-gold-light); color: var(--df-brown); }

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--df-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============ Buttons ============ */
.btn-df-primary {
  background: var(--df-olive);
  border: 1px solid var(--df-olive);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.btn-df-primary:hover {
  background: var(--df-gold);
  border-color: var(--df-gold);
  color: #fff;
  transform: translateY(-1px);
}
.btn-df-outline {
  background: transparent;
  border: 1.5px solid var(--df-olive);
  color: var(--df-olive);
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.btn-df-outline:hover {
  background: var(--df-olive);
  color: #fff;
}
.btn-df-gold {
  background: var(--df-gold);
  border: 1px solid var(--df-gold);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.btn-df-gold:hover { background: #b17a24; color: #fff; transform: translateY(-1px); }

/* ============ Navbar ============ */
.df-navbar {
  background: var(--df-paper);
  border-bottom: 1px solid var(--df-border);
  transition: box-shadow 0.25s ease;
}
.df-navbar.scrolled { box-shadow: 0 4px 16px rgba(59,46,39,0.08); }
.df-navbar .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--df-olive);
}
.df-navbar .navbar-brand span { color: var(--df-gold); }
.df-navbar .nav-link {
  color: var(--df-brown);
  font-weight: 500;
  margin: 0 0.4rem;
  position: relative;
}
.df-navbar .nav-link.active,
.df-navbar .nav-link:hover { color: var(--df-olive); font-weight: 600; }
.df-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.3rem; right: 0.3rem; bottom: -2px;
  height: 2px;
  background: var(--df-gold);
  border-radius: 2px;
}
/* Keep the Bootstrap caret visible in every state (fixes "arrow disappears" issue) */
.df-navbar .dropdown-toggle::after {
  border-top-color: currentColor !important;
  vertical-align: middle;
}
/* Hover-to-open dropdown on desktop; click still works, and falls back to normal
   click-to-open on touch/mobile since hover doesn't apply there */
@media (min-width: 992px) {
  .df-navbar .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

/* ============ Shop mega menu ============ */
.df-mega-menu {
  padding: 1.5rem;
  border: 1px solid var(--df-border);
  border-radius: 16px;
  box-shadow: var(--shadow-card-hover);
  width: max-content;
  max-width: min(90vw, 900px);
}
.df-mega-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
@media (min-width: 992px) {
  /* Detach the panel from the "Shop" link's position and center it under
     the whole header instead, like a full-width mega menu */
  .df-shop-dropdown .df-mega-menu {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: var(--df-navbar-bottom, 90px);
    width: min(94vw, 1200px);
    max-width: 94vw;
  }
  .df-shop-dropdown .df-mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    overflow-x: visible;
  }
}
.df-mega-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 108px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--df-brown);
}
.df-mega-thumb {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background: var(--df-paper-dark);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.df-mega-thumb img { width: 100%; height: 100%; object-fit: cover; }
.df-mega-item:hover .df-mega-thumb { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.df-mega-item span {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--df-olive);
  line-height: 1.25;
}
.df-mega-item:hover span { color: var(--df-gold); }
.df-cart-badge {
  background: var(--df-red);
  color: #fff;
  font-size: 0.65rem;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; top: -4px; right: -8px;
}

/* ============ Hero ============ */
/* ==========================================================
   HERO SECTION
========================================================== */

.df-hero{
    position: relative;
    width: 100%;
    height: 720px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-radius: 0 0 32px 32px;
}

/* Background Image */

.hero-bg{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

/* Dark Overlay */

.hero-overlay{
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,.70) 0%,
        rgba(0,0,0,.45) 35%,
        rgba(0,0,0,.15) 70%,
        rgba(0,0,0,.05) 100%
    );
    z-index: 2;
}

/* Content */

.hero-content{
    position: relative;
    z-index: 3;
    color: #fff;
    width: 100%;
}

/* Badge */

.hero-content .stamp{
    display: inline-block;

    padding: 10px 18px;

    border: 2px dashed rgba(255,255,255,.45);

    border-radius: 50px;

    color: #E7B041;

    background: rgba(0,0,0,.18);

    font-weight: 600;

    letter-spacing: .6px;
}

/* Heading */

.hero-content h1{

    font-size: 4.4rem;

    line-height: 1.1;

    font-weight: 700;

    margin-top: 20px;

    margin-bottom: 20px;

    color: #fff;
}

/* Paragraph */

.hero-content .lead{

    font-size: 1.35rem;

    line-height: 1.7;

    color: rgba(255,255,255,.92);

    margin-bottom: 35px;
}

/* Buttons */

.hero-content .btn{

    padding: 14px 32px;

    border-radius: 14px;
}

/* Stats */

.hero-content .fs-4{

    color: #fff;

    font-size: 2rem;
}

.hero-content .small{

    color: rgba(255,255,255,.82);
}

/* Mobile */

@media (max-width:991px){

    .df-hero{

        height: 620px;

        border-radius: 0;
    }

    .hero-content{

        max-width: 100%;

        padding: 80px 20px;
    }

    .hero-content h1{

        font-size: 2.7rem;
    }

    .hero-content .lead{

        font-size: 1.05rem;
    }

}

@media (max-width:576px){

    .df-hero{

        height: 520px;
    }

    .hero-content{

        padding-top: 60px;
    }

    .hero-content h1{

        font-size: 2rem;
    }

    .hero-content .btn{

        width: 100%;

        margin-bottom: 10px;
    }

}

/* ============ Section labels ============ */
.df-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--df-gold);
}
.df-section-title { margin-top: 0.25rem; }

/* ============ Category Chips ============ */
.df-category-card {
  background: var(--df-cream-card);
  border: 1px solid var(--df-border);
  border-radius: var(--radius);
  text-align: center;
  padding: 1.4rem 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  color: var(--df-brown);
}
.df-category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  color: var(--df-olive);
}
.df-category-card .icon-wrap {
  width: 56px; height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--df-paper-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--df-olive);
}

/* ============ Product Cards ============ */
.df-product-card {
  background: var(--df-cream-card);
  border: 1px solid var(--df-border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.df-product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}
.df-product-card .df-img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--df-paper-dark);
  overflow: hidden;
  position: relative;
}
.df-product-card .df-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.df-product-card:hover .df-img-wrap img { transform: scale(1.07); }
.df-badge-sale {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: var(--df-red);
  color: #fff;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.df-badge-stock {
  position: absolute; top: 0.6rem; right: 0.6rem;
  background: rgba(59,46,39,0.75);
  color: #fff;
  font-size: 0.7rem; font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.df-product-card .df-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.df-product-card .df-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--df-gold); font-weight: 700; }
.df-product-card h3 { font-size: 1.05rem; margin: 0.2rem 0 0.4rem; }
.df-product-card .df-price-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.df-price-old { text-decoration: line-through; color: var(--df-brown-soft); font-size: 0.85rem; margin-right: 0.35rem; }
.df-price-now { font-weight: 700; color: var(--df-olive); font-size: 1.05rem; }

/* ============ Testimonials ============ */
.df-testimonial {
  background: var(--df-cream-card);
  border: 1px solid var(--df-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}
.df-testimonial .stars { color: var(--df-gold); letter-spacing: 2px; }

/* ============ Footer ============ */
.df-footer {
  background: var(--df-brown);
  color: #EFE6D8;
}
.df-footer h5 { color: #fff; font-family: var(--font-display); }
.df-footer a { color: #cbb99e; }
.df-footer a:hover { color: var(--df-gold-light); }
.df-footer hr { border-color: rgba(255,255,255,0.12); }

/* ============ Cards / general surfaces ============ */
.df-surface {
  background: var(--df-cream-card);
  border: 1px solid var(--df-border);
  border-radius: var(--radius);
}

/* ============ Cart page ============ */
.df-cart-row { border-bottom: 1px solid var(--df-border); padding: 1rem 0; }
.df-qty-input { width: 60px; text-align: center; }

/* ============ Forms ============ */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--df-border);
  padding: 0.6rem 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--df-gold);
  box-shadow: 0 0 0 0.2rem rgba(198,139,46,0.15);
}
label.form-label { font-weight: 600; color: var(--df-brown); font-size: 0.9rem; }

/* ============ Badges / status pills (admin + orders) ============ */
.df-pill { padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; display: inline-block; }
.df-pill-placed { background: #E6EEFB; color: #2255A4; }
.df-pill-processing { background: #FDF0D9; color: #9A6300; }
.df-pill-shipped { background: #E1EEFB; color: #0C5DA5; }
.df-pill-delivered { background: #E1F3E5; color: #1E7B34; }
.df-pill-cancelled { background: #FBE3E1; color: #A83A2C; }
.df-pill-paid { background: #E1F3E5; color: #1E7B34; }
.df-pill-pending { background: #FDF0D9; color: #9A6300; }
.df-pill-failed { background: #FBE3E1; color: #A83A2C; }

/* ============ Blog ============ */
.df-blog-card { background: var(--df-cream-card); border: 1px solid var(--df-border); border-radius: var(--radius); overflow: hidden; height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.df-blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.df-blog-card img { width: 100%; height: 190px; object-fit: cover; }

/* ============ Auth pages ============ */
.df-auth-wrap {
  min-height: calc(100vh - 300px);
  display: flex;
  align-items: center;
  padding: 3rem 0;
}
.df-auth-card {
  background: var(--df-cream-card);
  border: 1px solid var(--df-border);
  border-radius: 16px;
  padding: 2.2rem;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

/* ============ Back to top ============ */
#df-back-to-top {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--df-olive);
  color: #fff;
  display: none;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-card-hover);
  z-index: 1000;
  border: none;
}
#df-back-to-top.show { display: flex; }

/* ============ WhatsApp floating button ============ */
#df-whatsapp-btn {
  position: fixed;
  right: 1.25rem; bottom: 5.25rem;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-card-hover);
  z-index: 1000;
  transition: transform 0.2s ease;
}
#df-whatsapp-btn:hover { transform: scale(1.08); color: #fff; }

/* ============ Fade-in animation ============ */
.df-fade-in { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.df-fade-in.df-visible { opacity: 1; transform: translateY(0); }

/* ============ Admin ============ */
.df-admin-sidebar {
  background: var(--df-olive);
  min-height: 100vh;
  color: #fff;
}
.df-admin-sidebar .brand { font-family: var(--font-display); font-size: 1.3rem; padding: 1.2rem 1.2rem 0.6rem; color: #fff; display: block; }
.df-admin-sidebar a.nav-link {
  color: rgba(255,255,255,0.78);
  padding: 0.65rem 1.2rem;
  border-left: 3px solid transparent;
  border-radius: 0;
}
.df-admin-sidebar a.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.df-admin-sidebar a.nav-link.active {
  background: rgba(255,255,255,0.1);
  border-left-color: var(--df-gold);
  color: #fff;
  font-weight: 600;
}
.df-stat-card {
  background: var(--df-cream-card);
  border: 1px solid var(--df-border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.df-stat-card .num { font-family: var(--font-display); font-size: 2rem; color: var(--df-olive); font-weight: 700; }
.df-stat-card .icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }

.table-df thead { background: var(--df-paper-dark); }
.table-df th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--df-brown-soft); }

@media (max-width: 767.98px) {
  .df-hero { border-radius: 0 0 20px 20px; }
}
