/* ===================================================================
   greenbasket — grocery landing page template
   =================================================================== */

:root {
  /* colors sampled from source design */
  --green-dark:      #2f7738;
  --green-light:     #a7c57f;
  --green-primary:   #3c8c44;
  --green-primary-d: #2f6f37;
  --green-logo:      #6cbf4b;
  --pink-add:        #d1568e;
  --pink-add-bg:     #fdf1f6;
  --purple-active:   #954fa4;
  --purple-active-bg:#faebfe;
  --blue-tag:        #2f8fd1;

  --text-dark:   #1c1c1c;
  --text-body:   #4b5058;
  --text-gray:   #767b83;
  --text-mute:   #9aa0a8;

  --border-color: #e7e8ec;
  --bg-page:      #f7f7fa;
  --white:        #ffffff;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 1px 2px rgba(20,20,30,.04), 0 1px 6px rgba(20,20,30,.04);
  --shadow-header: 0 1px 8px rgba(20,20,30,.06);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* =============================== HEADER =============================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-header);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo span { color: var(--green-logo); }

.delivery-info {
  flex-shrink: 0;
  padding-right: 20px;
  border-right: 1px solid var(--border-color);
}

.delivery-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.delivery-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-gray);
  margin-top: 2px;
}

.delivery-location svg { flex-shrink: 0; color: var(--text-gray); }

.search-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 16px;
  max-width: 480px;
  color: var(--text-mute);
  transition: border-color .15s ease;
}

.search-bar:focus-within { border-color: var(--green-primary); }

.search-bar input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  min-width: 0;
  font-size: 14px;
  color: var(--text-dark);
}

.search-bar input::placeholder { color: var(--text-mute); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
  margin-left: auto;
}

.login-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eef0f2;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  white-space: nowrap;
  transition: background .15s ease;
}

.cart-btn:hover { background: #e2e4e8; }

/* =============================== HERO =============================== */

.hero-section { padding: 24px 24px 8px; }

.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, var(--green-dark) 0%, var(--green-dark) 38%, var(--green-light) 100%);
  padding: 44px 48px;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-content { max-width: 480px; position: relative; z-index: 2; }

.hero-content h1 {
  color: var(--white);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero-content p {
  color: rgba(255,255,255,.92);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 22px;
  max-width: 400px;
}

.shop-now-btn {
  background: var(--white);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 26px;
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.shop-now-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

.hero-visual {
  position: relative;
  width: 320px;
  height: 170px;
  flex-shrink: 0;
  display: none;
}

.hero-visual .float {
  position: absolute;
  font-size: 46px;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.15));
}

.f1 { top: 6%;  left: 4%;  font-size: 52px; }
.f2 { top: 40%; left: 0%;  font-size: 40px; }
.f3 { top: 62%; left: 18%; font-size: 46px; }
.f4 { top: 8%;  left: 38%; font-size: 38px; }
.f5 { top: 46%; left: 40%; font-size: 44px; }
.f6 { top: 4%;  left: 66%; font-size: 42px; }
.f7 { top: 55%; left: 68%; font-size: 36px; }
.f8 { top: 30%; left: 82%; font-size: 40px; }

@media (min-width: 860px) {
  .hero-visual { display: block; }
}

/* ========================= SECTION TITLE ========================= */

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

/* ===================== SHOP BY CATEGORY ===================== */

.category-section { padding: 28px 24px 8px; }

.category-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.category-card {
  position: relative;
  border-radius: var(--radius-md);
  min-height: 150px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform .2s ease;
}

.category-card:hover { transform: translateY(-3px); }

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.65) 100%);
}

