/* ════════════════════════════════════════════════════════
   City Stores — Main Stylesheet
   Bootstrap 5 + CSS Custom Properties + Tajawal Font
═══════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font, 'Tajawal', sans-serif);
  background-color: var(--bg, #FFFAE7);
  color: var(--text, #1a1a1a);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font, 'Tajawal', sans-serif);
  font-weight: 700;
}

/* ── Navbar ───────────────────────────────────────────── */
.cs-navbar {
  background: var(--navbar-bg, var(--accent, #D2001A));
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  padding: 0.6rem 0;
  transition: background 0.3s ease;
}

.cs-logo {
  object-fit: contain;
  transition: transform 0.2s ease;
}
.cs-logo:hover { transform: scale(1.05); }

.cs-brand-name {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cs-navbar .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.cs-navbar .nav-link:hover {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

.theme-toggle-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.28); color: #fff; }

/* ── Hero Carousel ────────────────────────────────────── */
.cs-carousel-img {
  max-height: 520px;
  object-fit: cover;
  filter: brightness(0.88);
}
.cs-carousel-caption {
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 100%);
  border-radius: 12px;
  padding: 2rem;
  bottom: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.cs-hero-fallback {
  background: linear-gradient(135deg, var(--accent, #D2001A) 0%, var(--highlight, #FFDE00) 100%);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-hero-overlay {
  text-align: center;
  padding: 3rem 2rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Sections ─────────────────────────────────────────── */
.cs-section {
  padding: 80px 0;
}
.cs-section-alt {
  background: var(--surface, #EFEFEF);
}

.cs-section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text, #1a1a1a);
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}
.cs-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent, #D2001A);
  border-radius: 2px;
}
.cs-section-title.text-start::after {
  left: 0;
  transform: none;
}

.cs-section-subtitle {
  text-align: center;
  color: var(--text-muted, #555);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 1rem;
}

/* ── Branch Cards ─────────────────────────────────────── */
.cs-branch-card {
  background: var(--surface, #EFEFEF);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 18px var(--card-shadow, rgba(0,0,0,0.08));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cs-branch-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px var(--card-shadow, rgba(0,0,0,0.14));
}
.cs-branch-icon {
  font-size: 2.8rem;
  color: var(--accent, #D2001A);
  margin-bottom: 1rem;
}
.cs-branch-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  margin-bottom: 0.5rem;
}
.cs-badge-noflyer {
  background: var(--surface, #ddd);
  color: var(--text-muted, #666);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
}

/* ── Deal Cards ───────────────────────────────────────── */
.cs-deal-card {
  background: var(--bg, #FFFAE7);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 12px var(--card-shadow, rgba(0,0,0,0.06));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.cs-deal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--card-shadow, rgba(0,0,0,0.12));
}
.cs-deal-icon {
  font-size: 2rem;
  color: var(--highlight, #FFDE00);
  margin-bottom: 0.75rem;
}

/* ── Buttons ──────────────────────────────────────────── */
.cs-btn-accent {
  background: var(--accent, #D2001A);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
}
.cs-btn-accent:hover {
  background: var(--accent, #D2001A);
  color: #fff;
  opacity: 0.88;
  transform: translateY(-1px);
}

.cs-btn-highlight {
  background: var(--highlight, #FFDE00);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
}
.cs-btn-highlight:hover {
  background: var(--highlight, #FFDE00);
  color: #1a1a1a;
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── About ────────────────────────────────────────────── */
.cs-about-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text, #1a1a1a);
}
.cs-about-logo-wrap {
  background: var(--surface, #EFEFEF);
  border-radius: 50%;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 32px var(--card-shadow, rgba(0,0,0,0.1));
}
.cs-about-logo {
  max-width: 160px;
  max-height: 160px;
  object-fit: contain;
}

/* ── Contact ──────────────────────────────────────────── */
.cs-contact-info { padding: 1.5rem 0; }
.cs-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text, #1a1a1a);
}
.cs-contact-item a {
  color: var(--accent, #D2001A);
  text-decoration: none;
}
.cs-contact-item a:hover { text-decoration: underline; }
.cs-contact-icon {
  font-size: 1.1rem;
  color: var(--accent, #D2001A);
  margin-top: 2px;
  flex-shrink: 0;
}

.cs-input {
  background: var(--bg, #FFFAE7);
  border: 1.5px solid rgba(0,0,0,0.12);
  color: var(--text, #1a1a1a);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font, 'Tajawal', sans-serif);
}
.cs-input:focus {
  border-color: var(--accent, #D2001A);
  box-shadow: 0 0 0 3px rgba(210,0,26,0.12);
  outline: none;
  background: var(--bg, #FFFAE7);
  color: var(--text, #1a1a1a);
}

/* ── Social Links ─────────────────────────────────────── */
.cs-social-links { display: flex; gap: 0.75rem; }
.cs-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent, #D2001A);
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}
.cs-social-link:hover { transform: scale(1.1); opacity: 0.88; color: #fff; }

/* ── Footer ───────────────────────────────────────────── */
.cs-footer {
  background: var(--surface, #EFEFEF);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 2rem 0;
  margin-top: auto;
}
.cs-logo-footer { object-fit: contain; }

/* ── 404 ──────────────────────────────────────────────── */
.cs-404-icon {
  font-size: 5rem;
  color: var(--accent, #D2001A);
  opacity: 0.5;
}

/* ════════════════════════════════════════════════════════
   ADMIN PANEL
═══════════════════════════════════════════════════════ */
.admin-body {
  font-family: 'Inter', 'Tajawal', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
}

.admin-login-body {
  font-family: 'Inter', 'Tajawal', sans-serif;
  background: linear-gradient(135deg, #D2001A 0%, #8B0000 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.admin-nav {
  flex: 1;
  padding: 0.75rem 0;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  border-radius: 0;
}
.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(210,0,26,0.2);
  color: #fff;
  border-left: 3px solid #D2001A;
}
.admin-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Main area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-content {
  padding: 1.5rem;
  flex: 1;
}

/* Cards */
.admin-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  margin-bottom: 0;
}
.admin-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

/* Stat cards */
.admin-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.admin-stat-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.admin-stat-value { font-size: 2rem; font-weight: 800; color: #1a1a2e; }
.admin-stat-label { font-size: 0.85rem; color: #777; font-weight: 500; }

/* Tables */
.admin-table { font-size: 0.875rem; }
.admin-table thead th {
  background: #f8f9fa;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
  color: #555;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Branch admin rows */
.cs-branch-admin-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}
.cs-branch-admin-row:last-child { border-bottom: none; }
.cs-branch-admin-info { flex: 1; min-width: 180px; }
.cs-branch-admin-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* Slide cards */
.cs-slide-card {
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.cs-slide-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.cs-slide-info { padding: 0.5rem 0.75rem 0; }
.cs-slide-actions {
  padding: 0.5rem 0.75rem;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* Admin buttons */
.btn-admin {
  background: #D2001A;
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  transition: opacity 0.2s;
}
.btn-admin:hover { background: #b5001a; color: #fff; }

.btn-xs {
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* Theme live preview */
.cs-theme-preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}
.cs-preview-navbar {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  background: #D2001A;
  color: #fff;
}
.cs-preview-body {
  padding: 1rem;
  background: #FFFAE7;
}
.cs-preview-btn {
  background: #D2001A;
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  display: inline-block;
}
.cs-preview-card {
  background: #EFEFEF;
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 991.98px) {
  .admin-sidebar {
    display: none;
  }
}
@media (max-width: 767.98px) {
  .cs-section { padding: 48px 0; }
  .cs-section-title { font-size: 1.5rem; }
  .cs-carousel-img { max-height: 260px; }
}
