/* ============================================================
   Market Yatra — Custom Styles
   Primary: #2E7D32 (dark green)  |  Accent: #FF6F00 (amber)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:       #1F7A63;
  --primary-light:  #28936F;
  --primary-dark:   #145A4A;
  --primary-bg:     #E0F2EC;
  --accent:         #E6B85C;
  --accent-light:   #F5D07A;
  --accent-bg:      #FFF5E0;
  --danger:         #E03E44;
  --danger-bg:      #FDECEA;
  --info:           #3A9ED6;
  --info-bg:        #E8F4FC;
  --dark:           #0A1612;
  --dark-2:         #111F1A;
  --dark-3:         #162820;
  --text-primary:   #1A2E27;
  --text-secondary: #4A6B5E;
  --text-muted:     #8AADA0;
  --bg-light:       #F4F8F6;
  --bg-white:       #FFFFFF;
  --border:         #DDE8E3;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 12px rgba(31,122,99,0.06);
  --shadow-lg:      0 8px 30px rgba(0,0,0,0.08);
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --transition:     all 0.25s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ─── Links ─────────────────────────────────── */
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ─── Navbar Brand ──────────────────────────── */
.navbar-brand {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.navbar-brand .brand-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ─── Public Navbar ─────────────────────────── */
.navbar-public {
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
}
.navbar-public .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar-public .nav-link:hover,
.navbar-public .nav-link.active {
  color: var(--primary);
  background: var(--primary-bg);
}

/* ─── Customer Top Navbar ───────────────────── */
.navbar-customer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 0.6rem 0;
}
.navbar-customer .navbar-brand,
.navbar-customer .nav-link { color: #fff !important; }
.navbar-customer .nav-link:hover { background: rgba(255,255,255,0.15); border-radius: var(--radius-sm); }

/* ─── Shop Owner Navbar ─────────────────────── */
.navbar-shop {
  background: var(--primary);
  padding: 0.6rem 0;
}
.navbar-shop .navbar-brand,
.navbar-shop .nav-link { color: #fff !important; }
.navbar-shop .nav-link:hover { background: rgba(255,255,255,0.15); border-radius: var(--radius-sm); }

/* ─── Admin Sidebar ─────────────────────────── */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--dark), var(--dark-2));
  color: #fff;
  padding: 1.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: var(--transition);
}
.admin-sidebar .sidebar-brand {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  font-family: var(--font-brand);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-sidebar .sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.7);
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-left-color: var(--primary-light);
}
.admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-left-color: var(--accent);
}
.admin-sidebar .nav-link .badge {
  margin-left: auto;
  font-size: 0.7rem;
}
.admin-content {
  margin-left: 260px;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-topbar h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* ─── Stat Cards ────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}
.stat-card .stat-icon.green  { background: var(--primary-bg); color: var(--primary); }
.stat-card .stat-icon.amber  { background: var(--accent-bg);  color: var(--accent); }
.stat-card .stat-icon.blue   { background: var(--info-bg);    color: var(--info); }
.stat-card .stat-icon.red    { background: var(--danger-bg);  color: var(--danger); }
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Points Balance Card (Customer) ────────── */
.points-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.points-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.points-card::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.points-card .points-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.points-card .points-label {
  font-size: 0.9rem;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

/* ─── Streak Card ───────────────────────────── */
.streak-card {
  background: linear-gradient(135deg, #FF6F00, #FF8F00, #FFA726);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.streak-card .streak-fire {
  font-size: 2rem;
  animation: pulse 2s infinite;
}
.streak-card .streak-count {
  font-size: 1.5rem;
  font-weight: 800;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ─── Content Cards ─────────────────────────── */
.content-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.content-card:hover {
  box-shadow: var(--shadow-md);
}
.content-card .card-header-custom {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.content-card .card-body-custom {
  padding: 1.25rem;
}

/* ─── Task Cards ────────────────────────────── */
.task-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.25rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.task-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.task-card .task-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.task-card .task-points {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
}
.task-card .task-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.task-card .task-status {
  margin-top: auto;
}

/* ─── Shop Cards ────────────────────────────── */
.shop-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}
.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.shop-card .shop-logo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary);
}
.shop-card .shop-info {
  padding: 1rem;
}
.shop-card .shop-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.shop-card .shop-category {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--primary-bg);
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* ─── Coupon Cards ──────────────────────────── */
.coupon-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  padding: 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.coupon-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.coupon-card .coupon-discount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}
.coupon-card .coupon-code {
  display: inline-block;
  background: var(--bg-light);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  border: 1px dashed var(--border);
}

