/* ============================================================
   روشيتا - Rosheta Pharmacy & Medical Services
   Mobile-first, RTL-first design
   ============================================================ */

:root {
  --primary: #0e7a5f;
  --primary-dark: #0a5f4a;
  --primary-soft: #e5f4ef;
  --accent: #f0b429;
  --accent-soft: #fdf3d7;
  --danger: #d64545;
  --danger-soft: #fdeaea;
  --bg: #f4f7f6;
  --card: #ffffff;
  --text: #16302a;
  --text-soft: #5b6f6a;
  --muted: #8aa09a;
  --line: #e2ebe8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(14, 90, 74, 0.10);
  --shadow-lg: 0 18px 44px rgba(14, 90, 74, 0.16);
  --font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

[dir="ltr"] body { text-align: left; }

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.page-wrap { min-height: 60vh; padding-top: 24px; padding-bottom: 64px; }

.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s, box-shadow .2s, background .2s;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(14,122,95,.3); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #4a3500; box-shadow: 0 6px 16px rgba(240,180,41,.35); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-ghost { background: var(--primary-soft); color: var(--primary); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 17px; border-radius: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #12a07d);
  color: #fff;
  border-radius: 12px;
  font-size: 20px;
  box-shadow: var(--shadow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 19px; color: var(--primary-dark); }
.brand-text small { font-size: 11.5px; color: var(--muted); }

.main-nav { display: none; }
.main-nav a {
  font-weight: 600;
  color: var(--text-soft);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-btn {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: #fff;
  font-weight: 800;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 13px;
  letter-spacing: .5px;
}
.lang-btn:hover { background: var(--primary); color: #fff; }

.cart-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 12px;
}
.cart-btn:hover { background: var(--primary); color: #fff; }
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  display: grid; place-items: center;
  border: 2px solid #fff;
}

.menu-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.menu-toggle span { width: 24px; height: 2.5px; background: var(--text); border-radius: 2px; transition: .25s; }

/* Mobile nav panel */
.main-nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 66px; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px 18px;
  gap: 4px;
}
.main-nav.open a { padding: 12px; font-size: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(240,180,41,.35), transparent 55%),
    linear-gradient(135deg, #0a5f4a 0%, #0e7a5f 45%, #12a07d 100%);
  padding: 56px 24px 64px;
  margin-bottom: 40px;
}
.hero-inner { position: relative; z-index: 2; max-width: 640px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(26px, 5vw, 44px); font-weight: 900; line-height: 1.3; margin-bottom: 14px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: clamp(15px, 2.5vw, 18px); opacity: .92; max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 34px; }
.hero-stats .stat strong { font-size: 24px; display: block; }
.hero-stats .stat span { font-size: 13px; opacity: .85; }
.hero-art { position: absolute; inset-inline-end: -60px; top: 50%; transform: translateY(-50%); font-size: 240px; opacity: .12; user-select: none; }

/* ---------- Section titles ---------- */
.section-title { font-size: clamp(20px, 3.4vw, 28px); font-weight: 900; margin-bottom: 6px; }
.section-sub { color: var(--text-soft); margin-bottom: 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.see-all { font-weight: 700; font-size: 14px; color: var(--primary); white-space: nowrap; }

/* ---------- Service cards ---------- */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 44px; }
.service-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.service-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px;
  background: var(--primary-soft);
  margin-bottom: 4px;
}
.service-card h3 { font-size: 18px; font-weight: 800; }
.service-card p { color: var(--text-soft); font-size: 13.5px; flex: 1; }
.service-card .go-link { color: var(--primary); font-weight: 800; font-size: 13.5px; }

