/*
Theme Name: Grameen Bazar (গ্রামীণ বাজার)
Theme URI: https://www.grameen-bazar.com
Author: Grameen Bazar Engineering Team
Author URI: https://www.grameen-bazar.com
Description: Premium Bangladeshi Online Grocery Marketplace Theme for WordPress & WooCommerce. Featuring 100% chemical-free village produce branding, bKash & Nagad payments, Bangladesh 64 districts & upazilas shipping, live flash sale countdown, 2-column mobile product cards, and custom admin dashboard.
Version: 2.0.0
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: grameen-bazar
Domain Path: /languages
Tags: e-commerce, grocery, bangladesh, woocommerce, responsive-layout, custom-menu, featured-images, translation-ready
*/

/* -------------------------------------------------------------
   1. GLOBAL RESET & TYPOGRAPHY
------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --gb-primary: #15803d;        /* Emerald-700 */
  --gb-primary-dark: #14532d;   /* Emerald-900 */
  --gb-primary-light: #ecfdf5;  /* Emerald-50 */
  --gb-accent: #f59e0b;         /* Amber-500 */
  --gb-accent-hover: #d97706;   /* Amber-600 */
  --gb-danger: #e11d48;         /* Rose-600 */
  --gb-bg: #fafaf9;             /* Stone-50 */
  --gb-card-bg: #ffffff;
  --gb-border: #e7e5e4;         /* Stone-200 */
  --gb-text: #1c1917;           /* Stone-900 */
  --gb-text-muted: #78716c;     /* Stone-500 */
  --gb-font: 'Hind Siliguri', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--gb-font);
  background-color: var(--gb-bg);
  color: var(--gb-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* -------------------------------------------------------------
   2. HEADER & NAVIGATION
------------------------------------------------------------- */
.gb-topbar {
  background-color: var(--gb-primary-dark);
  color: #d1fae5;
  font-size: 0.75rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}
.gb-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.gb-topbar a {
  color: #d1fae5;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.gb-topbar a:hover {
  color: #ffffff;
}

.gb-header-main {
  background-color: var(--gb-primary);
  color: #ffffff;
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.gb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.gb-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.gb-brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #ffffff;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.gb-brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}
.gb-brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #a7f3d0;
  text-transform: uppercase;
}

.gb-search-form {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
}
.gb-search-input {
  width: 100%;
  padding: 0.55rem 1rem;
  padding-right: 2.75rem;
  border-radius: 0.625rem;
  border: none;
  font-size: 0.85rem;
  outline: none;
  background: #ffffff;
  color: #1e293b;
}
.gb-search-btn {
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  bottom: 0.25rem;
  padding: 0 0.875rem;
  background: var(--gb-primary-dark);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.gb-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.gb-cart-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gb-primary-dark);
  color: #ffffff;
  padding: 0.45rem 0.85rem;
  border-radius: 0.625rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.gb-cart-count {
  background: var(--gb-accent);
  color: #0f172a;
  border-radius: 9999px;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
}

/* -------------------------------------------------------------
   3. HERO BANNER
------------------------------------------------------------- */
.gb-hero {
  position: relative;
  background: #064e3b;
  color: #ffffff;
  overflow: hidden;
  padding: 3rem 0;
  min-height: 380px;
  display: flex;
  align-items: center;
}
.gb-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.gb-hero-content {
  position: relative;
  max-width: 650px;
  z-index: 2;
}
.gb-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #6ee7b7;
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.gb-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}
.gb-hero-title span {
  color: var(--gb-accent);
}
.gb-hero-desc {
  font-size: 0.95rem;
  color: #d1fae5;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.gb-hero-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--gb-accent);
  color: #0f172a;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: var(--gb-accent-hover);
}
.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
}

/* -------------------------------------------------------------
   4. CIRCULAR CATEGORIES
------------------------------------------------------------- */
.gb-categories-section {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--gb-border);
}
.gb-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}
.gb-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gb-text);
}
.gb-section-subtitle {
  font-size: 0.8rem;
  color: var(--gb-text-muted);
}
.gb-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .gb-cat-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
  }
}
.gb-cat-item {
  display: flex;
  flex-col: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
}
.gb-cat-circle {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid var(--gb-border);
  padding: 0.25rem;
  margin-bottom: 0.5rem;
  transition: transform 0.2s, border-color 0.2s;
}
.gb-cat-item:hover .gb-cat-circle {
  transform: scale(1.06);
  border-color: var(--gb-primary);
}
.gb-cat-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.gb-cat-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gb-text);
  line-height: 1.2;
}

/* -------------------------------------------------------------
   5. FLASH SALE & PRODUCT CARDS
------------------------------------------------------------- */
.gb-flash-banner {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.gb-countdown {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: monospace;
  font-weight: 800;
  font-size: 1.1rem;
}
.gb-countdown-digit {
  background: rgba(0,0,0,0.4);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  color: #fde68a;
}

.gb-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .gb-product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}
.gb-card {
  background: var(--gb-card-bg);
  border: 1px solid var(--gb-border);
  border-radius: 0.875rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s, transform 0.2s;
}
.gb-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.gb-card-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f5f5f4;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gb-card-img-wrap img {
  max-height: 100%;
  object-fit: contain;
}
.gb-badge-discount {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--gb-danger);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
}
.gb-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
.gb-card-brand {
  font-size: 0.7rem;
  color: var(--gb-primary);
  font-weight: 700;
  text-transform: uppercase;
}
.gb-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gb-text);
  margin-top: 0.2rem;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.gb-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.gb-price-current {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gb-primary);
  font-family: monospace;
}
.gb-price-regular {
  font-size: 0.75rem;
  color: var(--gb-text-muted);
  text-decoration: line-through;
  font-family: monospace;
}
.gb-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.btn-cart {
  background: var(--gb-primary-light);
  color: var(--gb-primary-dark);
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0;
  border-radius: 0.5rem;
  cursor: pointer;
  text-align: center;
}
.btn-buy {
  background: var(--gb-primary);
  color: #ffffff;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0;
  border-radius: 0.5rem;
  cursor: pointer;
  text-align: center;
}

/* -------------------------------------------------------------
   6. FOOTER & BOTTOM MOBILE NAV
------------------------------------------------------------- */
.gb-footer {
  background: #022c22;
  color: #ffffff;
  padding: 3rem 0 5rem 0;
  font-size: 0.85rem;
  margin-top: 3rem;
}
@media (min-width: 768px) {
  .gb-footer {
    padding-bottom: 3rem;
  }
}
.gb-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .gb-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .gb-footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}
.gb-footer h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.5rem;
}
.gb-footer p, .gb-footer li {
  color: #a7f3d0;
  line-height: 1.8;
}
.gb-footer ul {
  list-style: none;
}

.gb-mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: #ffffff;
  border-top: 1px solid var(--gb-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
@media (min-width: 768px) {
  .gb-mobile-bottom-nav {
    display: none;
  }
}
.gb-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  color: var(--gb-text-muted);
  font-weight: 600;
}
.gb-mobile-nav-item.active {
  color: var(--gb-primary);
}