/* ─── Badge Pills ───────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pill.verified {
  background: var(--info-bg);
  color: var(--info);
}
.badge-pill.badge-earned {
  background: var(--accent-bg);
  color: var(--accent);
}

/* ─── Community Photo Grid ──────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.photo-grid .photo-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  transition: var(--transition);
}
.photo-grid .photo-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.photo-grid .photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-grid .photo-item .photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 0.75rem;
}

/* ─── Poll Bar Chart ────────────────────────── */
.poll-bar-container {
  margin-bottom: 0.5rem;
}
.poll-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
.poll-bar {
  height: 28px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.poll-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  padding-left: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ─── Hero Section ──────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  color: #fff;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}
.hero-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* ─── Buttons ───────────────────────────────── */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}
.btn-primary-custom:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #E65100, var(--accent));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ─── Tables ────────────────────────────────── */
.table-custom {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-custom thead th {
  background: var(--bg-light);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
}
.table-custom tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.table-custom tbody tr:hover {
  background: #fafafa;
}

/* ─── Auth Pages ────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-bg), #fff);
  padding: 2rem;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}
.auth-card h2 {
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.auth-card .auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.auth-card .form-control {
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.auth-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* ─── Mobile Bottom Nav ─────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0.5rem 0;
}
.mobile-bottom-nav .nav {
  display: flex;
  justify-content: space-around;
}
.mobile-bottom-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  gap: 2px;
  padding: 0.25rem 0.5rem;
}
.mobile-bottom-nav .nav-link i {
  font-size: 1.25rem;
}
.mobile-bottom-nav .nav-link.active {
  color: var(--primary);
}

/* ─── Section Titles ────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
}

/* ─── Footer ────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}
.site-footer a {
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}
.site-footer a:hover { color: var(--accent-light); }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ─── Stars Interactive ─────────────────────── */
.star-rating {
  display: inline-flex;
  gap: 4px;
  cursor: pointer;
}
.star-rating .star {
  font-size: 1.5rem;
  color: #ccc;
  transition: color 0.2s;
}
.star-rating .star.active,
.star-rating .star:hover,
.star-rating .star:hover ~ .star { color: #FFC107; }

/* ─── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

/* ─── Responsive ────────────────────────────── */

/* ── Tablet (≤ 992px) ── */
@media (max-width: 992px) {
  .admin-sidebar {
    width: 0;
    padding: 0;
    overflow: hidden;
  }
  .admin-sidebar.show {
    width: 260px;
    padding: 1.5rem 0;
  }
  .admin-content {
    margin-left: 0;
    padding: 1.25rem;
  }
  .hero-section {
    padding: 3.5rem 0;
  }
  .hero-section h1 {
    font-size: 2.25rem;
  }
}

/* ══════════════════════════════════════════════════════════
   SMART POSTER GRID — Horizontal Sliding Layout
   ══════════════════════════════════════════════════════════ */

/* ─── Grid Container: Horizontal Slider ─── */
.smart-ad-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  padding: 20px 15vw;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center; /* Center items vertically */
}

.smart-ad-grid::-webkit-scrollbar {
  display: none;
}

/* ─── Base Card: fixed overflow box ─── */
.smart-poster {
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, opacity 0.4s ease, z-index 0.4s step-start;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  scroll-snap-align: center;
  margin-right: -40px; /* Overlap next poster */
  transform: scale(0.85); /* Default scale for inactive */
  opacity: 0.6;
  z-index: 1;
}
.smart-poster:last-child {
  margin-right: 0;
}

/* Active state toggled by JS */
.smart-poster.active {
  transform: scale(1);
  opacity: 1;
  z-index: 10;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.6);
}