/* ---------- Features strip ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 44px; }
.feature {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
}
.feature .f-icon { font-size: 26px; }
.feature strong { font-size: 14.5px; display: block; }
.feature span { font-size: 12.5px; color: var(--muted); }

/* ---------- Generic cards / grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Products ---------- */
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-img {
  width: 100%; height: 170px; object-fit: cover;
  background: linear-gradient(160deg, #eef7f4, #ddeee8);
  padding: 14px;
}
.product-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 11.5px; color: var(--primary); font-weight: 700; background: var(--primary-soft); border-radius: 6px; padding: 2px 8px; align-self: flex-start; }
.product-name { font-weight: 800; font-size: 15.5px; }
.product-meta { font-size: 12px; color: var(--muted); }
.product-dose { font-size: 12.5px; color: var(--text-soft); background: var(--bg); border-radius: 6px; padding: 3px 8px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; gap: 8px; }
.product-price { font-weight: 900; color: var(--primary-dark); font-size: 17px; }
.product-price small { font-weight: 600; font-size: 12px; color: var(--muted); }
.price-off { color: var(--muted); text-decoration: line-through; font-size: 12.5px; font-weight: 600; }

/* ---------- Filters ---------- */
.controls { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 22px; }
.search-box { position: relative; }
.search-box svg { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--muted); }
.search-box input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 42px;
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.search-box input:focus { border-color: var(--primary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  transition: .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Cart table ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: start; font-size: 12.5px; color: var(--muted); padding: 10px; border-bottom: 2px solid var(--line); }
.cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item-name { font-weight: 700; }
.cart-item-meta { font-size: 12px; color: var(--muted); }
.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 9px; overflow: hidden; }
.qty-stepper button { width: 32px; height: 32px; border: none; background: #fff; font-size: 17px; font-weight: 800; color: var(--primary); }
.qty-stepper button:hover { background: var(--primary-soft); }
.qty-stepper span { min-width: 36px; text-align: center; font-weight: 800; }

.summary-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14.5px; color: var(--text-soft); }
.summary-row.total { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 14px; font-size: 19px; font-weight: 900; color: var(--text); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field .err { display: none; color: var(--danger); font-size: 12.5px; margin-top: 5px; font-weight: 600; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .err { display: block; }
.payment-options { display: grid; gap: 12px; grid-template-columns: 1fr; }
.pay-option {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  transition: .2s;
  background: #fff;
}
.pay-option:hover { border-color: var(--primary); }
.pay-option.active { border-color: var(--primary); background: var(--primary-soft); }
.pay-option .pay-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.pay-option.active .pay-radio { border-color: var(--primary); }
.pay-option.active .pay-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.pay-option strong { font-size: 14.5px; display: block; }
.pay-option small { font-size: 12px; color: var(--muted); }

/* ---------- Wizard ---------- */
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 26px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  white-space: nowrap;
}
.step .dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line);
  font-weight: 800;
}
.step.active { color: var(--primary); }
.step.active .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done { color: var(--primary); }
.step.done .dot { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.step-line { flex: 1; min-width: 16px; height: 2px; background: var(--line); }
.step-line.done { background: var(--primary); }

.wizard-panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.specialty-card { cursor: pointer; text-align: center; padding: 22px 12px; }
.specialty-card .s-icon { font-size: 34px; margin-bottom: 8px; }
.specialty-card h4 { font-size: 15px; font-weight: 800; }
.specialty-card p { font-size: 12px; color: var(--muted); }

.doctor-card { display: flex; gap: 14px; padding: 18px; cursor: pointer; }
.doctor-avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.doctor-avatar img { object-fit: cover; width: 58px; height: 58px; border-radius: 50%; }
.doctor-avatar { overflow: hidden; }
.doctor-info h4 { font-size: 16px; font-weight: 800; }
.doctor-info p { font-size: 13px; color: var(--text-soft); }
.rating { color: var(--accent); font-weight: 800; font-size: 13px; }
.fee-tag { background: var(--accent-soft); color: #7a5a00; font-weight: 800; border-radius: 7px; padding: 2px 10px; font-size: 12.5px; }
.fee-tag.alt { background: var(--primary-soft); color: var(--primary); }

.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.time-slot { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 8px; text-align: center; cursor: pointer; transition: .2s; font-weight: 700; }
.time-slot:hover { border-color: var(--primary); color: var(--primary); }
.time-slot.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.time-slot small { display: block; font-size: 11px; opacity: .8; font-weight: 600; }

.day-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.day-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 16px; cursor: pointer; font-weight: 700; font-size: 14px; transition: .2s; }
.day-chip:hover { border-color: var(--primary); }
.day-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.booking-summary { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 18px; display: grid; gap: 8px; margin-bottom: 18px; }
.booking-summary .bs-row { display: flex; justify-content: space-between; font-size: 14.5px; }
.booking-summary .bs-row strong { color: var(--primary-dark); }

/* ---------- Radiology ---------- */
.center-card { cursor: pointer; padding: 20px; border: 2px solid transparent; transition: .2s; }
.center-card:hover { border-color: var(--primary); }
.center-card.active { border-color: var(--primary); background: var(--primary-soft); }
.center-card .center-img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; display: block; }
.center-card h4 { font-size: 16px; font-weight: 800; }
.center-card p { font-size: 13px; color: var(--text-soft); }
.wait-tag { display: inline-flex; align-items: center; gap: 5px; background: var(--accent-soft); color: #7a5a00; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }

.test-group { margin-bottom: 18px; }
.test-group > h4 { margin-bottom: 8px; font-size: 15.5px; }
.test-item {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  background: #fff;
  transition: .2s;
}
.test-item:hover { border-color: var(--primary); }
.test-item.active { border-color: var(--primary); background: var(--primary-soft); }
.test-item .t-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; flex-shrink: 0; font-size: 13px; font-weight: 900; }
.test-item.active .t-check { background: var(--primary); border-color: var(--primary); }
.test-item .t-info { flex: 1; }
.test-item .t-info strong { font-size: 14.5px; display: block; }
.test-item .t-info small { font-size: 12px; color: var(--muted); }
.test-item .t-price { font-weight: 900; color: var(--primary-dark); }

