@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@400;500;600;700;800&family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,600&display=swap');

/* ==========================================================================
   ළඟටම.lk — design tokens
   Palette drawn from a Kegalle-district market basket: tea-estate green,
   turmeric gold and sun-dried clay red, on a warm rice-paper background.
   Deliberately not the generic orange/blue franchise look, and not the
   generic cream+terracotta AI default either — greener, earthier, deeper.
   ========================================================================== */
:root{
  /* brand tokens (kept the same variable names used across the PHP pages,
     just repointed to the new palette, so every inline style() everywhere
     re-themes automatically) */
  --brand-orange: #b8562b;        /* clay red — primary buy/confirm actions   */
  --brand-orange-dark: #93401e;
  --brand-blue: #1f5c4a;          /* estate green — secondary actions, links  */
  --brand-blue-dark: #163f33;

  --accent-gold: #cf9a34;         /* turmeric — prices, highlights, badges    */
  --accent-gold-dark: #a97b23;

  --bg-soft: #f6f1e6;             /* warm rice-paper background               */
  --surface: #ffffff;
  --ink: #29281f;                 /* warm near-black text                     */
  --ink-muted: #6f6a58;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(41,40,31,.08);
  --shadow-md: 0 10px 26px rgba(41,40,31,.12);

  --font-display: 'Fraunces', 'Noto Sans Sinhala', 'Segoe UI', serif;
  --font-body: 'Noto Sans Sinhala', 'Segoe UI', Arial, sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

[id^="cat-"]{ scroll-margin-top: 140px; }

body{
  font-family: var(--font-body);
  background: var(--bg-soft);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(31,92,74,.05), transparent 40%),
    radial-gradient(circle at 88% 30%, rgba(207,154,52,.06), transparent 45%);
  color: var(--ink);
}

a{ text-decoration: none; }

h1,h2,h3,h4,h5,.category-title,.p-price,.hero-text h2{
  font-family: var(--font-display);
}

/* ============ HEADER ============ */
.top-header{
  background: var(--surface);
  box-shadow: 0 2px 14px rgba(22,63,51,.07);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--brand-blue);
}

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

.search-wrap{ flex: 1; max-width: 620px; }

.search-wrap .form-control{
  border: 2px solid var(--brand-blue);
  border-right: none;
  border-radius: 30px 0 0 30px;
  padding: .55rem 1.1rem;
  background: #fbfaf6;
}
.search-wrap .form-control:focus{
  box-shadow: none;
  border-color: var(--brand-blue-dark);
  background: #fff;
}
.search-wrap .btn-search{
  border-radius: 0 30px 30px 0;
  background: var(--brand-blue);
  color: #fff;
  border: 2px solid var(--brand-blue);
  padding: .55rem 1.4rem;
  font-weight: 600;
}
.search-wrap .btn-search:hover{ background: var(--brand-blue-dark); }

.search-suggestions{
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-md);
  z-index: 1200;
  max-height: 340px;
  overflow-y: auto;
  display: none;
}
.search-suggestions .sugg-item{
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .8rem;
  cursor: pointer;
  border-bottom: 1px solid #f4f4f4;
}
.search-suggestions .sugg-item:hover{ background: #fbf3e4; }
.search-suggestions img{ width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }

.cart-btn{
  position: relative;
  color: var(--brand-blue-dark);
  font-size: 1.6rem;
}
.cart-badge{
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--accent-gold);
  color: #2b2100;
  font-size: .65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 50px;
}

