/* ==========================================================================
   Project X — Unified Pharmacy Engine Stylesheet
   Modern, Fast, Responsive (Mobile-First), Accessible (RTL)
   ========================================================================== */

:root {
  --primary: #0E7C66;
  --primary-dark: #095445;
  --primary-light: #E6F4F1;
  --accent: #F2B134;
  --accent-hover: #D9981E;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --status-available: #10B981;
  --status-available-bg: #ECFDF5;
  --status-onorder: #F59E0B;
  --status-onorder-bg: #FFFBEB;
  --status-unavailable: #EF4444;
  --status-unavailable-bg: #FEF2F2;
  --font-family: 'Rubik', 'Segoe UI', Tahoma, Arial, sans-serif;
  --container-max: 1200px;
}

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text-main);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

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

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

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Top Bar / Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.brand-logo-icon {
  width: 46px;
  height: 46px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.brand-info h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.brand-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text-muted);
}

.badge-pill.status-open {
  background: #ECFDF5;
  color: #059669;
}

.badge-pill.rating {
  background: #FEF3C7;
  color: #B45309;
}

.btn-header-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25D366;
  color: #FFFFFF;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 44px;
  box-shadow: 0 2px 6px rgba(37,211,102,0.3);
  transition: transform 0.2s, background 0.2s;
}

.btn-header-wa:hover {
  background: #20BD5A;
  transform: translateY(-1px);
}

/* Strict Official Price Notice */
.rx-official-price-notice {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.rx-official-price-notice .notice-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ==========================================================================
   LAYOUT A — «البحث أولًا» (Search First — Ghanem / Nile Center)
   ========================================================================== */
.layout-a-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #FFFFFF;
  padding: 3.5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.layout-a-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.layout-a-hero h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.layout-a-hero p {
  font-size: 1.0625rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-box-giant {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.search-box-giant input {
  width: 100%;
  padding: 1.125rem 3.5rem 1.125rem 1.5rem;
  border-radius: var(--radius-full);
  border: none;
  font-size: 1.125rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  min-height: 56px;
}

.search-box-giant input:focus {
  box-shadow: 0 0 0 4px rgba(242,177,52,0.4), 0 10px 25px -5px rgba(0,0,0,0.25);
}

.search-box-giant .search-icon {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.375rem;
  pointer-events: none;
}

.search-box-giant .btn-clear-search {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--border-light);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: none;
}

/* ==========================================================================
   LAYOUT B — «العيلة والعروض» (Family & Offers — Family / Dr. Tag)
   ========================================================================== */
.layout-b-hero {
  background: linear-gradient(180deg, var(--bg) 0%, #FFFFFF 100%);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.family-welcome-banner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .family-welcome-banner {
    flex-direction: row;
    text-align: right;
    justify-content: space-between;
  }
}

.family-welcome-text h2 {
  font-size: 2.125rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.family-welcome-text p {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.offers-carousel-wrapper {
  margin-top: 1rem;
}

.offers-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.offers-section-title h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.offers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .offers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .offers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.offer-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.offer-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #F1F5F9;
}

.offer-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.offer-card-body h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.offer-card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.btn-offer-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #1F2937;
  font-weight: 700;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  min-height: 44px;
}

/* ==========================================================================
   LAYOUT C — «الطوارئ الليلي» (Night Emergency — Emergency)
   ========================================================================== */
.theme-emergency {
  --bg: #111827;
  --surface: #1F2937;
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --border: #374151;
  --border-light: #2D3748;
}

.layout-c-hero {
  background: radial-gradient(circle at 50% 20%, #2D1515 0%, #111827 75%);
  color: #FFFFFF;
  padding: 3rem 0;
  text-align: center;
  border-bottom: 2px solid #EF4444;
}

.emergency-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239,68,68,0.2);
  border: 1px solid #EF4444;
  color: #FCA5A5;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.layout-c-hero h2 {
  font-size: 2.25rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

.layout-c-hero p {
  font-size: 1.125rem;
  color: #D1D5DB;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.emergency-actions-giant {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .emergency-actions-giant {
    flex-direction: row;
  }
}

.btn-emergency-giant {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.125rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 1.125rem;
  font-weight: 800;
  min-height: 56px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}

.btn-emergency-giant:hover {
  transform: translateY(-2px);
}

.btn-emergency-call {
  background: #DC2626;
  color: #FFFFFF;
}

.btn-emergency-wa {
  background: #25D366;
  color: #FFFFFF;
}

/* ==========================================================================
   LAYOUT D — «الكتيّب» (Catalog / Booklet — Fayez)
   ========================================================================== */
.layout-d-hero {
  background: #F3E8FF;
  border-bottom: 2px solid #7A4FA3;
  padding: 2rem 0;
}

.booklet-banner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .booklet-banner {
    flex-direction: row;
    text-align: right;
    justify-content: space-between;
  }
}

.booklet-tag {
  background: #7A4FA3;
  color: #FFFFFF;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.weekly-coupon-box {
  background: #FFFFFF;
  border: 2px dashed #7A4FA3;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 260px;
}

.coupon-code {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #7A4FA3;
  letter-spacing: 2px;
  background: #FAF5FF;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin: 0.25rem 0;
}

/* ==========================================================================
   FEATURE MODULES (تركب حسب الميزة)
   ========================================================================== */