/* Gradient overlay */
.smart-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.75) 100%);
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Hover */
.smart-poster:hover {
  box-shadow: 0 10px 24px -6px rgba(0,0,0,0.5);
}
.smart-poster:hover::before { opacity: 1; }

/* ─── Image: ABSOLUTE fill, never overflows ─── */
.smart-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}
.smart-poster:hover img {
  transform: scale(1.04);
}

/* ─── Text Overlay ─── */
.ad-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 12px;
  z-index: 2;
  color: #fff;
  pointer-events: none;
}

.ad-title {
  font-family: 'Poppins', var(--font-heading), sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-shop-row {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.75;
  font-size: 0.72rem;
  font-weight: 500;
}

.ad-shop-icon {
  width: 16px;
  height: 16px;
  background: var(--c-p, #1F7A63);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  flex-shrink: 0;
}

/* ─── Premium Badges ─── */
.ad-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  pointer-events: none;
}
.badge-exclusive { background: rgba(230, 184, 92, 0.9); color: #000; }
.badge-hot       { background: rgba(255, 107, 74, 0.9); color: #fff; }
.badge-new       { background: rgba(31, 122, 99, 0.9);  color: #fff; }

/* ══════════════════════════════════════
   LAYOUT TYPES — ROW/COLUMN SPANNING
   ══════════════════════════════════════ */

/* Landscape: wide */
.layout-landscape {
  width: 320px;
  height: 200px;
}

/* Portrait: tall */
.layout-portrait {
  width: 220px;
  height: 300px;
}

/* Square: normal */
.layout-square {
  width: 240px;
  height: 240px;
}

/* Card: slightly tall */
.layout-card {
  width: 240px;
  height: 320px;
}

/* Ultrawide: banner */
.layout-ultrawide {
  width: 400px;
  height: 180px;
}

/* Story: tall reel */
.layout-story {
  width: 180px;
  height: 320px;
}

/* ══════════════════════════════════════
   LIGHT THEME VARIANT (Dashboard)
   ══════════════════════════════════════ */
.smart-ad-grid.theme-light .smart-poster {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px -3px rgba(0,0,0,0.1);
}
.smart-ad-grid.theme-light .smart-poster::before {
  background: linear-gradient(to bottom, transparent 55%, rgba(255,255,255,0.92) 100%);
}
.smart-ad-grid.theme-light .ad-content {
  color: var(--c-text, #1a1a1a);
}
.smart-ad-grid.theme-light .ad-title {
  text-shadow: none;
}
.smart-ad-grid.theme-light .smart-poster:hover {
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.15);
}

/* ══════════════════════════════════════
   LANDING PAGE CONTAINER
   ══════════════════════════════════════ */
.landing-ads-container {
  background: #0a1612;
  padding: 70px 0 80px;
  position: relative;
  overflow: hidden;
}
.landing-ads-container::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(31,122,99,0.12) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

/* ══════════════════════════════════════
   RESPONSIVE: Horizontal Slider Adjustments
   Grid overrides removed — smart-ad-grid
   stays as display:flex horizontal scroll
   at ALL breakpoints.
   ══════════════════════════════════════ */

/* Large desktop */
@media (max-width: 1440px) {
  .smart-ad-grid {
    padding: 20px 10vw;
  }
}

/* Small laptop / tablet landscape */
@media (max-width: 1024px) {
  .smart-ad-grid {
    padding: 16px 6vw;
  }
  .layout-landscape { width: 280px; height: 175px; }
  .layout-portrait  { width: 200px; height: 270px; }
  .layout-square    { width: 210px; height: 210px; }
  .layout-card      { width: 210px; height: 280px; }
  .layout-ultrawide { width: 340px; height: 160px; }
  .layout-story     { width: 160px; height: 280px; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .smart-ad-grid {
    padding: 14px 4vw;
    margin-right: -40px;
  }
  .smart-poster { border-radius: 10px; margin-right: -30px; }
  .layout-landscape { width: 260px; height: 160px; }
  .layout-portrait  { width: 180px; height: 250px; }
  .layout-square    { width: 190px; height: 190px; }
  .layout-card      { width: 190px; height: 260px; }
  .layout-ultrawide { width: 300px; height: 140px; }
  .layout-story     { width: 140px; height: 250px; }
  .ad-title { font-size: 0.72rem; }
  .ad-shop-row { font-size: 0.6rem; }
  .ad-badge { font-size: 0.5rem; padding: 2px 6px; }
  .landing-ads-container { padding: 35px 0 45px; }
}

/* Mobile */
@media (max-width: 480px) {
  .smart-ad-grid {
    padding: 12px 3vw;
  }
  .smart-poster { border-radius: 8px; margin-right: -25px; }
  .layout-landscape { width: 220px; height: 140px; }
  .layout-portrait  { width: 160px; height: 220px; }
  .layout-square    { width: 170px; height: 170px; }
  .layout-card      { width: 170px; height: 230px; }
  .layout-ultrawide { width: 260px; height: 120px; }
  .layout-story     { width: 130px; height: 220px; }
  .ad-content { padding: 6px 5px; }
  .ad-title { font-size: 0.65rem; -webkit-line-clamp: 1; margin-bottom: 1px; }
  .ad-shop-row { font-size: 0.55rem; gap: 3px; }
  .ad-badge { top: 4px; left: 4px; font-size: 0.45rem; padding: 2px 5px; }
  .landing-ads-container { padding: 25px 0 30px; }
}

/* ══════════════════════════════════════
   BLUR PLACEHOLDER LOADING
   ══════════════════════════════════════ */
.blur-load {
  filter: blur(10px);
  transition: filter 0.4s ease-in-out;
}
.blur-load.loaded {
  filter: blur(0);
}

/* ══════════════════════════════════════
   SIDEBAR AD GRIDS (Login / Register)
   These are inside narrow panels so
   they MUST use fewer columns.
   ══════════════════════════════════════ */
.login-ad-grid,
.reg-ad-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 140px;
  gap: 8px;
}
.login-ad-grid .smart-poster,
.reg-ad-grid .smart-poster {
  max-height: 140px;
  border-radius: 10px;
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  body {
    font-size: 0.92rem;
  }

  /* Bottom nav for customer */
  .mobile-bottom-nav {
    display: block;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  body.customer-layout {
    padding-bottom: 72px;
  }

  /* Navbar compaction */
  .navbar-brand {
    font-size: 1.15rem;
  }
  .navbar-brand .brand-circle {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
    margin-right: 6px;
  }
  .navbar-customer .navbar-collapse,
  .navbar-shop .navbar-collapse {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-top: 0.5rem;
  }
  .navbar-public .navbar-collapse {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-md);
  }

  /* Container tighter */
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Hero mobile */
  .hero-section {
    padding: 2.5rem 0;
  }
  .hero-section h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  .hero-section p.lead {
    font-size: 1rem;
  }
  .hero-section .btn-lg {
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
  }
  .hero-section .fs-4 {
    font-size: 1.15rem !important;
  }

  /* Section titles */
  .section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  /* Stat cards */
  .stat-card {
    padding: 1rem;
  }
  .stat-card .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  .stat-card .stat-value {
    font-size: 1.35rem;
  }
  .stat-card .stat-label {
    font-size: 0.7rem;
  }

  /* Points card */
  .points-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }
  .points-card .points-value {
    font-size: 2.25rem;
  }
  .points-card .points-label {
    font-size: 0.8rem;
  }

  /* Streak card */
  .streak-card {
    padding: 1rem;
  }
  .streak-card .streak-fire {
    font-size: 1.5rem;
  }
  .streak-card .streak-count {
    font-size: 1.2rem;
  }

  /* Content cards */
  .content-card .card-header-custom {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  .content-card .card-body-custom {
    padding: 1rem;
  }

  /* Task cards */
  .task-card {
    padding: 0.85rem;
  }
  .task-card .task-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  .task-card .task-name {
    font-size: 0.82rem;
  }
  .task-card .task-points {
    font-size: 0.75rem;
  }

  /* Shop cards */
  .shop-card .shop-logo {
    height: 120px;
    font-size: 2.2rem;
  }
  .shop-card .shop-info {
    padding: 0.75rem;
  }
  .shop-card .shop-name {
    font-size: 0.88rem;
  }
  .shop-card .shop-category {
    font-size: 0.62rem;
    padding: 1px 8px;
  }

  /* Coupon cards */
  .coupon-card {
    padding: 1rem;
  }
  .coupon-card .coupon-discount {
    font-size: 1.15rem;
  }
  .coupon-card .coupon-code {
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
  }

  /* Tables  — horizontal scroll with tighter cells */
  .table-custom thead th {
    font-size: 0.7rem;
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
  }
  .table-custom tbody td {
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
  }

  /* Buttons touch-friendly */
  .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-sm {
    min-height: 34px;
    font-size: 0.8rem;
  }

  /* Auth pages */
  .auth-wrapper {
    padding: 1rem;
  }
  .auth-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }
  .auth-card h2 {
    font-size: 1.4rem;
  }

  /* Photo grid 2 cols on mobile */
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* Forms */
  .form-control, .form-select {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }
  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }

  /* Footer */
  .site-footer {
    margin-top: 2rem;
    padding: 2rem 0 1rem;
  }
  .site-footer h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  /* Admin topbar */
  .admin-topbar h1 {
    font-size: 1.15rem;
  }

  /* Login modal for mobile (no side panel) */
  .modal-lg {
    max-width: 95%;
    margin: 0.5rem auto;
  }

  /* Alerts compact */
  .alert {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
}

/* ── Small phones (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.45rem;
  }
  .hero-section p.lead {
    font-size: 0.9rem;
  }
  .hero-section .btn-lg {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .hero-section .d-flex.gap-3 {
    flex-direction: column;
    gap: 0.5rem !important;
  }

  .stat-card .stat-value {
    font-size: 1.15rem;
  }
  .stat-card .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border-radius: 8px;
  }

  .points-card .points-value {
    font-size: 1.85rem;
  }

  .task-card .task-name {
    font-size: 0.78rem;
  }

  .shop-card .shop-logo {
    height: 100px;
  }

  /* Stack buttons */
  .btn-group {
    flex-direction: column;
    gap: 4px;
  }
  .btn-group .btn {
    border-radius: var(--radius-sm) !important;
  }

  /* Mobile bottom nav tuning */
  .mobile-bottom-nav .nav-link {
    font-size: 0.62rem;
    padding: 0.2rem 0.25rem;
  }
  .mobile-bottom-nav .nav-link i {
    font-size: 1.1rem;
  }

  /* Form spacing */
  .row.g-3 {
    --bs-gutter-y: 0.75rem;
    --bs-gutter-x: 0.75rem;
  }
}

/* ─── Animations ────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ─── Tabs ──────────────────────────────────── */
.nav-tabs-custom .nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.25rem;
  transition: var(--transition);
}
.nav-tabs-custom .nav-link.active {
  color: var(--primary);
  background: transparent;
  border-bottom-color: var(--primary);
}
.nav-tabs-custom .nav-link:hover {
  color: var(--primary);
}
@media (max-width: 768px) {
  .nav-tabs-custom {
    font-size: 0.85rem;
  }
  .nav-tabs-custom .nav-link {
    padding: 0.6rem 0.75rem;
  }
}

/* ─── Utility ───────────────────────────────── */
.highlight-row { background: rgba(46,125,50,0.08) !important; }
.text-accent { color: var(--accent) !important; }
.text-primary-custom { color: var(--primary) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 1.8rem;
}
@media (max-width: 768px) {
  .avatar-lg {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
  }
}

/* ─── Touch Enhancement ─────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover transforms on touch devices for performance */
  .shop-card:hover,
  .stat-card:hover,
  .task-card:hover,
  .content-card:hover,
  .coupon-card:hover {
    transform: none;
  }
  /* Larger touch targets */
  .form-check-input {
    width: 1.2em;
    height: 1.2em;
  }
  .form-check-label {
    padding-left: 0.25em;
  }
}

