/* =====================================================
   Grow Healthy IQ — Design System v2
   Modern, warm, Arabic RTL healthy food store
   ===================================================== */

/* ---- CSS Variables ---- */
:root {
  /* Primary palette — deep forest & sage greens */
  --green:        #2d6a4f;
  --green-dark:   #1b4332;
  --green-mid:    #40916c;
  --green-light:  #52b788;
  --green-pale:   #d8f3dc;
  --green-bg:     #f0faf4;

  /* Accent — warm amber */
  --amber:        #e76f51;
  --amber-mid:    #f4a261;
  --amber-pale:   #fff3e0;

  /* Neutral surfaces */
  --cream:        #faf9f6;
  --cream-2:      #f2f0eb;

  /* Text */
  --text:         #1a1a2e;
  --text-2:       #2d3748;
  --text-muted:   #6b7280;
  --text-light:   #a0aec0;

  /* Borders & surfaces */
  --border:       #e4e4dc;
  --border-2:     #b7e4c7;
  --surface:      #ffffff;
  --bg:           #faf9f6;

  /* Error */
  --rust:         #e53e3e;

  /* Legacy compat */
  --gold-mid:     #e76f51;
  --gold-pale:    #fff3e0;
  --olive-l:      #e76f51;

  /* Radius */
  --r-sm:         10px;
  --r:            14px;
  --r-lg:         20px;
  --r-xl:         28px;
  --r-full:       999px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 20px rgba(0,0,0,.07);
  --shadow-md:    0 8px 28px rgba(0,0,0,.10);
  --shadow-lg:    0 20px 60px rgba(0,0,0,.13);

  --nav-h:        64px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Cairo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ---- Navigation ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 1.2rem;
  gap: 1rem;
}

.nav-logo { flex-shrink: 0; }
.nav-logo a { display: flex; align-items: center; }
.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
  cursor: pointer;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs li { flex-shrink: 0; }

.nav-tabs a {
  display: block;
  padding: .48rem .82rem;
  font-size: .83rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--r-full);
  transition: color .2s, background .2s;
  white-space: nowrap;
  letter-spacing: .01em;
}

.nav-tabs a:hover {
  color: var(--green);
  background: var(--green-bg);
}

.nav-tabs a.active {
  color: var(--green-dark);
  background: var(--green-pale);
}

/* ---- Page Sections ---- */
.page { display: none; }
.page.active { display: block; }

/* ---- Delivery Bar ---- */
.dbar {
  background: linear-gradient(90deg, var(--green-bg) 0%, #e8f8f0 50%, var(--green-bg) 100%);
  border-bottom: 1px solid var(--border-2);
  color: var(--green-dark);
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  padding: .55rem 1rem;
  letter-spacing: .01em;
}
.dbar strong { color: var(--green); font-weight: 800; }

/* ---- Hero Sections ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  color: #fff;
}

/* Hero decorative overlay */
.hero-pat {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.05) 0%, transparent 50%);
}