.cat-fruits   { background: radial-gradient(circle at 70% 30%, #f7e58c, #d8c23e 60%, #a68a1f); }
.cat-veggies  { background: radial-gradient(circle at 60% 25%, #6fae4a, #3f7a2e 65%, #244d1c); }
.cat-exotic   { background: radial-gradient(circle at 65% 30%, #f2a6b0, #d8465f 65%, #8c1f34); }

.cat-fruits::after,
.cat-veggies::after,
.cat-exotic::after {
  content: '';
  position: absolute;
  inset: 0;
  font-size: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .5;
}

.card-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 16px 18px;
}

.card-tag {
  display: block;
  color: rgba(255,255,255,.85);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.card-overlay h3 {
  color: var(--white);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 2px;
}

.card-overlay p {
  color: rgba(255,255,255,.85);
  font-size: 12.5px;
  font-weight: 500;
}

/* ===================== SIDEBAR + PRODUCT GRID ===================== */

.shop-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 28px 24px 40px;
  align-items: start;
}

.sidebar {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: sticky;
  top: 84px;
}

.sidebar-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background .15s ease;
}

.sidebar-list li:last-child { border-bottom: none; }

.sidebar-list li:hover { background: #fafafa; }

.sidebar-list li.active {
  background: var(--purple-active-bg);
  color: var(--purple-active);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.cat-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #f1f2f4;
  flex-shrink: 0;
}

.icon-all { background: #f3d9f7; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: visible;
  transition: box-shadow .18s ease, transform .18s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(20,20,30,.09);
  transform: translateY(-2px);
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: visible;
}

.product-image::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.add-btn {
  position: absolute;
  bottom: -12px;
  right: 10px;
  z-index: 3;
  background: var(--white);
  color: var(--pink-add);
  border: 1.4px solid var(--pink-add);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .3px;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  transition: background .15s ease, color .15s ease;
}

.add-btn:hover { background: var(--pink-add); color: var(--white); }

.product-info { padding: 18px 10px 12px; }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.price-now {
  background: var(--green-primary);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.price-mrp {
  font-size: 11.5px;
  color: var(--text-mute);
  text-decoration: line-through;
}

.product-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-qty {
  font-size: 11.5px;
  color: var(--text-gray);
}

.product-tag {
  display: inline-block;
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 700;
}

.tag-blue  { color: var(--blue-tag); }
.tag-green { color: var(--green-primary); }

/* --- product image art direction (gradient + emoji stand-ins for photos) --- */
.product-image::after { position: relative; z-index: 1; }

.img-jamun           { background: radial-gradient(circle at 40% 35%, #6b4b8a, #3d2a52); }
.img-jamun::after           { content: '🫐'; }
.img-litchi          { background: radial-gradient(circle at 40% 35%, #f6dcd0, #e0a98c); }
.img-litchi::after          { content: '🍈'; }
.img-spinach         { background: radial-gradient(circle at 40% 35%, #7fb463, #4c7d34); }
.img-spinach::after         { content: '🥬'; }
.img-mushroom        { background: radial-gradient(circle at 40% 35%, #d9c9ae, #b19b76); }
.img-mushroom::after        { content: '🍄'; }
.img-coriander       { background: radial-gradient(circle at 40% 35%, #8fbf5a, #5c8e33); }
.img-coriander::after       { content: '🌿'; }
.img-tomato          { background: radial-gradient(circle at 40% 35%, #f0a58a, #d94f3a); }
.img-tomato::after          { content: '🍅'; }
.img-banana-robusta  { background: radial-gradient(circle at 40% 35%, #f7e58c, #d9b93f); }
.img-banana-robusta::after  { content: '🍌'; }
.img-banana-elaichi  { background: radial-gradient(circle at 40% 35%, #f2e7a8, #cfae4a); }
.img-banana-elaichi::after  { content: '🍌'; }
.img-onion           { background: radial-gradient(circle at 40% 35%, #c98fae, #93415f); }
.img-onion::after           { content: '🧅'; }
.img-coriander2      { background: radial-gradient(circle at 40% 35%, #8fbf5a, #5c8e33); }
.img-coriander2::after      { content: '🌿'; }
.img-chilli          { background: radial-gradient(circle at 40% 35%, #a9d178, #6fa53f); }
.img-chilli::after          { content: '🌶️'; }
.img-marigold        { background: radial-gradient(circle at 40% 35%, #ffe27a, #f0b93a); }
.img-marigold::after        { content: '🌼'; }

/* ============================== FAQ ============================== */

.faq-section { padding: 20px 24px 60px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.faq-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-body);
}

/* ============================ RESPONSIVE ============================ */

.sidebar-list li a{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    color:inherit;
}

/* ---------------------------------------------------------------------
   Breakpoint map:
   1200px  small laptops        — product grid loses a column
   1024px  tablets landscape    — product grid + category cards drop again
    860px  tablets portrait     — sidebar stacks above grid, hero art hides
    700px  large phones         — header wraps, hero/category text shrinks
    480px  phones               — final compaction, 2-col product grid
    360px  small phones         — tightest spacing
   --------------------------------------------------------------------- */

/* ===================== 1200px — small laptops ===================== */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===================== 1024px — tablets (landscape) ===================== */
@media (max-width: 1024px) {
  .header-inner { gap: 18px; }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .category-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-card:last-child {
    grid-column: 1 / -1;
  }

  .shop-section {
    grid-template-columns: 170px 1fr;
    gap: 18px;
  }
}

/* ===================== 860px — tablets (portrait) ===================== */
@media (max-width: 860px) {
  .container { padding: 0 20px; }

  /* header: drop the delivery-time divider, keep search + cart */
  .delivery-info { display: none; }
  .header-inner { padding: 12px 20px; }

  /* hero: hero-visual already hides via its own min-width:860px rule */
  .hero-section { padding: 20px 20px 8px; }
  .hero-banner { padding: 36px 34px; }
  .hero-content { max-width: 100%; }
  .hero-content h1 { font-size: 28px; }
  .hero-content p { max-width: 100%; }

  .category-section { padding: 24px 20px 8px; }

  /* sidebar becomes a horizontally-scrollable pill bar above the grid */
  .shop-section {
    grid-template-columns: 1fr;
    padding: 24px 20px 36px;
    gap: 16px;
  }

  .sidebar {
    position: static;
    width: 100%;
  }

  .sidebar-list {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar-list::-webkit-scrollbar { display: none; }

  .sidebar-list li {
    flex: 0 0 auto;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
  }

  .sidebar-list li:last-child { border-right: none; }

  .sidebar-list li.active { border-radius: 0; }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .faq-section { padding: 18px 20px 48px; }
}

/* ===================== 700px — large phones ===================== */
@media (max-width: 700px) {
  /* header wraps onto two rows: (logo ... cart) then full-width search */
  .header-inner {
    flex-wrap: wrap;
    row-gap: 10px;
    gap: 14px;
  }

  .logo { order: 1; font-size: 23px; }

  .header-actions {
    order: 2;
    margin-left: auto;
    gap: 16px;
  }

  .search-bar {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .hero-banner {
    padding: 30px 26px;
    min-height: auto;
  }

  .hero-content h1 { font-size: 24px; margin-bottom: 10px; }
  .hero-content p { font-size: 14px; margin-bottom: 18px; }
  .shop-now-btn { padding: 11px 22px; font-size: 14px; }

  .category-cards {
    grid-template-columns: 1fr;
  }

  .category-card { min-height: 130px; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ===================== 480px — phones ===================== */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .header-inner { padding: 10px 16px; gap: 10px; }
  .logo { font-size: 21px; }
  .login-link { display: none; }
  .cart-btn { padding: 9px 14px; font-size: 13px; gap: 6px; }

  .hero-section { padding: 14px 16px 6px; }
  .hero-banner { padding: 24px 20px; border-radius: var(--radius-md); }
  .hero-content h1 { font-size: 21px; }
  .hero-content p { font-size: 13.5px; }

  .category-section { padding: 20px 16px 6px; }
  .section-title { font-size: 18px; margin-bottom: 12px; }
  .card-overlay h3 { font-size: 16px; }
  .card-overlay p { font-size: 11.5px; }

  .shop-section { padding: 20px 16px 30px; }
  .product-info { padding: 14px 8px 10px; }
  .product-image { font-size: 32px; }
  .add-btn { font-size: 10.5px; padding: 5px 11px; right: 8px; }

  .faq-section { padding: 16px 16px 40px; }
  .faq-item { padding: 14px 16px; }
}

/* ===================== 360px — smallest phones ===================== */
@media (max-width: 360px) {
  .header-actions { gap: 10px; }
  .cart-btn span { display: none; } /* keep icon only if markup wraps label in a span */

  .hero-content h1 { font-size: 19px; }
  .hero-content p { font-size: 13px; }

  .product-grid { gap: 8px; }
  .product-info { padding: 12px 6px 8px; }
}