/* ─── Safe area for notched phones ──────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.customer-layout {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   COUPON MARKETPLACE — Premium Cards
   ============================================================ */

/* Points Wallet Badge */
.points-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 1px solid #ffcc80;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  color: #e65100;
  animation: walletGlow 3s infinite;
}
.points-wallet i { font-size: 1.1rem; }
.points-wallet-value { font-size: 1.1rem; font-weight: 800; }
.points-wallet-label { font-size: 0.75rem; opacity: 0.8; }

@keyframes walletGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,111,0,0); }
  50% { box-shadow: 0 0 12px 2px rgba(255,111,0,0.15); }
}

/* Marketplace Coupon Cards */
.coupon-marketplace-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.coupon-marketplace-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}
.coupon-marketplace-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.coupon-marketplace-card:hover::before { opacity: 1; }
.coupon-marketplace-card.owned {
  opacity: 0.7;
  border-style: dashed;
}

/* Coupon Ribbon */
.coupon-ribbon {
  position: absolute;
  top: 12px;
  right: -30px;
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 35px;
  transform: rotate(45deg);
  letter-spacing: 0.1em;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.coupon-ribbon.free { background: linear-gradient(135deg, #4caf50, #66bb6a); }

/* Coupon Shop Info */
.coupon-shop-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f5f5f5;
}
.coupon-shop-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.coupon-shop-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}
.coupon-shop-name { font-weight: 600; font-size: 0.85rem; }
.coupon-shop-category { font-size: 0.7rem; color: var(--text-muted); }

/* Coupon Main Content */
.coupon-main-content { flex: 1; margin-bottom: 0.75rem; }
.coupon-discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  color: #e65100;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.coupon-discount-badge.small {
  font-size: 0.9rem;
  padding: 0.2rem 0.6rem;
}
.coupon-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.coupon-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Coupon Footer */
.coupon-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f5f5f5;
  padding-top: 0.75rem;
  gap: 0.5rem;
}
.coupon-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.coupon-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.coupon-expiry { color: var(--text-muted); }
.coupon-stock { color: var(--primary); font-weight: 600; }