/* Hero bottom wave */
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* Hero per-page gradients */
.hero-home    { background: linear-gradient(150deg,#0b2e1a 0%,#1b4332 50%,#2d6a4f 100%); }
.hero-about   { background: linear-gradient(150deg,#0a2e1e 0%,#1b4332 50%,#2d6a4f 100%); }
.hero-ferment { background: linear-gradient(150deg,#042f2e 0%,#0f4d48 50%,#147570 100%); }
.hero-butters { background: linear-gradient(150deg,#2c1010 0%,#5c2121 50%,#8b3a3a 100%); }
.hero-nuts    { background: linear-gradient(150deg,#2a1d00 0%,#5c3d00 50%,#8a5a00 100%); }
.hero-baked   { background: linear-gradient(150deg,#1a1007 0%,#3d2a12 50%,#6b4c20 100%); }
.hero-natural { background: linear-gradient(150deg,#0b2e1a 0%,#1b4332 50%,#2d6a4f 100%); }
.hero-order   { background: linear-gradient(150deg,#0f172a 0%,#1a2d58 50%,#1d4ed8 100%); }

.hero .site-logo {
  height: 88px;
  width: auto;
  display: block;
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.35));
}

.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: .65rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.hero h1 em {
  font-style: normal;
  color: #95d5b2;
}

.hero-sub {
  font-size: clamp(.88rem, 2vw, 1.05rem);
  color: rgba(255,255,255,.82);
  margin-bottom: 1.6rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
  font-weight: 400;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: .8rem;
}

.hbadge {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.95);
  font-size: .76rem;
  font-weight: 700;
  padding: .35rem .8rem;
  border-radius: var(--r-full);
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
  transition: background .2s;
}

.hbadge:hover {
  background: rgba(255,255,255,.22);
}

/* ---- About Banner (home page) ---- */
.about-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  margin: 1.6rem 1.2rem;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .25s, transform .25s;
  box-shadow: var(--shadow);
}

.about-banner:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ab-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.ab-left {
  flex: 1;
  padding: 1.6rem 1.8rem;
}

.ab-tag {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green);
  font-size: .72rem;
  font-weight: 800;
  padding: .22rem .65rem;
  border-radius: var(--r-full);
  margin-bottom: .65rem;
  border: 1px solid var(--border-2);
  letter-spacing: .03em;
}

.ab-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: .45rem;
  letter-spacing: -.01em;
}

.ab-sub {
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: .9rem;
  font-weight: 400;
}

.ab-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .9rem;
}

.ab-pills span {
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: .73rem;
  font-weight: 700;
  padding: .22rem .6rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
}

.ab-cta {
  font-size: .85rem;
  color: var(--green);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.ab-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .5rem;
  padding: 1.4rem 1.6rem 1.4rem 1rem;
  min-width: 100px;
  border-right: 1px solid var(--border);
  background: var(--green-bg);
}

.ab-stat { text-align: center; }

.ab-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
  letter-spacing: -.02em;
}

.ab-lbl {
  font-size: .68rem;
  color: var(--text-muted);
  display: block;
  margin-top: .2rem;
  font-weight: 500;
}

/* ---- Category Grid ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
  padding: 1.2rem 1.2rem 2rem;
}

.cat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  box-shadow: var(--shadow-sm);
}

.cat-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Category tile heads */
.ct-head {
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}

/* Per-page ct-head colors */
.ct-ferment { background: linear-gradient(135deg,#0f4d48,#1a7a73); }
.ct-butters { background: linear-gradient(135deg,#5c2121,#8b3a3a); }
.ct-nuts    { background: linear-gradient(135deg,#5c3d00,#8a5a00); }
.ct-baked   { background: linear-gradient(135deg,#3d2a12,#6b4c20); }
.ct-natural { background: linear-gradient(135deg,#1b4332,#2d6a4f); }
.ct-order   { background: linear-gradient(135deg,#1a2d58,#2c4db5); }

.ct-info { flex: 1; }

.ct-title {
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -.005em;
}

.ct-sub {
  font-size: .73rem;
  color: rgba(255,255,255,.70);
  margin-top: .18rem;
}

.ct-body {
  padding: 1rem 1.3rem 1.2rem;
}

.ct-desc {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: .8rem;
  font-weight: 400;
}

.ct-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .79rem;
  font-weight: 700;
}

.ct-count { color: var(--text-muted); }
.ct-arrow { color: var(--green); font-weight: 800; font-size: .85rem; }

/* ---- Section Page ---- */
.sec-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.4rem 1.2rem 2.5rem;
}

.sec-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .83rem;
  font-weight: 700;
  padding: .5rem 1rem;
  border-radius: var(--r-full);
  cursor: pointer;
  margin-bottom: 1.4rem;
  transition: background .2s, border-color .2s, color .2s;
  box-shadow: var(--shadow-sm);
}

.sec-back:hover {
  background: var(--green-bg);
  border-color: var(--border-2);
  color: var(--green);
}

.sec-hdr {
  text-align: center;
  margin-bottom: 1.8rem;
}

.sec-hdr h2 {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: .5rem;
  letter-spacing: -.01em;
}

.sec-hdr p {
  font-size: .88rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
}

.orn {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin: .6rem 0;
}

.orn span {
  width: 30px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  display: block;
}

.orn span:nth-child(2) {
  width: 12px;
  background: var(--amber-mid);
}

/* ---- Mini Card Grid ---- */
.prod-cards { margin-top: .5rem; }

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s;
}

.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.mini-card-hd {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  padding: .95rem 1.1rem;
}

/* Per-page mini-card-hd colors */
#page-ferment .mini-card-hd { background: linear-gradient(135deg,#0f4d48,#1a7a73); }
#page-butters .mini-card-hd { background: linear-gradient(135deg,#6b2d2d,#a04040); }
#page-nuts    .mini-card-hd { background: linear-gradient(135deg,#6b4400,#9e6400); }
#page-baked   .mini-card-hd { background: linear-gradient(135deg,#4a3318,#7a5a30); }
#page-natural .mini-card-hd { background: linear-gradient(135deg,#1b4332,#2d6a4f); }

.mini-card-head-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}

.mini-card-head-main { flex: 1; }

.mini-card-name {
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.mini-card-size {
  font-size: .7rem;
  color: rgba(255,255,255,.70);
  margin-top: .18rem;
}

.mini-card-head-price {
  font-size: .88rem;
  font-weight: 900;
  color: #fff;
  background: rgba(255,255,255,.20);
  padding: .22rem .5rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.mini-card-bd { padding: .8rem 1rem; }

.mini-card-actions {
  display: flex;
  gap: .45rem;
  flex-direction: column;
}

.mini-card-btn {
  width: 100%;
  padding: .44rem .5rem;
  border-radius: var(--r-sm);
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--cream-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.mini-card-btn:hover {
  background: var(--green-bg);
  border-color: var(--border-2);
  color: var(--green);
}

.mini-card-add {
  width: 100%;
  padding: .48rem .5rem;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 800;
  border: none;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: .01em;
}

.mini-card-add:hover { background: var(--green-dark); transform: scale(1.02); }
.mini-card-add:active { transform: scale(.97); }

/* ---- Product Detail Cards (pc) ---- */
.pc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.4rem;
}

.pc-head {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}

.pc-info { flex: 1; }

.pc-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
}

.pc-size {
  font-size: .75rem;
  color: rgba(255,255,255,.70);
  margin-top: .15rem;
}

.pc-price-tag {
  font-size: .95rem;
  font-weight: 900;
  color: #fff;
  background: rgba(255,255,255,.20);
  padding: .32rem .65rem;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.pc-body { padding: 1.2rem 1.4rem; }

/* ---- Benefits ---- */
.benefits {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 1.1rem;
}

.ben {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  background: var(--green-bg);
  border-radius: var(--r-sm);
  padding: .6rem .9rem;
  font-size: .84rem;
  color: var(--text-2);
  line-height: 1.55;
  border: 1px solid var(--border-2);
}

.ben-ico {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

/* ---- Nutrients ---- */
.nutrients { margin-top: .9rem; }

.nut-lbl {
  font-size: .75rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.nut-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
}

.nut-tag {
  font-size: .73rem;
  font-weight: 700;
  padding: .24rem .58rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
  color: var(--green-dark);
  background: var(--green-bg);
}

/* ---- About Page Cards ---- */
.about-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.about-card-hd {
  background: linear-gradient(135deg,#1b4332,#2d6a4f,#40916c);
  padding: 1.4rem 1.8rem;
  display: flex;
  align-items: center;
  gap: .9rem;
}

.about-card-title {
  font-family: 'Cairo', sans-serif;
  font-size: 1.35rem;
  color: #fff;
  font-weight: 800;
}

.about-card-sub {
  font-size: .77rem;
  color: rgba(255,255,255,.65);
  margin-top: .2rem;
}

.about-card-bd {
  padding: 1.6rem 1.8rem;
}

.about-card-bd p {
  font-size: .95rem;
  line-height: 2.1;
  color: var(--text-2);
  font-weight: 400;
}

.about-card-bd p + p { margin-top: .8rem; }

.about-highlight {
  background: var(--green-bg);
  border-radius: var(--r);
  padding: 1.1rem 1.3rem;
  margin-top: 1.1rem;
  border-right: 4px solid var(--green);
}

.about-highlight-lbl {
  font-size: .82rem;
  font-weight: 900;
  color: var(--green-dark);
  margin-bottom: .65rem;
  letter-spacing: .01em;
}

.about-highlight-item {
  font-size: .88rem;
  color: var(--text-2);
  line-height: 1.9;
}

.about-note {
  font-size: .9rem;
  line-height: 2;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1rem;
}

/* About mission/vision cards grid */
.about-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.about-mini-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ---- Order Form ---- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.2rem 1.2rem 2.5rem;
}

.order-wrap { display: flex; flex-direction: column; gap: 1.3rem; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

/* Instagram header */
.ig-hdr {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045);
  color: #fff;
  padding: 1.1rem 1.4rem;
  border-radius: var(--r-lg);
  margin-bottom: 1.5rem;
}

.ig-hdr svg { flex-shrink: 0; }
.ig-hdr > div { flex: 1; }

.ig-hdr strong {
  display: block;
  font-size: .94rem;
  font-weight: 900;
  margin-bottom: .18rem;
}

.ig-hdr span {
  font-size: .77rem;
  color: rgba(255,255,255,.82);
  display: block;
}

/* Form rows */
.frow { margin-bottom: 1.2rem; }

.frow label {
  display: block;
  font-size: .83rem;
  font-weight: 800;
  color: var(--text-2);
  margin-bottom: .45rem;
}

.req { color: var(--rust); }

.frow input,
.frow select {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--cream);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}

.frow input:focus,
.frow select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
  background: var(--surface);
}

.frow input::placeholder { color: var(--text-light); }
.city-sel { cursor: pointer; }

.errtxt {
  display: none;
  font-size: .76rem;
  color: var(--rust);
  margin-top: .35rem;
  padding: .3rem .55rem;
  background: #fff5f5;
  border-radius: var(--r-sm);
  border: 1px solid #fecaca;
}

.frow.error .errtxt { display: block; }
.frow.error input,
.frow.error select {
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(229,62,62,.10);
}

/* ---- Manual Products ---- */
.manual-products {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.2rem 1.3rem;
  margin-top: 1.1rem;
}

.manual-products-head {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  margin-bottom: 1.1rem;
}

.manual-products-head strong {
  font-size: .9rem;
  color: var(--text);
  font-weight: 800;
}

.manual-products-head span {
  font-size: .78rem;
  color: var(--text-muted);
}

/* Product rows */
.prod-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: .65rem;
  box-shadow: var(--shadow-sm);
}

.prod-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.1rem;
  cursor: pointer;
  gap: .5rem;
  transition: background .2s;
}

.prod-trigger:hover { background: var(--green-bg); }

.prod-dropdown {
  border-top: 1px solid var(--border);
  padding: .8rem 1.1rem;
}

.dd-label {
  font-size: .79rem;
  color: var(--text-muted);
  margin-bottom: .32rem;
  font-weight: 600;
}

.dd-select {
  width: 100%;
  padding: .52rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .86rem;
  font-family: inherit;
  background: var(--cream);
  color: var(--text);
  margin-bottom: .55rem;
  cursor: pointer;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.qty-label {
  font-size: .79rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 600;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.qty-btn:hover { background: var(--green-bg); border-color: var(--border-2); }

.qty-input {
  width: 54px;
  text-align: center;
  padding: .32rem .45rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .86rem;
  font-family: inherit;
}

.del-btn {
  background: none;
  border: 1px solid #fecaca;
  color: var(--rust);
  font-size: .77rem;
  padding: .3rem .65rem;
  border-radius: var(--r-sm);
  margin-right: auto;
  cursor: pointer;
  transition: background .2s;
  font-weight: 600;
}

.del-btn:hover { background: #fff5f5; }

.btn-add-manual {
  width: 100%;
  padding: .65rem;
  border: 1.5px dashed var(--border-2);
  background: var(--green-bg);
  color: var(--green);
  border-radius: var(--r-sm);
  font-size: .84rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  margin-top: .45rem;
}

.btn-add-manual:hover { background: var(--green-pale); border-color: var(--green); }

/* ---- Totals Box ---- */
.totals-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 1.3rem;
  box-shadow: var(--shadow-sm);
}

.totals-head {
  background: var(--green-pale);
  padding: .8rem 1.2rem;
  font-size: .87rem;
  font-weight: 800;
  color: var(--green-dark);
  border-bottom: 1px solid var(--border-2);
}

.totals-body { padding: .85rem 1.2rem; }

.tot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .86rem;
}

.tot-row:last-child { border-bottom: none; }
.tot-lbl { color: var(--text-muted); font-weight: 500; }
.tot-val { font-weight: 800; color: var(--text); }

.tot-row.grand .tot-lbl { font-size: .92rem; font-weight: 800; color: var(--text); }
.tot-row.grand .tot-val { font-size: 1.05rem; font-weight: 900; color: var(--green); }

/* ---- Preview Box ---- */
.preview-wrap { margin-top: 1.3rem; }

.preview-lbl {
  font-size: .8rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.preview-box {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
  font-size: .84rem;
  color: var(--text-2);
  line-height: 1.9;
  min-height: 80px;
  white-space: pre-wrap;
  direction: rtl;
  text-align: right;
}

/* ---- Action Buttons ---- */
.btns {
  display: flex;
  gap: .75rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.btn-copy {
  flex: 1;
  min-width: 130px;
  padding: .8rem 1.1rem;
  border: 2px solid var(--green);
  background: var(--surface);
  color: var(--green);
  border-radius: var(--r-full);
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, color .2s, transform .1s;
  text-align: center;
}

.btn-copy:hover { background: var(--green); color: #fff; transform: scale(1.02); }

.btn-ig {
  flex: 1;
  min-width: 130px;
  padding: .8rem 1.1rem;
  background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045);
  color: #fff;
  border-radius: var(--r-full);
  font-size: .9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  text-align: center;
  border: none;
  gap: .4rem;
}

.btn-ig:hover { opacity: .9; transform: scale(1.02); }

/* ---- IG Guide Overlay ---- */
.ig-guide-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.ig-guide-overlay.open,
.ig-guide-overlay.show { display: flex; }

.ig-guide-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  max-width: 420px;
  width: 100%;
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-lg);
}

.ig-guide-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: .45rem;
  text-align: center;
}

.ig-guide-sub {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.75;
  text-align: center;
  margin-bottom: 1.3rem;
}

.pro-guide-steps {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.3rem;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .84rem;
  color: var(--text-2);
  background: var(--cream);
  border-radius: var(--r-sm);
  padding: .6rem .8rem;
}

.guide-step-num {
  width: 24px;
  height: 24px;
  background: var(--green);
  color: #fff;
  border-radius: var(--r-full);
  font-size: .73rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-step-text { flex: 1; line-height: 1.65; font-weight: 500; }

.ig-guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}

.ig-guide-btn {
  padding: .68rem .55rem;
  border: none;
  border-radius: var(--r);
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  color: #fff;
}

.ig-guide-btn:hover { opacity: .88; transform: scale(1.02); }
.ig-guide-btn.ig { background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }
.ig-guide-btn.fb { background: #1877f2; }
.ig-guide-btn.tt { background: #010101; }
.ig-guide-btn.secondary {
  background: var(--cream-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  grid-column: 1 / -1;
}

/* ---- Order Cards (on product pages) ---- */
.order-cards-wrap {
  margin-top: 1.5rem;
  text-align: center;
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: .55rem;
}

.order-qty {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .84rem;
  font-weight: 800;
  color: var(--green);
}

/* ---- OAuth / Status ---- */
.oauth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.3rem;
  margin-top: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.btn-oauth {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.2rem;
  border-radius: var(--r-full);
  font-size: .85rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background .2s;
}

.btn-oauth:hover { background: var(--cream); }
.status-ok   { color: var(--green); font-weight: 800; font-size: .84rem; }
.status-warn { color: var(--amber); font-weight: 800; font-size: .84rem; }
.status-err  { color: var(--rust); font-weight: 800; font-size: .84rem; }

/* ---- Floating Dock ---- */
.floating-dock {
  position: fixed;
  bottom: 1.3rem;
  left: 1rem;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}

.quick-float {
  background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  padding: .65rem 1.2rem;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  display: none;
  transition: opacity .2s, transform .1s;
  white-space: nowrap;
}
.quick-float.show { display: block; }

.quick-float:hover { opacity: .9; transform: scale(1.05); }

.cart-fab {
  background: var(--green);
  color: #fff;
  border: none;
  padding: .6rem 1.1rem;
  border-radius: var(--r-full);
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: .45rem;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.cart-fab:hover { background: var(--green-dark); transform: scale(1.05); }
.cart-fab.hide { display: none; }

.cart-badge {
  background: #fff;
  color: var(--green);
  font-size: .7rem;
  font-weight: 900;
  min-width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .32rem;
}

/* ---- Modals ---- */
.modal-overlay,
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-overlay[aria-hidden="false"],
.modal-overlay.show,
.cart-overlay[aria-hidden="false"],
.cart-overlay.show { display: flex; }

.detail-modal,
.cart-modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  padding: 1.6rem;
}

.modal-close,
.cart-close {
  position: absolute;
  top: .9rem;
  left: .9rem;
  width: 32px;
  height: 32px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: .88rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.modal-close:hover, .cart-close:hover { background: var(--border); }

.cart-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
  text-align: center;
  margin-bottom: 1.1rem;
  padding-top: .3rem;
}

.detail-wrap { /* content injected by JS */ }
.detail-actions { margin-top: .6rem; }

.detail-add {
  width: 100%;
  padding: .8rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  font-size: .92rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.detail-add:hover { background: var(--green-dark); transform: scale(1.01); }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 1.8rem;
  right: 50%;
  transform: translateX(50%) translateY(80px);
  background: var(--green-dark);
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
  padding: .7rem 1.4rem;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  z-index: 2000;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

/* ---- Footer ---- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 1.8rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .83rem;
  line-height: 2;
  margin-top: 2.5rem;
}

footer strong { color: var(--text); font-weight: 800; font-size: .92rem; }

.footer-socials {
  display: flex;
  justify-content: center;
  gap: .85rem;
  margin: 1.1rem 0 .6rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  transition: transform .22s, opacity .22s;
  box-shadow: var(--shadow-sm);
}

.footer-social-link:hover { transform: scale(1.15); opacity: .88; }

.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer-social-link.ig { background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }
.footer-social-link.fb { background: #1877f2; }
.footer-social-link.tt { background: #010101; }

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page.active { animation: fadeIn .3s ease; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  nav { padding: 0 .7rem; gap: .5rem; }
  .nav-tabs a { padding: .4rem .6rem; font-size: .76rem; }
  .nav-logo img { height: 34px; }

  .hero { padding: 3rem 1rem 2.8rem; }
  .hero .site-logo { height: 72px; }
  .hero::after { height: 28px; }

  .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: .8rem;
    padding: .9rem .9rem 1.2rem;
  }

  .mini-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: .75rem;
  }

  .about-banner { margin: 1.1rem .7rem; }
  .ab-inner { flex-direction: column; }
  .ab-right {
    flex-direction: row;
    justify-content: center;
    padding: .9rem 1.2rem;
    border-top: 1px solid var(--border);
    border-right: none;
  }

  .sec-page { padding: 1rem .8rem 1.8rem; }
  .form-card { padding: 1.1rem; }

  .btns { flex-direction: column; }
  .btn-copy, .btn-ig { width: 100%; }

  .ig-guide-actions { grid-template-columns: 1fr; }
  .ig-guide-btn.secondary { grid-column: 1; }

  .about-cards-grid { grid-template-columns: 1fr; }
  .floating-dock { bottom: .9rem; left: .7rem; }
}

@media (max-width: 400px) {
  .mini-card-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.45rem; }
  .hbadge { font-size: .7rem; padding: .28rem .65rem; }
}

@media (min-width: 900px) {
  .order-wrap {
    display: grid;
    grid-template-columns: 1fr 370px;
    align-items: start;
  }

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

/* ============================================================
   Product Picker — Order Page
   ============================================================ */

.prod-picker-wrap {
  display: flex;
  gap: .6rem;
  margin-bottom: .9rem;
  align-items: stretch;
}

.prod-picker-select {
  flex: 1;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--cream);
  cursor: pointer;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  min-width: 0;
}

.prod-picker-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
  background: var(--surface);
}

.btn-pick-add {
  padding: .65rem 1.1rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
  flex-shrink: 0;
}

.btn-pick-add:hover { background: var(--green-dark); transform: scale(1.02); }
.btn-pick-add:active { transform: scale(.97); }

/* ---- Order items list ---- */
.order-items-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: .6rem;
}

.order-items-empty {
  text-align: center;
  color: var(--text-light);
  font-size: .84rem;
  padding: 1.2rem .5rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--r);
  background: var(--cream);
}

.order-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}

.order-item:hover { box-shadow: var(--shadow); }

.oi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem .5rem;
  gap: .5rem;
}

.oi-info {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 1;
  min-width: 0;
}

.oi-icon { font-size: 1.2rem; flex-shrink: 0; }

.oi-name {
  font-size: .88rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.oi-meta {
  font-size: .74rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

.oi-del {
  background: none;
  border: 1px solid #fecaca;
  color: var(--rust);
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  font-size: .75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}

.oi-del:hover { background: #fff5f5; }

.oi-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem 1rem .7rem;
  background: var(--green-bg);
  border-top: 1px solid var(--border-2);
}

.oi-qty-ctrl {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.oi-qty-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--green-dark);
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.oi-qty-btn:hover { background: var(--green-pale); }

.oi-qty {
  min-width: 28px;
  text-align: center;
  font-size: .9rem;
  font-weight: 800;
  color: var(--text);
}

.oi-subtotal {
  font-size: .88rem;
  font-weight: 900;
  color: var(--green-dark);
  background: var(--green-pale);
  padding: .22rem .65rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
}

/* ---- Cart modal items ---- */
.cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: .5rem;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-left { flex: 1; min-width: 0; }

.cart-item-name {
  font-size: .88rem;
  font-weight: 800;
  color: var(--text);
}

.cart-item-meta {
  font-size: .73rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.cart-item-right { text-align: left; flex-shrink: 0; }

.cart-item-total {
  font-size: .9rem;
  font-weight: 900;
  color: var(--green);
  margin-bottom: .35rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--cream);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.cart-qty-btn:hover { background: var(--green-bg); border-color: var(--border-2); }

.cart-qty-num {
  font-size: .82rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.cart-remove-btn {
  font-size: .72rem;
  color: var(--rust);
  background: none;
  border: 1px solid #fecaca;
  border-radius: var(--r-sm);
  padding: .18rem .4rem;
  cursor: pointer;
  transition: background .2s;
}

.cart-remove-btn:hover { background: #fff5f5; }

.cart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: .88rem;
}

.cart-items {
  max-height: 55vh;
  overflow-y: auto;
}

.cart-summary {
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  background: var(--cream);
}

.cart-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: .86rem;
  margin-bottom: .45rem;
  color: var(--text-2);
}

.cart-sum-row strong { color: var(--green); font-weight: 900; font-size: .9rem; }

.cart-sum-note {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .8rem;
}

.cart-actions {
  display: flex;
  gap: .6rem;
}

.cart-go-order {
  flex: 1;
  padding: .7rem .8rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s;
}

.cart-go-order:hover { background: var(--green-dark); }

.cart-clear {
  padding: .7rem .9rem;
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--r-full);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.cart-clear:hover { background: var(--cream-2); color: var(--rust); border-color: #fecaca; }

/* ---- Toast ---- */
.toast-msg {
  position: fixed;
  bottom: 5rem;
  right: 50%;
  transform: translateX(50%) translateY(20px);
  background: var(--green-dark);
  color: #fff;
  font-size: .84rem;
  font-weight: 700;
  padding: .6rem 1.3rem;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  z-index: 3000;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

/* ---- Toast (main) ---- */
.toast.on {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

/* ---- Shake animation ---- */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.shake-error,
.field-shake { animation: shake .35s ease; }

.btn-ig.error-state {
  background: linear-gradient(135deg,#c0392b,#e74c3c) !important;
}

/* err class for inputs */
input.err, select.err {
  border-color: var(--rust) !important;
  box-shadow: 0 0 0 3px rgba(229,62,62,.10) !important;
}

.errtxt.show { display: block; }

@media (max-width: 500px) {
  .prod-picker-wrap { flex-direction: column; }
  .btn-pick-add { width: 100%; justify-content: center; }
  .oi-bottom { flex-direction: column; gap: .5rem; align-items: flex-start; }
}
