/* ═══════════════════════════════════════════════
   FRUIT FLOW KFT — Mobile-First CSS
   ═══════════════════════════════════════════════ */

:root {
  --bg:           #f0f4f2;
  --card:         #ffffff;
  --primary:      #0f766e;
  --primary-dark: #0b5e58;
  --primary-light:#e6f4f1;
  --text:         #1a2520;
  --muted:        #6b7c77;
  --border:       #dde5e2;
  --radius:       14px;
  --radius-sm:    10px;
  --header-h:     58px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  /* Push content below sticky header */
  padding-top: var(--header-h);
}

/* ── HEADER ────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 200;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  /* cursor: pointer; */
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.link {
  font-size: 13px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}


/* ── SCROLL BUTTONS ────────────────────────────── */
.scroll-nav {
  position: fixed;
  right: 14px;
  bottom: 90px;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scroll-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* cursor: pointer; */
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.scroll-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.scroll-btn:active {
  background: var(--primary);
  color: #fff;
  transform: scale(0.92);
}

/* RTL scroll btn */
html[dir="rtl"] .scroll-nav { right: auto; left: 14px; }

/* ── MAIN LAYOUT ───────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 12px 100px;
}

/* ── PRODUCT GRID ──────────────────────────────── */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* ── CARD ──────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card--selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}

/* ── CARD IMAGE ────────────────────────────────── */
.img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8f0ed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-placeholder {
  font-size: 32px;
}

/* ── CARD BODY ─────────────────────────────────── */
.card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.3;
}

.desc {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.min {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── CONTROLS ──────────────────────────────────── */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-size: 20px;
  line-height: 1;
  /* cursor: pointer; */
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, background 0.15s;
  flex-shrink: 0;
}

.btn:active { transform: scale(0.91); }

.minus {
  background: #eef2f0;
  color: var(--text);
}

.minus:active { background: #dde5e2; }

.plus {
  background: var(--primary);
  color: #fff;
}

.plus:active { background: var(--primary-dark); }

.qty-display {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}

/* ── SUMMARY SECTION ───────────────────────────── */
.summary {
  margin-top: 14px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 16px;
  border: 1.5px solid var(--border);
}

.summary h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

#summaryList {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
  color: var(--muted);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

.summary-row:last-child { border-bottom: none; }

.summary-qty {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  margin-left: 10px;
}

.summary-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

/* ── PAYMENT SECTION ───────────────────────────── */
#paymentMessage {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.radio-group label {
  /* display: flex; */
  /* align-items: center; */
  gap: 10px;
  padding: 15px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  /* cursor: pointer; */
  /* transition: border-color 0.15s, background 0.15s; */
  /* -webkit-tap-highlight-color: transparent; */
}

/* .radio-group label:active, .radio-group label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
} */

.radio-group label.checked {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  /* font-weight: 700; */
}

.radio-icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* Custom radio button appearance */
.radio-group input[type="radio"] {
  /* -webkit-appearance: none; */
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  /* cursor: pointer; */
  position: relative;
  /* transition: border-color 0.15s, background 0.15s; */
  /* flex-shrink: 0; */
  margin-left: auto;
}

.radio-group input[type="radio"]::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.radio-group input[type="radio"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.radio-group input[type="radio"]:checked::after {
  transform: translate(-50%, -50%) scale(1);
}

/* RTL radio */
html[dir="rtl"] .radio-group input[type="radio"] {
  margin-left: 0;
  margin-right: auto;
}


/* ── WHATSAPP BUTTON ───────────────────────────── */
#whatsappBtn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  /* cursor: pointer; */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* transition: background 0.15s, transform 0.1s; */
}

#whatsappBtn:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

#whatsappBtn:disabled {
  background: #c8d8d5;
  cursor: not-allowed;
  color: #fff;
}

footer , footer .a {
  /* display: block; */
  direction: ltr;
  text-align: center;
  padding: 20px 10px;
  font-size: 13px;
  color: var(--muted);
}
a {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}


/* ── ERROR ─────────────────────────────────────── */
.error-msg {
  padding: 20px;
  text-align: center;
  color: #c0392b;
  font-size: 14px;
}

/* ── RTL SUPPORT ───────────────────────────────── */
/* html[dir="rtl"] .header          { flex-direction: row-reverse; }
html[dir="rtl"] .header-actions  { flex-direction: row-reverse; }
html[dir="rtl"] .card-body       { text-align: right; }
html[dir="rtl"] .summary         { text-align: right; }
html[dir="rtl"] .summary-row     { flex-direction: row-reverse; }
html[dir="rtl"] .radio-group label { flex-direction: row-reverse; }
html[dir="rtl"] .tt-total        { text-align: left; } */

/* ── TABLET (768px+) ───────────────────────────── */
@media (min-width: 768px) {
  .container {
    padding: 20px 20px 80px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
  }

  /* Products span left column */
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Summary sticks to right column */
  .summary {
    /* position: sticky; */
    top: calc(var(--header-h) + 14px);
    margin-top: 0;
    /* max-height: calc(100vh - var(--header-h) - 28px); */
    /* height: 50; */
    overflow-y: auto;
  }

  .scroll-nav { right: 20px; }
}

/* ── DESKTOP (1024px+) ─────────────────────────── */
@media (min-width: 1024px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-body h3 { font-size: 14px; }
  .price        { font-size: 15px; }
}







    /* ── PRODUCT SECTIONS ──────────────────────────── */
    .product-section {
      margin-bottom: 24px;
    }

    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 4px 10px;
      margin-bottom: 12px;
      border-bottom: 2px solid var(--primary);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }

    .section-header:active {
      opacity: 0.8;
    }

    .section-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--primary-dark);
      letter-spacing: -0.3px;
    }

    .section-toggle {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1.5px solid var(--border);
      background: var(--card);
      color: var(--primary);
      font-size: 11px;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.15s, border-color 0.15s;
      flex-shrink: 0;
    }

    .section-toggle:active {
      background: var(--primary-light);
      border-color: var(--primary);
    }

    .toggle-icon {
      display: inline-block;
      transition: transform 0.25s ease;
    }

    /* ── Section grid show/hide animation ──────────── */
    .section-grid {
      overflow: hidden;
      max-height: 9999px;
      opacity: 1;
      transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.3s ease;
    }

    .section-grid--hidden {
      max-height: 0;
      opacity: 0;
      margin-top: 0 !important;
      pointer-events: none;
    }

    /* ── TABLET adjustments ────────────────────────── */
    @media (min-width: 768px) {
      .product-section {
        margin-bottom: 28px;
      }

      .section-title {
        font-size: 20px;
      }
    }