/* Buy Button */
.btn-coupon-buy {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-coupon-buy:hover {
  background: linear-gradient(135deg, #e65100, var(--accent));
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255,111,0,0.3);
}
.btn-coupon-buy:active { transform: scale(0.98); }

/* Coupon price tag */
.coupon-price {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

/* Owned badge */
.coupon-owned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xl);
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
}

/* Points price tags (inline) */
.points-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
  border: 1px solid #ffe0b2;
  color: #e65100;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 0.85rem;
}
.points-price-tag i { color: #f59e0b; }
.points-price-tag-sm {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #e65100;
  font-weight: 700;
  font-size: 0.8rem;
}
.points-price-tag-sm i { color: #f59e0b; }
.points-spent-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ─── My Coupons Card ──────────────────────── */
.my-coupon-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.25rem;
  height: 100%;
  transition: var(--transition);
  position: relative;
}
.my-coupon-card:hover {
  box-shadow: var(--shadow-md);
}
.my-coupon-card.redeemed {
  background: #fafafa;
  opacity: 0.8;
}
.my-coupon-body { margin-bottom: 0.75rem; }
.coupon-code-reveal {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #f5f5f5, #eeeeee);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}
.my-coupon-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0f0f0;
  padding-top: 0.75rem;
}

/* ─── Coupon Preview (shop owner form) ──────── */
.coupon-preview-box {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px dashed var(--border);
}
.coupon-card-preview {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border);
}