/* second nav row */
.nav-row{
  background: var(--brand-blue-dark);
}
.nav-row .nav-link{
  color: #f1ece0 !important;
  font-weight: 600;
  padding: .7rem 1rem !important;
  transition: color .15s ease;
}
.nav-row .nav-link:hover{ color: var(--accent-gold) !important; }
.nav-row .dropdown-menu{
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .5rem;
}
.nav-row .dropdown-item{
  border-radius: 8px;
  padding: .55rem .8rem;
  font-weight: 500;
}
.nav-row .dropdown-item:hover{ background: #fbf3e4; color: var(--brand-orange-dark); }

.inquiry-menu .dropdown-menu{ min-width: 260px; }
.inquiry-phone{
  display:flex; align-items:center; gap:.6rem;
  padding:.5rem .3rem; font-weight:600; color: var(--brand-blue-dark);
}

/* ============ CAROUSEL ============ */
.hero-carousel{
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 1.2rem;
  box-shadow: var(--shadow-md);
}
.hero-carousel .carousel-item{
  height: 380px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-slide{
  height: 100%; width: 100%;
  background-size: cover;
  background-position: center;
  display: flex; align-items: flex-end;
}
.hero-slide::before{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(22,26,20,.78) 0%, rgba(22,26,20,.34) 45%, rgba(22,26,20,.05) 75%);
}
.hero-text{
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 2.4rem 3rem;
  max-width: 640px;
}
.hero-text .hero-eyebrow{
  color: var(--accent-gold);
  font-weight: 700;
  letter-spacing: .02em;
  font-size: .95rem;
  margin-bottom: .3rem;
}
.hero-text h2{
  font-weight: 700;
  font-size: 2.3rem;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.hero-text p{ font-size: 1.05rem; opacity: .92; margin-bottom: 1rem; }
.hero-text .btn-hero{
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent-gold);
  color: #2b2100;
  font-weight: 700;
  padding: .55rem 1.3rem;
  border-radius: 50px;
  border: none;
}
.hero-text .btn-hero:hover{ background: #e0ae4b; color: #2b2100; }

.hero-carousel .carousel-indicators [data-bs-target]{
  background-color: rgba(255,255,255,.55);
  width: 9px; height: 9px; border-radius: 50%;
}
.hero-carousel .carousel-indicators .active{ background-color: var(--accent-gold); }
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next{ width: 6%; }

/* ============ CATEGORY SECTIONS ============ */
.category-title{
  display:flex; align-items:center; gap:.6rem;
  font-weight: 700;
  color: var(--brand-blue-dark);
  margin: 2.2rem 0 1rem;
  border-left: 5px solid var(--accent-gold);
  padding-left: .8rem;
}
.category-title i{ font-size: 1.3rem; color: var(--brand-orange); }

/* ============ PRODUCT CARD ============ */
.product-card{
  background: var(--surface);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31,92,74,.06);
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}
.product-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card img{
  width: 100%; height: 200px; object-fit: cover;
  background:#f2eee2;
}
.product-card .p-body{ padding: 1rem 1.1rem 1.2rem; }
.product-card .p-name{ font-weight: 600; font-size: 1.05rem; min-height: 2.6em; }
.product-card .p-price{ color: var(--accent-gold-dark); font-weight: 700; font-size: 1.35rem; }

.qty-stepper{
  display:flex; align-items:center; border: 1px solid #e4ddc9; border-radius: 8px; overflow:hidden; width: fit-content;
}
.qty-stepper button{
  background:#f5f1e6; border:none; width: 36px; height: 36px; font-weight:700; font-size: 1.1rem; color: var(--brand-blue-dark);
}
.qty-stepper input{
  width: 46px; text-align:center; border:none; border-left:1px solid #e4ddc9; border-right:1px solid #e4ddc9; height:36px; font-size: 1rem;
}
.btn-add-cart{
  background: var(--brand-blue);
  color:#fff; font-weight:600; border:none; border-radius: 8px;
  padding: .55rem .8rem; width:100%; font-size: .95rem;
  transition: background .15s ease;
}
.btn-add-cart:hover{ background: var(--brand-blue-dark); color:#fff; }

/* ============ FOOTER ============ */
.site-footer{
  background: #162019;
  color: #cfd0c6;
  margin-top: 3rem;
  padding: 2.8rem 0 1rem;
}
.site-footer h5{ color:#fff; font-weight:700; margin-bottom:1rem; font-family: var(--font-display); }
.site-footer a{ color:#b7b8ac; }
.site-footer a:hover{ color: var(--accent-gold); }
.social-icons a{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:50%;
  background:#233026; margin-right:.5rem; font-size:1.1rem; color:#fff;
}
.social-icons a:hover{ background: var(--brand-orange); }
.footer-bottom{ border-top: 1px solid #2c372f; margin-top: 1.5rem; padding-top: 1rem; font-size:.85rem; text-align:center; color:#8d9086; }

/* ============ CART PAGE ============ */
.cart-table img{ width:60px; height:60px; object-fit:cover; border-radius:8px; }
.cart-summary{
  background: var(--surface); border-radius: var(--radius); padding:1.2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31,92,74,.06);
}

/* ============ CHECKOUT ============ */
.checkout-card{
  background: var(--surface); border-radius: var(--radius); padding:1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31,92,74,.06);
}
.pay-option{
  border: 2px solid #eee6d3; border-radius: 10px; padding: .8rem 1rem; cursor:pointer; margin-bottom:.6rem;
  transition: border-color .15s ease, background .15s ease;
}
.pay-option.active{ border-color: var(--brand-blue); background:#eef6f2; }

.zone-note{
  background: #eef6f2;
  border: 1px dashed var(--brand-blue);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  font-size: .85rem;
  color: var(--brand-blue-dark);
  margin-top: .4rem;
}
.zone-note.is-outside{
  background: #fbf1ea;
  border-color: var(--brand-orange);
  color: var(--brand-orange-dark);
}

.bank-details-box{
  background: #fbf6e9;
  border: 1px solid #ecdfb3;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-top: .6rem;
}
.bank-details-box dl{ display:grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin-bottom:0; }
.bank-details-box dt{ color: var(--ink-muted); font-weight:600; }
.bank-details-box dd{ margin:0; font-weight:600; }

.wa-note-box{
  display:flex; align-items:flex-start; gap:.7rem;
  border: 1px solid #b7e2c4; background:#eaf7ee; color:#1c5a33;
  border-radius: var(--radius-sm); padding: .9rem 1rem; margin-top:.6rem;
}
.wa-note-box i{ font-size:1.6rem; color:#25d366; line-height:1; }
.wa-payment-box{
  background:#fbf6e9; border:1px solid #ecdfb3; border-radius: var(--radius-sm); padding:1rem 1.1rem;
}
.wa-payment-box dl{ display:grid; grid-template-columns:auto 1fr; gap:.3rem 1rem; }
.wa-payment-box dt{ color: var(--ink-muted); font-weight:600; }
.wa-payment-box dd{ margin:0; font-weight:600; }

/* ============ ADMIN ============ */
.admin-sidebar{
  background: linear-gradient(180deg, #16281f, #101d17);
  min-height:100vh; color:#fff; padding-top:1rem;
}
.admin-sidebar a{
  display:block; color:#cfd8d2; padding:.7rem 1.2rem; border-radius:8px; margin:.2rem .7rem; font-weight:500;
}
.admin-sidebar a.active, .admin-sidebar a:hover{ background: var(--brand-orange); color:#fff; }
.admin-topbar{ background:#fff; padding:1rem 1.5rem; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.stat-card{ background:#fff; border-radius: var(--radius); padding:1.2rem; box-shadow: var(--shadow-sm); }

@media (max-width: 768px){
  .hero-text{ padding: 1.2rem 1.4rem; max-width: 100%; }
  .hero-text h2{ font-size: 1.4rem; }
  .hero-carousel .carousel-item{ height: 260px; }
  .logo-img{ height: 40px; }
  [id^="cat-"]{ scroll-margin-top: 112px; }
}