.feature-section {
  padding: 2.5rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* shortage_hunter (غانم) */
.shortage-hunter-card {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 1px solid #86EFAC;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .shortage-hunter-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.shortage-content h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #14532D;
  margin-bottom: 0.5rem;
}

.shortage-content p {
  color: #166534;
  font-size: 1rem;
}

.shortage-input-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 480px;
}

.shortage-input-group input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid #86EFAC;
  outline: none;
  min-height: 48px;
}

.shortage-input-group button {
  background: #15803D;
  color: #FFFFFF;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

/* monthly_refill (فاميلي) */
.monthly-refill-card {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border: 1px solid #FDBA74;
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.monthly-refill-header {
  margin-bottom: 1.25rem;
}

.monthly-refill-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #9A3412;
  margin-bottom: 0.5rem;
}

.monthly-refill-header p {
  color: #C2410C;
}

.monthly-refill-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .monthly-refill-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.refill-pill {
  background: rgba(255,255,255,0.7);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: #7C2D12;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
}

/* delivery_zones (Nile Center) */
.delivery-zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.delivery-zone-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary);
}

.delivery-zone-box .zone-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
}

.delivery-zone-box .zone-time {
  font-size: 0.9375rem;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.night-emergency-ticker {
  background: #1E293B;
  color: #F8FAFC;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.ticker-pulse {
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse-glow 1.5s infinite;
  flex-shrink: 0;
}

/* ask_pharmacist (د. تاج) */
.ask-pharmacist-card {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #93C5FD;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .ask-pharmacist-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.ask-pharmacist-text h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1E40AF;
  margin-bottom: 0.5rem;
}

.ask-pharmacist-text p {
  color: #1E3A8A;
}

/* ==========================================================================
   MAIN ITEMS & CATALOG SECTION
   ========================================================================== */
.catalog-section {
  padding: 2.5rem 0 4rem;
}

.catalog-header {
  margin-bottom: 1.75rem;
}

.catalog-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.catalog-title-row h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.items-count-badge {
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Filter Controls */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-inline-wrapper {
  position: relative;
  width: 100%;
}

.search-inline-wrapper input {
  width: 100%;
  padding: 0.875rem 2.75rem 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  min-height: 48px;
}

.search-inline-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-inline-wrapper .search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.category-pills-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.category-pill {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  min-height: 38px;
}

.category-pill:hover,
.category-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 540px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .items-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1120px) {
  .items-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Density Modifier for Layout D */
.layout-dense .items-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}

@media (min-width: 768px) {
  .layout-dense .items-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .layout-dense .items-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Item Card */
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.item-card-media {
  position: relative;
  width: 100%;
  height: 190px;
  background: #F8FAFC;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform 0.3s;
}

.item-card:hover .item-card-img {
  transform: scale(1.04);
}

.item-placeholder-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  width: 100%;
  height: 100%;
}

.item-placeholder-fallback svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
}

.item-card-content {
  padding: 1rem 1.125rem 1.125rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.item-category-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.item-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.375rem;
}

.item-form {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Status Badges */
.status-badge-container {
  margin-bottom: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.item-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  width: fit-content;
}

.status-available {
  background: var(--status-available-bg);
  color: var(--status-available);
  border: 1px solid #A7F3D0;
}

.status-on_order {
  background: var(--status-onorder-bg);
  color: #B45309;
  border: 1px solid #FDE68A;
}

.status-unavailable {
  background: var(--status-unavailable-bg);
  color: var(--status-unavailable);
  border: 1px solid #FECACA;
}

.item-alternative-tag {
  background: #F1F5F9;
  border: 1px dashed #CBD5E1;
  color: #475569;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.item-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.btn-item-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  min-height: 44px;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-item-wa:hover {
  background: #20BD5A;
  transform: translateY(-1px);
}

.btn-item-wa.btn-onorder {
  background: #D97706;
}

.btn-item-wa.btn-onorder:hover {
  background: #B45309;
}

.btn-item-wa.btn-alternative {
  background: #4B5563;
}

.btn-item-wa.btn-alternative:hover {
  background: #374151;
}

/* Empty Search State */
.empty-search-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  grid-column: 1 / -1;
}

.empty-search-state h3 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.empty-search-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   SERVICES & BRANCHES SECTIONS
   ========================================================================== */
.section-services {
  padding: 3rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title-center {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title-center h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.section-title-center p {
  color: var(--text-muted);
  font-size: 1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s;
}

.service-card:hover {
  transform: translateY(-2px);
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
}

.service-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Branches Section */
.section-branches {
  padding: 3rem 0;
}

.branches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .branches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.branch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.branch-card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.branch-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.branch-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.branch-meta-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  stroke: var(--text-muted);
}

.branch-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.btn-branch-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 44px;
}

.btn-branch-maps {
  background: var(--border-light);
  color: var(--text-main);
}

.btn-branch-call {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   FOOTER & FLOATING ACTION BUTTONS
   ========================================================================== */
.site-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 2.5rem 0 5rem;
  margin-top: auto;
  font-size: 0.875rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
    text-align: right;
  }
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: #FFFFFF;
}

/* Floating WhatsApp / Emergency Button */
.floating-action-container {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.btn-floating-wa {
  width: 58px;
  height: 58px;
  background: #25D366;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37,211,102,0.4);
  font-size: 1.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-floating-wa:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}

.btn-floating-emergency {
  width: 58px;
  height: 58px;
  background: #DC2626;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(220,38,38,0.5);
  font-size: 1.5rem;
  animation: pulse-glow 2s infinite;
}