/* ============================================================
   MEMBERSHIP UI
   ============================================================ */

/* Membership Hero Card (shop owner) */
.membership-hero-card {
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 0;
}
.membership-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--plan-color), color-mix(in srgb, var(--plan-color) 60%, #000));
  z-index: 0;
}
.membership-hero-bg::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.membership-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}
.membership-badge-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(10px);
}
.membership-plan-name {
  font-size: 1.5rem;
  font-weight: 800;
}
.membership-badge-label {
  font-size: 0.85rem;
  opacity: 0.85;
}
.membership-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  opacity: 0.9;
}
.membership-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}
.membership-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}
.membership-feature-item i { color: rgba(255,255,255,0.8); }

/* Membership Strip (dashboard) */
.membership-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--plan-color), color-mix(in srgb, var(--plan-color) 70%, #000));
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}
.membership-strip i { font-size: 1.1rem; }
.membership-strip-muted {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-light);
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  font-size: 0.9rem;
}

/* Membership Badge (inline in shop view) */
.membership-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--plan-color) 15%, #fff);
  color: var(--plan-color);
  border: 1px solid color-mix(in srgb, var(--plan-color) 30%, #fff);
}

/* Plan Cards (shop owner view) */
.membership-plan-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.membership-plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--plan-color);
}
.membership-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.membership-plan-card.current-plan {
  border-color: var(--plan-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--plan-color) 20%, transparent);
}
.plan-current-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--plan-color);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}
.plan-header {
  text-align: center;
  margin-bottom: 1.25rem;
}
.plan-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--plan-color) 12%, #fff);
  color: var(--plan-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 0.75rem;
}
.plan-name { font-weight: 700; margin-bottom: 0.5rem; }
.plan-price { }
.price-amount { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.price-period { font-size: 0.8rem; color: var(--text-muted); }
.plan-features {
  flex: 1;
  margin-bottom: 1rem;
}
.plan-feature-item {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
}
.plan-feature-item i { color: var(--primary); margin-right: 4px; }
.plan-footer {
  text-align: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 0.75rem;
}

/* ─── Admin Plan Cards ──────────────────────── */
.admin-plan-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
}
.admin-plan-card:hover { box-shadow: var(--shadow-md); }
.admin-plan-card.plan-inactive { opacity: 0.6; }
.plan-card-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}
.plan-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--plan-color);
}
.plan-card-body {
  padding: 1.25rem;
  flex: 1;
}
.plan-price-display { text-align: center; margin-bottom: 1rem; }
.plan-stats-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}
.plan-stat { text-align: center; }
.plan-stat-value { display: block; font-size: 1.25rem; font-weight: 800; color: var(--text-primary); }
.plan-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.plan-features-list { margin-bottom: 0.5rem; }
.plan-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Plan Select (admin assign) */
.plan-select-grid {
  display: grid;
  gap: 0.5rem;
}
.plan-select-option { cursor: pointer; }
.plan-select-card {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.plan-select-card:hover {
  border-color: var(--plan-color);
  background: color-mix(in srgb, var(--plan-color) 5%, #fff);
}
.plan-select-card.selected {
  border-color: var(--plan-color);
  background: color-mix(in srgb, var(--plan-color) 8%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--plan-color) 15%, transparent);
}

/* ============================================================
   RESPONSIVE — Marketplace & Membership
   ============================================================ */
@media (max-width: 768px) {
  .coupon-store-header { margin-bottom: 1rem !important; }
  .points-wallet {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
  .points-wallet-value { font-size: 0.95rem; }

  .coupon-marketplace-card { padding: 1rem; }
  .coupon-discount-badge { font-size: 0.95rem; padding: 0.2rem 0.6rem; }
  .coupon-title { font-size: 0.88rem; }
  .coupon-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .coupon-action { align-self: flex-end; }

  .btn-coupon-buy {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }
  .coupon-ribbon {
    font-size: 0.55rem;
    padding: 2px 28px;
    top: 10px;
    right: -32px;
  }

  .my-coupon-card { padding: 1rem; }
  .my-coupon-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  .membership-hero-content { padding: 1.25rem; }
  .membership-plan-name { font-size: 1.2rem; }
  .membership-badge-lg { width: 44px; height: 44px; font-size: 1.2rem; }
  .membership-features { grid-template-columns: 1fr; }
  .membership-strip { flex-direction: column; gap: 0.5rem; text-align: center; }

  .plan-stats-row { gap: 1rem; }
  .plan-stat-value { font-size: 1rem; }

  .admin-plan-card .plan-card-body { padding: 1rem; }
  .plan-price-display .display-6 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .coupon-shop-info { gap: 8px; }
  .coupon-shop-logo, .coupon-shop-logo-placeholder {
    width: 30px; height: 30px; border-radius: 6px;
  }
  .coupon-shop-name { font-size: 0.78rem; }
  .membership-plan-card { padding: 1rem; }
  .price-amount { font-size: 1.25rem; }
}

/* ============================================================
   NEW MODULES — Added in System Upgrade v3
   ============================================================ */

/* ─── Ad Carousel ───────────────────────────── */
.ad-carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,0.05);
}
.ad-carousel-wrapper.fullscreen {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.ad-carousel-wrapper.compact {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.ad-carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.ad-card {
  min-width: 100%;
  flex-shrink: 0;
  cursor: pointer;
}
.compact .ad-card {
  min-width: 33.333%;
}
.ad-card-inner {
  position: relative;
  overflow: hidden;
  border-radius: 0;
}
.ad-card-image {
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.compact .ad-card-image {
  height: 120px;
}
.ad-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 2rem 1.25rem 1.25rem;
  color: #fff;
}
.compact .ad-card-overlay {
  padding: 1rem 0.75rem 0.75rem;
}
.ad-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ad-card-shop {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 2px;
}
.ad-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.compact .ad-card-title {
  font-size: 0.8rem;
}
.ad-card-desc {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.3;
}
.compact .ad-card-desc {
  display: none;
}
.ad-card-cta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-top: 6px;
}
.compact .ad-card-cta {
  display: none;
}

/* Carousel dots */
.ad-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
}
.ad-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}
.ad-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 4px;
}