.option-switch { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow); margin: 14px 0; }
.switch { position: relative; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; border-radius: 26px;
  background: var(--line); cursor: pointer; transition: .25s;
}
.slider::before {
  content: ""; position: absolute; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; top: 3px; inset-inline-start: 3px;
  transition: .25s; box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(-20px); }
[dir="rtl"] .switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- Consultation ---------- */
.consult-item { padding: 18px; margin-bottom: 12px; }
.consult-q { display: flex; gap: 12px; }
.consult-q .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; flex-shrink: 0; }
.consult-q strong { font-size: 14.5px; }
.consult-q p { font-size: 13.5px; color: var(--text-soft); margin-top: 2px; }
.consult-reply { margin-top: 12px; margin-inline-start: 52px; background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }
.consult-reply strong { color: #7a5a00; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th { text-align: start; font-size: 12.5px; color: var(--muted); padding: 12px 10px; border-bottom: 2px solid var(--line); background: #fff; }
.data-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.status-badge { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.st-pending { background: var(--accent-soft); color: #7a5a00; }
.st-confirmed { background: #e8f0fe; color: #1a56db; }
.st-preparing { background: #eef2ff; color: #4338ca; }
.st-delivery { background: #fde8e8; color: #c81e1e; }
.st-delivered { background: var(--primary-soft); color: var(--primary); }
.st-completed { background: var(--primary-soft); color: var(--primary); }
.st-cancelled { background: #eee; color: var(--muted); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .e-icon { font-size: 54px; margin-bottom: 12px; }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- Success screen ---------- */
.success-hero { text-align: center; padding: 50px 20px; }
.success-icon { width: 90px; height: 90px; margin: 0 auto 18px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; font-size: 44px; animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.order-number { display: inline-block; background: var(--accent-soft); color: #7a5a00; font-weight: 900; padding: 8px 22px; border-radius: 999px; font-size: 18px; margin: 14px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 80px);
  background: var(--text);
  color: #fff;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  z-index: 200;
  opacity: 0;
  transition: transform .3s, opacity .3s;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.success { background: var(--primary); }
.toast.error { background: var(--danger); }

/* ---------- Cart drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(10, 30, 25, .5); z-index: 80; opacity: 0; visibility: hidden; transition: .3s; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed;
  top: 0; bottom: 0; inset-inline-end: 0;
  width: min(420px, 100vw);
  background: #fff;
  z-index: 90;
  transform: translateX(100%);
  transition: transform .3s;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,.15);
}
[dir="rtl"] .cart-drawer { transform: translateX(-100%); box-shadow: 10px 0 40px rgba(0,0,0,.15); }
.cart-drawer.open { transform: translateX(0) !important; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-close { background: var(--bg); border: none; width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.drawer-item { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px; }
.drawer-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; background: #fff; }
.drawer-item .d-info { flex: 1; min-width: 0; }
.drawer-item .d-info strong { font-size: 13.5px; display: block; }
.drawer-item .d-info span { font-size: 12px; color: var(--muted); }
.drawer-item .d-price { font-weight: 800; color: var(--primary-dark); font-size: 14px; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,30,25,.55); z-index: 110; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 120; background: #fff; border-radius: 20px; width: min(480px, calc(100vw - 32px)); max-height: 85vh; overflow-y: auto; padding: 26px; box-shadow: var(--shadow-lg); }

/* ---------- Footer ---------- */
.site-footer { background: #0c2420; color: #cfe3dd; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; padding: 44px 16px 30px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { color: #fff; font-size: 20px; }
.footer-about { font-size: 13.5px; opacity: .85; margin-bottom: 16px; max-width: 340px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col ul a { color: #cfe3dd; font-size: 13.5px; }
.footer-col ul a:hover { color: var(--accent); }
.footer-contact li, .footer-branches li { font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; color: #fff; font-weight: 800; }
.footer-socials a:hover { background: var(--accent); color: #4a3500; border-color: var(--accent); }
.footer-payments { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pay-chip { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 5px 12px; font-size: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 13px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: rgba(255,255,255,.6); }

/* ---------- Misc ---------- */
.back-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.back-btn { background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 16px; font-weight: 700; font-size: 13.5px; color: var(--text); }
.back-btn:hover { border-color: var(--primary); color: var(--primary); }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--primary); font-weight: 700; }

.flow-layout { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .flow-layout.two-col { grid-template-columns: 1.6fr 1fr; align-items: start; }
}

/* ---------- Animations ---------- */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(-50%) rotate(-3deg); }
  50% { transform: translateY(-58%) rotate(3deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shine {
  0% { transform: translateX(-130%) skewX(-20deg); }
  100% { transform: translateX(230%) skewX(-20deg); }
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(214, 69, 69, .45); }
  100% { box-shadow: 0 0 0 11px rgba(214, 69, 69, 0); }
}
@keyframes popIn {
  0% { transform: scale(.85); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Animated gradient — hero */
.hero {
  background-size: 160% 160%;
  animation: gradientShift 14s ease infinite;
}
.hero-art { animation: floaty 6s ease-in-out infinite; }

/* Animated gradient — logo */
.brand-logo {
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite, glowLogo 3s ease-in-out infinite;
}
@keyframes glowLogo {
  0%, 100% { box-shadow: 0 4px 14px rgba(14, 122, 95, .35); }
  50% { box-shadow: 0 4px 22px rgba(18, 160, 125, .6); }
}

/* Animated accent text in hero */
.hero h1 span {
  background: linear-gradient(90deg, #f0b429, #ffd97a, #f0b429, #ffd97a);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientShift 5s linear infinite;
}

/* Entrance animations (staggered) */
.grid .card, .services-grid .service-card, .features .feature, .grid .test-item {
  animation: fadeUp .5s ease both;
}
.services-grid .service-card:nth-child(1) { animation-delay: .05s; }
.services-grid .service-card:nth-child(2) { animation-delay: .12s; }
.services-grid .service-card:nth-child(3) { animation-delay: .19s; }
.services-grid .service-card:nth-child(4) { animation-delay: .26s; }
.grid > .card:nth-child(2) { animation-delay: .06s; }
.grid > .card:nth-child(3) { animation-delay: .12s; }
.grid > .card:nth-child(4) { animation-delay: .18s; }
.grid > .card:nth-child(5) { animation-delay: .24s; }
.grid > .card:nth-child(6) { animation-delay: .3s; }
.grid > .card:nth-child(n+7) { animation-delay: .34s; }

/* Hover: lift + image zoom */
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card { transition: transform .25s, box-shadow .25s; }
.product-img { transition: transform .45s ease; }
.product-card:hover .product-img { transform: scale(1.07); }
.center-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.center-card { transition: transform .25s, box-shadow .25s; }
.center-img { transition: transform .45s ease; }
.center-card:hover .center-img { transform: scale(1.06); }

/* Button shine sweep */
.btn-primary, .btn-accent, .btn-danger-soft {
  position: relative;
  overflow: hidden;
}
.btn-primary::after, .btn-accent::after, .btn-danger-soft::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-130%) skewX(-20deg);
}
.btn-primary:hover::after, .btn-accent:hover::after, .btn-danger-soft:hover::after {
  animation: shine .8s ease;
}

/* Cart badge attention pulse */
.cart-badge { animation: pulseRing 2.4s infinite; }

/* Success icon already pops; re-add for all success heroes */
.success-icon { animation: popIn .5s ease; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(4, 1fr); }
  .controls { grid-template-columns: 1fr auto; align-items: center; }
  .payment-options { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .main-nav { display: flex; align-items: center; gap: 4px; }
  .menu-toggle { display: none; }
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Admin ---------- */
.admin-link {
  position: fixed; bottom: 14px; left: 14px; z-index: 999;
  background: #fff; border: 1px solid #ddd; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  padding: 8px 14px; font-size: 12.5px; font-weight: 800;
  color: #666; text-decoration: none; transition: .2s;
}
.admin-link:hover { color: #0a7c5b; border-color: #0a7c5b; transform: translateY(-2px); }
.admin-wrap { max-width: 480px; margin: 40px auto; }
.admin-login { padding: 28px; }
.admin-login .btn-block { width: 100%; margin-top: 8px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-tabs .chip { border: 1.5px solid #ddd; background: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer; transition: .2s; }
.admin-tabs .chip:hover { border-color: #0a7c5b; color: #0a7c5b; }
.admin-tabs .chip.active { background: #0a7c5b; color: #fff; border-color: #0a7c5b; }
.admin-panel { padding: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-card { background: #f7faf8; border: 1px solid #eee; border-radius: 12px; padding: 14px; text-align: center; }
.stat-card .s-icon { font-size: 24px; margin-bottom: 4px; }
.stat-card strong { display: block; font-size: 13px; color: #666; }
.stat-card span { font-weight: 900; color: #0a7c5b; font-size: 17px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: right; padding: 10px; background: #eaf6f0; color: #0a7c5b; font-size: 12.5px; border-bottom: 2px solid #eee; white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid #eee; vertical-align: middle; }
.admin-table tr:hover td { background: #fafcfb; }
.row-actions { white-space: nowrap; text-align: left; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-ghost { background: #f7faf8; color: #444; border: 1px solid #ddd; }
.btn-ghost:hover { border-color: #0a7c5b; color: #0a7c5b; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.st-pending { background: #fff6d9; color: #7a5a00; }
.st-confirmed, .st-completed, .st-delivered { background: #eaf6f0; color: #0a7c5b; }
.st-preparing { background: #e8f0fe; color: #1a5fb4; }
.st-delivery { background: #fdeaea; color: #a11; }
.st-cancelled { background: #f2f2f2; color: #666; }
.consult-item { padding: 16px; margin-bottom: 12px; }
.consult-q { display: flex; gap: 12px; align-items: flex-start; }
.consult-q .avatar { width: 40px; height: 40px; border-radius: 50%; background: #eaf6f0; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.consult-q strong { font-size: 14.5px; }
.consult-q p { font-size: 13.5px; color: #666; margin-top: 2px; }
.consult-reply { background: #fff6d9; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 10px; }
.admin-form { background: #f7faf8; border: 1.5px dashed #ccc; border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.admin-form h3 { font-size: 15px; margin-bottom: 10px; color: #0a7c5b; }
.admin-form .field { margin-bottom: 10px; }
.admin-settings .setting-block { background: #f7faf8; border: 1px solid #eee; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.admin-settings .setting-block h3 { font-size: 14.5px; margin-bottom: 8px; }
.admin-settings .setting-block .btn { margin-top: 6px; }