/* ─── QR Display ────────────────────────────── */
.qr-display {
  background: linear-gradient(135deg, #f8f9fa, #eceff1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-display canvas {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Backup Code */
.backup-code-display {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--primary-dark);
  background: var(--primary-bg);
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-md);
  border: 2px dashed var(--primary-light);
}

/* Coupon Scan Result */
.coupon-scan-result {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
}
.coupon-scan-result.success {
  background: linear-gradient(135deg, rgba(46,125,50,0.05), rgba(76,175,80,0.1));
  border: 2px solid var(--primary-light);
}
.coupon-scan-result.error {
  background: linear-gradient(135deg, rgba(211,47,47,0.05), rgba(229,57,53,0.1));
  border: 2px solid #ef5350;
}
.scan-result-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}
.scan-result-icon.success { color: var(--primary); }
.scan-result-icon.error { color: var(--danger); }

/* Coupon Discount Badge */
.coupon-discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  padding: 0.4rem 1.5rem;
  border-radius: var(--radius-xl);
  font-size: 1.3rem;
  font-weight: 800;
}

/* ─── Animations ────────────────────────────── */
.animate-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
.animate-in.delay-1 { animation-delay: 0.15s; }
.animate-in.delay-2 { animation-delay: 0.3s; }
.animate-in.delay-3 { animation-delay: 0.45s; }

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

/* ─── Dashboard Ad Strip ────────────────────── */
.dashboard-ad-strip {
  position: fixed;
  bottom: 72px; /* above mobile bottom nav */
  left: 0;
  right: 0;
  z-index: 900;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  padding: 0;
}
@media (min-width: 769px) {
  .dashboard-ad-strip {
    bottom: 0;
  }
}

/* ─── Points Price Tag ──────────────────────── */
.points-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ─── Nav Tabs Custom ───────────────────────── */
.nav-tabs-custom .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.5rem 1rem;
}
.nav-tabs-custom .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}
.nav-tabs-custom .nav-link:hover {
  color: var(--primary);
}

/* ─── Coupon Preview Box ────────────────────── */
.coupon-preview-box {
  background: var(--bg-light);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}
