/*
 * improvements.css — Mutaimtandao.co.ke Complete UI/UX Overhaul
 * Load after style.css and pages.css in header.php
 * Add to header.php: <link rel="stylesheet" href="/assets/improvements.css?v=2.0">
 *
 * Also add to header.php <head> BEFORE stylesheet links:
 * <link rel="preconnect" href="https://fonts.googleapis.com">
 * <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 * <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=DM+Sans:wght@400;500&display=swap" rel="stylesheet">
 */

/* ════════════════════════════════════════════════════════════
   TOKENS & VARIABLES
   ════════════════════════════════════════════════════════════ */
:root {
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-body: 'DM Sans', 'Inter', sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-std: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  --primary-rgb: 4, 120, 87;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-600: #16a34a;
}

/* ════════════════════════════════════════════════════════════
   GLOBAL TYPOGRAPHY UPGRADE
   ════════════════════════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.hero-v2__headline,
.browse-card-title,
.catv2-title,
.footer-section h4,
.page-divider__title,
.card-title,
.recent-card-title,
.document-card-title,
.popular-card-title {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* ════════════════════════════════════════════════════════════
   BRAND FIX — Decorative red lines → brand green
   ════════════════════════════════════════════════════════════ */
.page-title::after {
  background-color: var(--primary) !important;
}

.page-divider__line-left {
  background: linear-gradient(to right, transparent, var(--primary)) !important;
}

.page-divider__line-right {
  background: linear-gradient(to left, transparent, var(--primary)) !important;
}

/* ════════════════════════════════════════════════════════════
   SKIP-TO-CONTENT LINK (accessibility)
   ════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Focus-visible ring for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ════════════════════════════════════════════════════════════
   HEADER — Active nav state + logo height
   ════════════════════════════════════════════════════════════ */
.header-logo {
  height: 40px;
  width: auto;
  display: block;
}

.main-nav>a.nav-active,
.main-nav .nav-dropdown-toggle.nav-active {
  color: var(--primary);
}

.main-nav>a.nav-active::after {
  transform: scaleX(1);
}

/* ════════════════════════════════════════════════════════════
   HERO SECTION — Fix min-height: 200px, improve layout
   ════════════════════════════════════════════════════════════ */
.hero-v2 {
  min-height: clamp(480px, 62vh, 720px);
  background: #f0faf5;
  position: relative;
  overflow: hidden;
}

.hero-v2__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-v2__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  transform: scale(1);
  animation: heroKenBurnsZoom 22s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroKenBurnsZoom {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }

  100% {
    transform: scale(1.1) translate3d(-1%, -0.5%, 0);
  }
}

.hero-v2__container {
  padding: 2.5rem 2rem;
  min-height: clamp(480px, 62vh, 720px);
  align-items: center;
}

.hero-v2__card {
  padding: 2rem 2.25rem;
  max-width: 560px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
}

.hero-v2__headline {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.12;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-v2__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  padding: 0.28rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  letter-spacing: 0.01em;
}

.hero-v2__highlight {
  color: #047857;
  background: linear-gradient(135deg, #047857 0%, #059669 50%, #0f766e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-v2__subheadline strong {
  color: #0f172a;
  font-weight: 600;
}

.hero-v2__features {
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.hero-v2__feature-row {
  padding: 0.45rem 0.9rem;
  gap: 0.75rem;
  border-radius: 12px;
}

.hero-v2__feature-text strong {
  font-size: 0.88rem;
}

.hero-v2__feature-text span {
  font-size: 0.78rem;
}

.hero-v2__cta {
  margin-top: 1.15rem;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.hero-v2__quick-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}

.hero-v2__quick-tag {
  background: rgba(241, 245, 249, 0.9);
  color: #334155;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  font-weight: 500;
  font-size: 0.73rem;
  transition: all 0.2s ease;
}

.hero-v2__quick-tag:hover {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

@media (max-width: 768px) {

  .hero-v2,
  .hero-v2__container {
    min-height: 0;
  }

  .hero-v2__container {
    padding: 0.75rem 0.75rem;
    grid-template-columns: 1fr;
  }

  .hero-v2__card {
    max-width: 100%;
    padding: 0.9rem 0.85rem;
  }
}

/* ════════════════════════════════════════════════════════════
   SPACING — Reduce excessive gaps
   ════════════════════════════════════════════════════════════ */
.section-spacing {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.page-title {
  margin-bottom: 1.25rem;
}

/* ════════════════════════════════════════════════════════════
   BROWSE PAGE — Title consistency & intro styling
   ════════════════════════════════════════════════════════════ */
.browse-seo-intro {
  background: linear-gradient(to right, #f0fdf4, #e7f9f4);
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  margin-bottom: 2rem;
  border-left: 3px solid var(--primary-light);
}

.browse-seo-text {
  font-size: 0.925rem;
  color: var(--neutral-700);
  line-height: 1.65;
  margin: 0;
}

.browse-seo-text strong {
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .browse-seo-intro {
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
  }
}

/* ════════════════════════════════════════════════════════════
   SHORTCUT PILLS — Consistent brand green across ALL cards
   ════════════════════════════════════════════════════════════ */
.shortcut-pill {
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.22);
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  border-radius: 7px;
  transition: var(--transition-fast);
}

.shortcut-pill:hover {
  background: var(--primary-dark) !important;
  filter: none !important;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3) !important;
  transform: translateY(-2px) scale(1.03) !important;
}

.shortcut-pill--more {
  background: rgba(255, 255, 255, 0.75) !important;
  color: var(--neutral-700) !important;
  border: 1px dashed rgba(0, 0, 0, 0.15) !important;
  box-shadow: none !important;
  font-weight: 500;
}

.shortcut-pill--more:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  transform: none !important;
}

/* ════════════════════════════════════════════════════════════
   BROWSE GRID — Clean column rules
   ════════════════════════════════════════════════════════════ */
.browse-grid {
  gap: 1.25rem;
}

.browse-grid.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.browse-grid.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .browse-grid.grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {

  .browse-grid.grid-cols-2,
  .browse-grid.grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════
   DOCUMENT CARDS (recent-card) — Enhanced metadata
   ════════════════════════════════════════════════════════════ */
.recent-card {
  border-radius: var(--radius-lg);
  transition: transform var(--transition-std), box-shadow var(--transition-std), border-color var(--transition-std);
  border: 1px solid var(--neutral-200);
}

.recent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.recent-card-title {
  font-family: var(--font-display);
  font-size: 0.975rem;
  line-height: 1.45;
}

/* Prominent FREE badge */
.recent-card-price {
  font-size: 1rem;
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════════
   FREE DOCUMENT BADGE — Stand out for conversion
   ════════════════════════════════════════════════════════════ */
.item-price-badge,
.price-free {
  display: inline-block;
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff !important;
  padding: 0.25rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

/* File format badges */
.file-format-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.file-format-badge--pdf {
  background: #fee2e2;
  color: #991b1b;
}

.file-format-badge--docx,
.file-format-badge--doc {
  background: #dbeafe;
  color: #1e40af;
}

.file-format-badge--ppt,
.file-format-badge--pptx {
  background: #ffedd5;
  color: #c2410c;
}

.file-format-badge--xlsx {
  background: #d1fae5;
  color: #065f46;
}

/* ════════════════════════════════════════════════════════════
   BACK-TO-TOP BUTTON
   ════════════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
  z-index: 800;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
}

/* ════════════════════════════════════════════════════════════
   MAIN CONTENT & FOOTER LAYOUT
   ════════════════════════════════════════════════════════════ */
.main-content {
  display: block;
  width: 100%;
  min-height: calc(100vh - 420px);
}

.site-footer {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
  padding: 3.5rem 2rem 1.5rem;
}

.footer-brand-blurb {
  font-size: 0.875rem;
  color: var(--neutral-400);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.footer-social {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-300);
  font-size: 1.05rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.footer-social:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Newsletter input polish */
.newsletter-form {
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 8px;
  padding: 0.7rem 1rem;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.newsletter-form input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  outline: none;
}

/* Footer trust row */
.footer-trust {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--neutral-400);
  margin-top: 0.75rem;
}

.footer-trust i {
  color: var(--primary-light);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 2.5rem 1rem 1.25rem;
  }
}

/* ════════════════════════════════════════════════════════════
   BREADCRUMB — Cleaner with chevron separators
   ════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--neutral-500);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline;
  padding: 0;
}

.breadcrumb a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumb>span {
  color: var(--neutral-400);
  font-size: 0.7rem;
}

/* ════════════════════════════════════════════════════════════
   ALERT COMPONENTS — Softer full-border style
   ════════════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius-md);
  border-left: none;
  border: 1px solid transparent;
}

.alert-success {
  border-color: #86efac;
  background: #f0fdf4;
}

.alert-error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.alert-info {
  border-color: var(--primary-light);
  background: var(--highlight);
}

/* ════════════════════════════════════════════════════════════
   DOC COUNT BADGE
   ════════════════════════════════════════════════════════════ */
.doc-count-badge {
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.85);
  color: var(--neutral-700);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.doc-count-badge i {
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════════
   ITEM PAGE — Related docs section + layout tweaks
   ════════════════════════════════════════════════════════════ */
.related-docs {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--neutral-200);
}

.related-docs__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
}

/* Remove hard border-left from item SEO card */
.item-content-card[style*="border-left"] {
  border-left: none !important;
  border-top: 3px solid var(--primary) !important;
}

/* M-Pesa input polish */
.mpesa-input-v2 {
  border: 1.5px solid var(--neutral-200);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 0.75rem;
  width: 100%;
}

.mpesa-input-v2:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

/* ════════════════════════════════════════════════════════════
   FILTER PILLS (popular, search)
   ════════════════════════════════════════════════════════════ */
.filter-pills {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--neutral-600);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: var(--highlight);
  color: var(--primary);
  border-color: var(--primary-light);
}

.filter-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

/* ════════════════════════════════════════════════════════════
   SEARCH PAGE — Empty state
   ════════════════════════════════════════════════════════════ */
.search-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--neutral-200);
}

.search-empty__icon {
  font-size: 3.5rem;
  color: var(--neutral-300);
  display: block;
  margin-bottom: 1rem;
}

.search-empty__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.search-empty__text {
  color: var(--neutral-500);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* ════════════════════════════════════════════════════════════
   SKELETON LOADING CARDS
   ════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

.skeleton-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  padding: 1.25rem;
  height: 160px;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 0.75rem;
}

.skeleton-line--short {
  width: 45%;
}

.skeleton-line--med {
  width: 70%;
}

.skeleton-line--full {
  width: 100%;
}

/* ════════════════════════════════════════════════════════════
   PAGE HEROES (About, Contact, etc.) — More depth
   ════════════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #065f46 60%, #0a7c5a 100%);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -8%;
  width: 380px;
  height: 380px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero h1,
.page-hero p {
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════════════════════════════
   404 PAGE — Full-design upgrade
   ════════════════════════════════════════════════════════════ */
.page-404-wrap {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.page-404-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  background: linear-gradient(135deg, var(--primary) 30%, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
}

.page-404-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.75rem;
}

.page-404-text {
  font-size: 1rem;
  color: var(--neutral-500);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.page-404-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.page-404-search {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  max-width: 420px;
  width: 100%;
}

.page-404-search input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.page-404-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.page-404-search button {
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.page-404-search button:hover {
  background: var(--primary-dark);
}

/* ════════════════════════════════════════════════════════════
   POPULAR PAGE FILTER TABS (already has its own system,
   just polish the search-empty and overall spacing)
   ════════════════════════════════════════════════════════════ */
.popular-header {
  margin-bottom: 0.5rem;
}

.popular-subtitle {
  text-align: center;
  color: var(--neutral-500);
  font-size: 0.975rem;
  margin-bottom: 2rem;
  margin-top: -0.75rem;
}

/* ════════════════════════════════════════════════════════════
   CONTACT PAGE
   ════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
  align-items: start;
}

.contact-info-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  color: white;
  position: sticky;
  top: 100px;
}

.contact-info-card h2 {
  color: white;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.contact-info-card p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-info-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-info-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.contact-info-value {
  font-size: 0.95rem;
  color: white;
  font-weight: 500;
  text-decoration: none;
}

.contact-info-value:hover {
  text-decoration: underline;
}

.contact-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: #25D366;
  color: white;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  margin-top: 1rem;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

.contact-wa-btn:hover {
  background: #1ebe57;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.contact-form-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--neutral-100);
}

.contact-form-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--neutral-900);
}

.contact-form-card p {
  color: var(--neutral-500);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-card {
    position: static;
  }
}

/* ════════════════════════════════════════════════════════════
   ABOUT PAGE — Card & section upgrades
   ════════════════════════════════════════════════════════════ */
.about-story {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--neutral-100);
}

.about-story h2 {
  color: var(--primary);
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.about-story p {
  line-height: 1.85;
  color: var(--neutral-700);
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.about-values {
  margin-bottom: 2.5rem;
}

.about-values h2 {
  text-align: center;
  margin-bottom: 1.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.value-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--neutral-100);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-std), box-shadow var(--transition-std);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.value-icon {
  width: 64px;
  height: 64px;
  background: var(--highlight);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
  color: var(--primary);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.value-card:hover .value-icon {
  background: var(--primary);
  color: white;
}

.value-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.value-card p {
  color: var(--neutral-600);
  line-height: 1.65;
  font-size: 0.9rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1rem;
  text-align: center;
  color: white;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .about-story,
  .contact-form-card,
  .contact-info-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ════════════════════════════════════════════════════════════
   PRINT STYLES
   ════════════════════════════════════════════════════════════ */
@media print {

  .sticky-header,
  .mobile-menu-toggle,
  .mobile-overlay,
  .site-footer,
  .back-to-top,
  .whatsapp-float,
  aside,
  nav,
  .breadcrumb,
  .related-docs {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: white;
  }

  .page-title {
    font-size: 18pt;
  }

  .item-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ════════════════════════════════════════════════════════════
   CARD MICRO-ANIMATIONS — Consistent, not aggressive
   ════════════════════════════════════════════════════════════ */
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.premium-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
}

.catv2-card:hover {
  transform: translateY(-5px);
}

/* ════════════════════════════════════════════════════════════
   WHATSAPP FLOATING BUTTON — EXPANDS ON HOVER
   ════════════════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  height: 52px;
  min-width: 52px;
  width: 52px;
  background: #25D366;
  color: #ffffff !important;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 13px;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(37, 211, 102, 0.35);
  z-index: 1000;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    padding 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.3s ease,
    transform 0.25s ease,
    background-color 0.2s ease;
}

.whatsapp-float i {
  font-size: 1.65rem;
  line-height: 1;
  color: #ffffff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.whatsapp-float-text {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-left: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: max-width 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.25s ease 0.05s,
    margin-left 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible,
.whatsapp-float.is-hovered {
  width: 228px;
  padding: 0 18px 0 14px;
  background: #25D366;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55), 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.whatsapp-float:hover i,
.whatsapp-float:focus-visible i,
.whatsapp-float.is-hovered i {
  transform: scale(1.05);
}

.whatsapp-float:hover .whatsapp-float-text,
.whatsapp-float:focus-visible .whatsapp-float-text,
.whatsapp-float.is-hovered .whatsapp-float-text {
  max-width: 170px;
  opacity: 1;
  margin-left: 10px;
  transform: translateX(0);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    left: 16px;
    height: 48px;
    min-width: 48px;
    width: 48px;
    padding: 0 11px;
    border-radius: 12px;
  }

  .whatsapp-float i {
    font-size: 1.45rem;
  }

  .whatsapp-float-text {
    font-size: 0.95rem;
  }

  .whatsapp-float:hover,
  .whatsapp-float:focus-visible,
  .whatsapp-float.is-hovered {
    width: 210px;
    padding: 0 16px 0 12px;
  }

  .whatsapp-float:hover .whatsapp-float-text,
  .whatsapp-float:focus-visible .whatsapp-float-text,
  .whatsapp-float.is-hovered .whatsapp-float-text {
    max-width: 155px;
    margin-left: 8px;
  }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE OVERFLOW PREVENTION (consolidated, no !important spam)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  html,
  body {
    overflow-x: clip;
    max-width: 100vw;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-title {
    font-size: 1.5rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .section-spacing {
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .about-values .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════
   GLOBAL SMOOTH SCROLL & OVERFLOW
   ════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* ════════════════════════════════════════════════════════════
   POPULAR PAGE — Bridge filter-tab-btn to filter-pill styles
   ════════════════════════════════════════════════════════════ */
.filter-tab-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--neutral-600);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.filter-tab-btn:hover {
  background: var(--highlight);
  color: var(--primary);
  border-color: var(--primary-light);
}

.filter-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.filter-search-wrapper {
  position: relative;
  min-width: 200px;
}

.filter-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  font-size: 0.875rem;
}

.filter-search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Popular card subtitle for consistency */
.popular-subtitle {
  text-align: center;
  color: var(--neutral-500);
  font-size: 0.975rem;
  margin-bottom: 1.75rem;
  margin-top: -0.5rem;
}

/* Popular card — consistent spacing */
.popular-card {
  border: 1px solid var(--neutral-200);
  transition: transform var(--transition-std), box-shadow var(--transition-std), border-color var(--transition-std);
}

.popular-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.popular-card.hidden {
  display: none;
}

/* ════════════════════════════════════════════════════════════
   ABOUT PAGE — Grid responsive for values section
   ════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .about-values .grid-cols-3 {
    grid-template-columns: 1fr 1fr !important;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .about-values .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
}

/* ════════════════════════════════════════════════════════════
   ITEM PAGE — Purchase card border-top accent
   ════════════════════════════════════════════════════════════ */
.purchase-card-v2,
.item-sidebar-card {
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

/* ════════════════════════════════════════════════════════════
   NO-RESULTS / EMPTY STATES
   ════════════════════════════════════════════════════════════ */
.no-results-container {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--neutral-200);
  margin-top: 1rem;
}

.no-results-icon {
  font-size: 3rem;
  color: var(--neutral-300);
  display: block;
  margin-bottom: 1rem;
}

.no-results-text {
  color: var(--neutral-500);
  font-size: 0.975rem;
}

/* ════════════════════════════════════════════════════════════
   GLOBAL FORM IMPROVEMENTS
   ════════════════════════════════════════════════════════════ */
select.form-control,
select[class*="form"],
select {
  font-family: var(--font-body);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

/* ════════════════════════════════════════════════════════════
   CATEGORY v2 CARDS — homepage grid polish
   ════════════════════════════════════════════════════════════ */
.catv2-card {
  transition: transform var(--transition-std), box-shadow var(--transition-std), border-color var(--transition-std);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
}

.catv2-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  border-color: var(--card-accent, var(--primary-light));
}

.catv2-title {
  font-family: var(--font-display) !important;
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════════
   PREMIUM CARDS (homepage featured resources)
   ════════════════════════════════════════════════════════════ */
.premium-card {
  border-radius: var(--radius-lg);
  transition: transform var(--transition-std), box-shadow var(--transition-std);
}

.premium-card:hover {
  transform: translateY(-5px) scale(1.01) !important;
  box-shadow: var(--shadow-hover) !important;
}

/* ════════════════════════════════════════════════════════════
   PAGE TITLE — consistent sizing across all pages
   ════════════════════════════════════════════════════════════ */
.page-title {
  font-weight: 800;
  line-height: 1.2;
  color: var(--neutral-900);
}

/* ════════════════════════════════════════════════════════════
   SEARCH PAGE — result card hover & spacing
   ════════════════════════════════════════════════════════════ */
.search-result-card {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition-std), border-color var(--transition-std), transform var(--transition-std);
}

.search-result-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

/* ════════════════════════════════════════════════════════════
   RECENT CARD BUY BUTTONS
   ════════════════════════════════════════════════════════════ */
.recent-card-price-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white !important;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 700;
  transition: all var(--transition-fast) !important;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.15);
  text-decoration: none;
}

.recent-card-price-btn--free {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 2px 6px rgba(3, 105, 161, 0.15);
}

.recent-card:hover .recent-card-price-btn {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.25);
}

.recent-card:hover .recent-card-price-btn--free {
  box-shadow: 0 4px 10px rgba(3, 105, 161, 0.25);
}

.sr-card:hover .recent-card-price-btn {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.25);
}

.sr-card:hover .recent-card-price-btn--free {
  box-shadow: 0 4px 10px rgba(3, 105, 161, 0.25);
}

/* ════════════════════════════════════════════════════════════
   SHOPPING CART & CHECKOUT STYLES
   ════════════════════════════════════════════════════════════ */
/* Header Cart Button & Badge */
.header-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(4, 120, 87, 0.07);
  border: 1px solid rgba(4, 120, 87, 0.16);
  color: var(--primary) !important;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  margin-right: 0.5rem;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 3px rgba(4, 120, 87, 0.08);
  cursor: pointer;
}

.header-cart-btn img,
.header-cart-btn .header-cart-img {
  width: 26px;
  height: 26px;
  flex-shrink: 0 !important;
  object-fit: contain !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 1px 2px rgba(4, 120, 87, 0.15));
}

.header-cart-btn:hover {
  background: rgba(4, 120, 87, 0.14);
  border-color: var(--primary-light);
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.22);
  transform: translateY(-2px);
}

.header-cart-btn:hover img,
.header-cart-btn:hover .header-cart-img {
  transform: scale(1.12) rotate(-5deg);
}

.cart-count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: none;
  /* Controlled by JS class assignment */
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

.header-cart-btn.has-items .cart-count-badge {
  display: inline-flex;
  animation: cartBadgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cartBadgePop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Add to Cart Button on Cards */
.add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast) !important;
  text-decoration: none;
  white-space: nowrap;
}

.add-to-cart-btn:hover {
  background: var(--primary);
  color: white !important;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

.add-to-cart-btn.added {
  background: var(--neutral-100) !important;
  color: var(--neutral-400) !important;
  border-color: var(--neutral-200) !important;
  cursor: default;
  box-shadow: none !important;
  transform: none !important;
}

/* Card Price Display */
.recent-card-price-new {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--neutral-900);
}

.recent-card-price-new--free {
  color: var(--green-600);
}

/* Consolidated Card Footer */
.recent-card-footer-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  width: 100%;
}

/* Shared Cart Welcome Banner */
.shared-cart-banner {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #ffffff 100%);
  border: 1px solid #a7f3d0;
  border-left: 4px solid #059669;
  border-radius: 14px;
  padding: 1.15rem 1.4rem;
  margin: 1rem 0 1.75rem 0;
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  animation: sharedCartSlideDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.shared-cart-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

@keyframes sharedCartSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shared-cart-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.shared-cart-banner-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex: 1;
  min-width: 0;
}

.shared-cart-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.shared-cart-info {
  flex: 1;
  min-width: 0;
}

.shared-cart-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.shared-cart-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #064e3b;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.shared-cart-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shared-cart-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #374151;
}

.shared-cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #bbf7d0;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 700;
  color: #047857;
}

.shared-cart-price-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #047857;
  color: #ffffff;
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 1px 3px rgba(4, 120, 87, 0.2);
}

.shared-cart-dismiss-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.shared-cart-dismiss-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #111827;
}

@media (max-width: 640px) {
  .shared-cart-banner {
    padding: 1rem;
  }

  .shared-cart-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .shared-cart-banner-left {
    align-items: flex-start;
    gap: 0.85rem;
  }

  .shared-cart-icon {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
    border-radius: 10px;
  }

  .shared-cart-title {
    font-size: 1rem;
  }

  .shared-cart-desc {
    font-size: 0.875rem;
  }

  .shared-cart-dismiss-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* Cart Checkout Page Styles */
.cart-page-container {
  max-width: 1140px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.cart-items-section {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 1.4rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
}

.cart-item-row:last-child {
  margin-bottom: 0;
}

.cart-item-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Lightweight Red X Button on the Right */
.cart-item-remove-btn,
.cart-item-remove {
  background: transparent;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin-left: auto;
  width: 32px;
  height: 32px;
  outline: none;
}

.cart-item-remove-btn:hover,
.cart-item-remove:hover {
  background: #fee2e2;
  color: #b91c1c;
  transform: scale(1.12);
}

.cart-item-remove-btn svg,
.cart-item-remove svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.75;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-item-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.cart-item-category {
  font-size: 0.88rem;
  font-weight: 500;
  color: #0d9488;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cart-item-price {
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.3;
  margin-top: 0.1rem;
}

/* Mobile cart item row adjustments */
@media (max-width: 768px) {
  .cart-item-row {
    gap: 0.9rem;
    padding: 1rem;
  }

  .cart-item-title {
    font-size: 0.88rem;
  }

  .cart-item-category {
    font-size: 0.82rem;
  }

  .cart-item-price {
    font-size: 0.88rem;
  }
}

/* ════════════════════════════════════════════════════════════
   ENTERPRISE ORDER SUMMARY CONTAINER & CHECKOUT SYSTEM
   ════════════════════════════════════════════════════════════ */
.cart-summary-section {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  padding: 1.5rem;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  position: sticky;
  top: 96px;
  z-index: 10;
  transition: border-color var(--transition-std), box-shadow var(--transition-std);
}

.cart-summary-section:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
}

/* Toolbar header matching Selected Items */
.cart-summary-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--neutral-200);
}

.cart-summary-toolbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--neutral-800);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-display);
}

.cart-summary-toolbar-title i {
  color: var(--primary);
  font-size: 1.18rem;
}

.cart-summary-toolbar-badge {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* Financial breakdown ledger */
.cart-breakdown-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.breakdown-line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.86rem;
  color: #64748b;
}

.breakdown-item-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-weight: 500;
}

.breakdown-item-name i {
  color: #94a3b8;
  font-size: 0.95rem;
}

.breakdown-item-value {
  font-weight: 600;
  color: #1e293b;
}

.breakdown-pill-instant {
  background: #ecfdf5;
  color: #047857;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #a7f3d0;
}

.breakdown-item-free {
  font-weight: 700;
  color: #059669;
  background: #dcfce7;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
}

/* Callout Total */
.cart-total-callout {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cart-total-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-total-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cart-total-subtitle {
  font-size: 0.71rem;
  color: #64748b;
  font-weight: 500;
}

.cart-total-display {
  font-size: 1.45rem;
  font-weight: 800;
  color: #047857;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Payment section container */
.cart-checkout-payment-box {
  display: flex;
  flex-direction: column;
}

/* Payment Method Card */
.payment-method-card {
  background: #ffffff;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.05);
}

.pm-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pm-brand-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.pm-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pm-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.pm-hint {
  font-size: 0.72rem;
  color: #15803d;
  font-weight: 600;
}

.pm-secure-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  color: #047857;
  background: #f0fdf4;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid #bbf7d0;
  white-space: nowrap;
}

/* Form fields */
.cart-checkout-form {
  display: flex;
  flex-direction: column;
}

.checkout-input-group {
  margin-bottom: 0.95rem;
}

.checkout-input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.81rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
}

.label-optional {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
}

.label-badge-hint {
  font-size: 0.7rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  padding: 1px 6px;
  border-radius: 4px;
}

.checkout-input-control {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.checkout-input-control:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(4, 120, 87, 0.12);
}

.input-addon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  color: #94a3b8;
  font-size: 1rem;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.input-addon-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0.75rem;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
}

.ke-flag-svg {
  display: inline-block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.checkout-text-input {
  flex: 1;
  border: none;
  padding: 0.75rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  width: 100%;
  background: transparent;
  font-family: inherit;
}

.checkout-text-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.checkout-field-micro {
  display: block;
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 0.35rem;
  line-height: 1.4;
  transition: all var(--transition-fast);
}

.checkout-field-micro.is-valid {
  color: #059669 !important;
  font-weight: 600;
}

.checkout-field-micro.is-invalid {
  color: #e11d48 !important;
  font-weight: 600;
}

.checkout-input-control.is-valid {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14) !important;
}

.checkout-input-control.is-invalid {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14) !important;
}

.input-addon-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.input-addon-status .bi-check-circle-fill {
  color: #10b981;
}

.input-addon-status .bi-x-circle-fill {
  color: #f43f5e;
}

.label-badge-hint.is-valid,
.label-optional.is-valid {
  background: #dcfce7 !important;
  color: #15803d !important;
  padding: 1px 6px;
  border-radius: 4px;
}

.label-badge-hint.is-invalid,
.label-optional.is-invalid {
  background: #ffe4e6 !important;
  color: #be123c !important;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Item page input validation states */
.mpesa-input-v2.is-valid {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14) !important;
}

.mpesa-input-v2.is-invalid {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14) !important;
}

.mpesa-field-feedback {
  font-size: 0.73rem;
  color: #64748b;
  margin: -0.4rem 0 0.65rem 0;
  text-align: left;
  line-height: 1.35;
  transition: all var(--transition-fast);
}

.mpesa-field-feedback.is-valid {
  color: #059669 !important;
  font-weight: 600;
}

.mpesa-field-feedback.is-invalid {
  color: #e11d48 !important;
  font-weight: 600;
}

/* Primary checkout CTA button */
.btn-checkout-primary {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.28);
  touch-action: manipulation;
  margin-top: 0.75rem;
  font-family: var(--font-display);
}

.btn-checkout-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(4, 120, 87, 0.38);
}

.btn-checkout-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.2);
}

.btn-checkout-primary:disabled,
.btn-checkout-primary.btn-checkout-disabled,
#mpesa-btn-desktop:disabled,
#mpesa-btn-mobile:disabled {
  background: #cbd5e1 !important;
  color: #64748b !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.85 !important;
}

/* Notice boxes (Maintenance & Account Required) */
.cart-notice-box {
  padding: 1.15rem;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.cart-notice-box--warning {
  background: #fffbeb;
  border: 1px solid #fef3c7;
}

.cart-notice-box--warning .notice-icon {
  font-size: 1.5rem;
  color: #d97706;
  flex-shrink: 0;
  line-height: 1;
}

.cart-notice-box--warning .notice-title {
  color: #92400e;
  font-weight: 700;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
}

.cart-notice-box--warning .notice-desc {
  font-size: 0.82rem;
  color: #78350f;
  margin: 0 0 0.85rem 0;
  line-height: 1.45;
}

.btn-whatsapp-order {
  background: #25D366;
  color: #ffffff;
  border: none;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
  transition: all var(--transition-fast);
}

.btn-whatsapp-order:hover {
  background: #20ba59;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.cart-notice-box--info {
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.cart-notice-box--info .notice-icon {
  font-size: 1.5rem;
  color: #2563eb;
  flex-shrink: 0;
  line-height: 1;
}

.cart-notice-box--info .notice-title {
  color: #1e40af;
  font-weight: 700;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
}

.cart-notice-box--info .notice-desc {
  font-size: 0.82rem;
  color: #1e3a8a;
  margin: 0 0 0.85rem 0;
  line-height: 1.45;
}

.notice-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-notice-signin {
  flex: 1;
  background: var(--primary);
  color: #ffffff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.btn-notice-signin:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.btn-notice-register {
  flex: 1;
  background: #475569;
  color: #ffffff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.btn-notice-register:hover {
  background: #334155;
  color: #ffffff;
}

/* Polling Status Radar Box */
.cart-mpesa-status-box {
  text-align: center;
  padding: 1.75rem 1rem;
  background: #f8fafc;
  border: 1.5px dashed #86efac;
  border-radius: 12px;
  margin-top: 0.5rem;
}

.status-pulse-radar {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-center {
  width: 44px;
  height: 44px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
  position: relative;
  z-index: 2;
}

.radar-ping {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.25);
  animation: radarPulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: 1;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.status-title-v2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #047857;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.status-desc-v2 {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.mpesa-success-icon-v2 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Trust footer */
.cart-trust-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.trust-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.trust-pill-item i {
  color: #10b981;
  font-size: 0.82rem;
}

.trust-pill-divider {
  color: #cbd5e1;
  font-size: 0.7rem;
}

.cart-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.cart-empty-icon {
  font-size: 3.5rem;
  color: var(--neutral-300);
  margin-bottom: 1rem;
}

/* Redesigned recent-card styling to match the screenshot */
.recent-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid var(--neutral-200);
  border-top: 3px solid var(--primary);
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition-std);
  align-items: stretch !important;
  gap: 0.9rem;
}

.recent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
  background: #ffffff;
}

.recent-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e40af;
  line-height: 1.4;
  margin: 0 0 0.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 4.1em;
}

.recent-card-category-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.recent-card-category-text {
  color: var(--primary);
}

.recent-card-price-text {
  color: #2563eb;
  font-weight: 700;
}

.recent-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--neutral-600);
}

.recent-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.recent-card-meta-item i {
  color: var(--primary);
  font-size: 1rem;
}

.recent-card-buttons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 0.5rem;
}

/* Buy Now Button (outline blue) */
.recent-card-btn-buy-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border: 1.5px solid #2563eb;
  border-radius: 6px;
  background: transparent;
  color: #2563eb !important;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast) !important;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.recent-card:hover .recent-card-btn-buy-now {
  background: #2563eb;
  color: #ffffff !important;
}

/* Download Free Button */
.recent-card-btn-download-free {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  background: transparent;
  color: var(--primary) !important;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast) !important;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.recent-card:hover .recent-card-btn-download-free {
  background: var(--primary);
  color: #ffffff !important;
}

/* Solid Green Add to Cart Button on Cards */
.recent-card .add-to-cart-btn {
  background: var(--primary) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 7px 16px !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  transition: all var(--transition-fast) !important;
  box-shadow: none !important;
}

.recent-card .add-to-cart-btn:hover {
  background: var(--primary-dark) !important;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2) !important;
}

.recent-card .add-to-cart-btn.added {
  background: var(--neutral-100) !important;
  color: var(--neutral-400) !important;
  border: 1px solid var(--neutral-200) !important;
  cursor: default !important;
  box-shadow: none !important;
}

/* ════════════════════════════════════════════════════════════
   HEADER SEARCH BAR & COMPACT NAV
   ════════════════════════════════════════════════════════════ */
/* Protect logo from shrinking or being squeezed */
.logo {
  flex-shrink: 0 !important;
}

/* ════════════════════════════════════════════════════════════
   STICKY HEADER NAVIGATION
   ════════════════════════════════════════════════════════════ */
.sticky-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  background-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  z-index: 1000 !important;
  width: 100% !important;
}

/* Header Container Compact & Robust Alignment */
.header-container {
  max-width: 1440px !important;
  margin: 0 auto !important;
  padding: 0 1.25rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 0.75rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.logo {
  flex-shrink: 0 !important;
}

.header-logo {
  height: 38px !important;
  width: auto !important;
}

.share-channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
  .share-channels-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .share-channels-grid {
    grid-template-columns: 1fr;
  }
}

.share-channel-btn {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: none;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.share-channel-btn--whatsapp {
  background: #25D366;
}

.share-channel-btn--whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
  color: #ffffff;
}

.share-channel-btn--facebook {
  background: #1877F2;
}

.share-channel-btn--facebook:hover {
  background: #1464cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.35);
  color: #ffffff;
}

.share-channel-btn--telegram {
  background: #229ED9;
}

.share-channel-btn--telegram:hover {
  background: #1d8bc0;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 158, 217, 0.35);
  color: #ffffff;
}

.share-channel-btn--twitter {
  background: #0f1419;
}

.share-channel-btn--twitter:hover {
  background: #000000;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 20, 25, 0.35);
  color: #ffffff;
}

.share-channel-btn--email {
  background: #475569;
}

.share-channel-btn--email:hover {
  background: #334155;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(71, 85, 105, 0.35);
  color: #ffffff;
}

.share-channel-btn--native {
  background: #0284c7;
}

.share-channel-btn--native:hover {
  background: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  color: #ffffff;
}

/* Desktop only menu nav rules */
@media (min-width: 769px) {
  .main-nav {
    flex: 0 1 auto !important;
    /* Never push right-side elements off screen */
    justify-content: center !important;
    gap: clamp(0.15rem, 0.45vw, 0.75rem) !important;
    min-width: 0 !important;
  }

  .main-nav .nav-dropdown-toggle {
    padding: 0.35rem 0.45rem !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Desktop Header Search Bar (Modern Capsule Design matching screenshot)
───────────────────────────────────────────────────────────────────────────── */
.header-search-form {
  position: relative;
  flex: 0 1 230px;
  width: 100%;
  max-width: 250px;
  min-width: 170px;
  margin: 0 0.25rem;
  transition: flex var(--transition-std), max-width var(--transition-std);
}

.header-search-form:focus-within {
  flex: 0 1 270px;
  max-width: 290px;
}

.header-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  background-color: #f1f5f9;
  border: 1.5px solid #dce4ec;
  border-radius: 9999px;
  padding: 2px 3px 2px 12px;
  box-sizing: border-box;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header-search-wrapper:hover {
  background-color: #eef3f8;
  border-color: #cbd5e1;
}

.header-search-wrapper:focus-within {
  background-color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.header-search-icon {
  color: #94a3b8;
  font-size: 0.88rem;
  margin-right: 6px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color var(--transition-fast);
}

.header-search-wrapper:focus-within .header-search-icon {
  color: #3b82f6;
}

.header-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.88rem;
  font-family: inherit;
  color: #1e293b;
  padding: 0 3px !important;
}

.header-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  opacity: 1;
}

.header-search-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
  font-family: inherit;
  transition: opacity var(--transition-fast);
}

.header-search-wrapper:focus-within .header-search-kbd {
  opacity: 0.35;
}

.header-search-submit-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #52b788;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(82, 183, 136, 0.3);
}

.header-search-submit-btn i {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.header-search-submit-btn:hover {
  background: #40916c;
  box-shadow: 0 2px 6px rgba(64, 145, 108, 0.4);
  transform: scale(1.04);
}

.header-search-submit-btn:hover i {
  transform: translateX(1.5px);
}

.header-search-submit-btn:active {
  transform: scale(0.96);
}

/* User Menu & Login Button: Protected from being pushed off */
.user-menu {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  /* CRITICAL: Never gets pushed off screen */
  margin-left: 0.25rem !important;
}

.guest-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.guest-actions .btn-primary {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 0.45rem 1.15rem !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.user-dropdown-toggle {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  padding: 0.42rem 0.75rem !important;
  font-size: 0.84rem !important;
  max-width: 175px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

.user-name-text {
  max-width: 105px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.user-dropdown-menu {
  right: 0 !important;
  left: auto !important;
  max-width: calc(100vw - 20px) !important;
}

.header-cart-btn {
  flex-shrink: 0 !important;
  margin-right: 0 !important;
  width: 38px !important;
  height: 38px !important;
}

.header-search-desktop {
  display: block;
}

/* Hide mobile search toggle and overlay by default on desktop */
.mobile-search-toggle-btn,
.mobile-search-overlay {
  display: none;
}

/* Tablet & Desktop Granular Responsive Breakpoints to Prevent 100% Zoom Overflow */
@media (min-width: 769px) and (max-width: 1366px) {
  .header-container {
    padding: 0 0.85rem !important;
    gap: 0.45rem !important;
  }

  .main-nav {
    gap: 0.22rem !important;
  }

  .main-nav .nav-dropdown-toggle {
    padding: 0.3rem 0.36rem !important;
    font-size: 0.80rem !important;
  }

  .header-search-form {
    flex: 0 1 170px !important;
    max-width: 185px !important;
    min-width: 120px !important;
    margin: 0 0.15rem !important;
  }

  .header-search-kbd {
    display: none !important;
  }

  .user-dropdown-toggle {
    padding: 0.35rem 0.65rem !important;
    max-width: 155px !important;
  }

  .user-name-text {
    max-width: 90px !important;
  }
}

@media (min-width: 769px) and (max-width: 1180px) {

  /* On compact desktop/tablets where horizontal space is constrained,
     switch to compact search toggle icon button to free 180px+ */
  .header-search-desktop {
    display: none !important;
  }

  .mobile-search-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: transparent !important;
    border: none !important;
    color: var(--neutral-700) !important;
    font-size: 1.15rem !important;
    cursor: pointer !important;
    margin: 0 0.25rem 0 auto !important;
    flex-shrink: 0 !important;
    transition: color var(--transition-fast) !important;
  }

  .mobile-search-toggle-btn:hover {
    color: var(--primary) !important;
  }

  .main-nav .nav-dropdown-toggle {
    padding: 0.26rem 0.3rem !important;
    font-size: 0.77rem !important;
  }

  .user-dropdown-toggle {
    max-width: 135px !important;
    padding: 0.32rem 0.55rem !important;
  }

  .user-name-text {
    max-width: 75px !important;
  }
}

/* Desktop Defaults for Mobile-Only Drawer Components (Zero Desktop Impact) */
@media (min-width: 769px) {

  .mobile-drawer-header,
  .mobile-drawer-actions,
  .mobile-nav-section-label,
  .nav-toggle-icon,
  .mobile-menu-toggle {
    display: none !important;
  }

  .mobile-drawer-body {
    display: contents !important;
  }
}

/* ════════════════════════════════════════════════════════════
   ENTERPRISE WORLD-CLASS MOBILE NAVIGATION DRAWER (< 768px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .header-search-desktop {
    display: none !important;
  }

  /* 1. Header Container on Mobile */
  .header-container {
    padding: 0 1rem !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    position: relative !important;
  }

  .header-logo {
    height: 38px !important;
    width: auto !important;
  }

  .header-actions-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
  }

  /* 2. Mobile Search Toggle Button */
  .mobile-search-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    background: transparent !important;
    border: none !important;
    color: var(--neutral-700) !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    margin-left: auto !important;
    margin-right: 0.2rem !important;
    border-radius: 8px !important;
  }

  .mobile-search-toggle-btn:hover,
  .mobile-search-toggle-btn:focus-visible {
    color: var(--primary) !important;
    background: rgba(2, 132, 199, 0.08) !important;
  }

  /* 3. Header Cart Button on Mobile */
  .header-cart-btn {
    margin-left: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 8px !important;
  }

  .header-cart-img {
    width: 24px !important;
    height: 24px !important;
  }

  /* 4. Sleek Modern Hamburger Menu Button */
  .mobile-menu-toggle {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    padding: 8px 9px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    gap: 4px !important;
    transition: all 0.25s ease !important;
    z-index: 1001 !important;
    margin-left: 0.25rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:focus-visible {
    border-color: var(--primary) !important;
    background: #f0fdf4 !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15) !important;
  }

  .mobile-menu-toggle span {
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    background: #1e293b !important;
    border-radius: 2px !important;
    transition: transform 0.25s ease, opacity 0.25s ease !important;
    transform-origin: center !important;
  }

  .mobile-menu-toggle.active {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg) !important;
    background: #dc2626 !important;
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0 !important;
    transform: scale(0.5) !important;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg) !important;
    background: #dc2626 !important;
  }

  /* 5. Frosted Backdrop Blur Overlay */
  .mobile-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .mobile-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* 6. Unified Full-Height Slide-Over Navigation Drawer */
  .main-nav {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 88% !important;
    max-width: 360px !important;
    min-width: 285px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #ffffff !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.22) !important;
    transform: translateX(105%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
  }

  .main-nav.active {
    transform: translateX(0) !important;
  }

  /* 7. Drawer Top Header with Brand & Close Button */
  .mobile-drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1.15rem 1.25rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
    flex-shrink: 0 !important;
  }

  .mobile-drawer-logo {
    height: 34px !important;
    width: auto !important;
    display: block !important;
  }

  .mobile-drawer-close {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }

  .mobile-drawer-close:hover,
  .mobile-drawer-close:focus-visible {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    transform: scale(1.05) !important;
  }

  /* 8. Scrollable Drawer Body */
  .mobile-drawer-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1.15rem 1.15rem 2.5rem !important;
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e1 transparent !important;
  }

  .mobile-drawer-body::-webkit-scrollbar {
    width: 4px !important;
  }

  .mobile-drawer-body::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
  }

  .mobile-nav-section-label {
    display: block !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    margin: 0 0 0.75rem 0.25rem !important;
  }

  /* 9. Navigation Items — Enterprise 52px+ Comfortable Touch Targets */
  .nav-dropdown {
    width: 100% !important;
    margin-bottom: 0.55rem !important;
  }

  .main-nav .nav-dropdown-toggle {
    width: 100% !important;
    min-height: 52px !important;
    padding: 0.75rem 1rem !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-transform: none !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    user-select: none !important;
  }

  .main-nav .nav-dropdown-toggle:hover,
  .main-nav .nav-dropdown-toggle:active {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
  }

  .main-nav .nav-dropdown.active .nav-dropdown-toggle {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
    color: #166534 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12) !important;
  }

  .nav-toggle-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  .nav-toggle-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
    background: rgba(2, 132, 199, 0.08) !important;
    color: var(--primary, #0284c7) !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
  }

  .main-nav .nav-dropdown.active .nav-toggle-icon {
    background: #16a34a !important;
    color: #ffffff !important;
  }

  .nav-toggle-label {
    font-size: 0.93rem !important;
    font-weight: 600 !important;
    color: inherit !important;
    line-height: 1.2 !important;
  }

  .main-nav .nav-chevron {
    width: 26px !important;
    height: 26px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    color: #94a3b8 !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
  }

  .main-nav .nav-dropdown.active .nav-chevron {
    transform: rotate(180deg) !important;
    color: #166534 !important;
  }

  /* 10. Submenu Accordion on Mobile */
  .mega-dropdown {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .main-nav .nav-dropdown.active .mega-dropdown {
    max-height: 800px !important;
  }

  .mega-dropdown-inner {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 3.5px solid var(--primary, #0284c7) !important;
    border-radius: 12px !important;
    margin: 0.35rem 0 0.65rem !important;
    padding: 0.4rem !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  }

  .mega-dropdown-header {
    display: none !important;
  }

  .mega-dropdown-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .mega-dropdown-item {
    min-height: 44px !important;
    padding: 0.65rem 0.85rem !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
  }

  .mega-dropdown-item:hover,
  .mega-dropdown-item:active {
    background: #ffffff !important;
    color: var(--primary, #0284c7) !important;
    font-weight: 600 !important;
  }

  .mega-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #94a3b8 !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease !important;
  }

  .mega-dropdown-item:hover .mega-dot {
    background: var(--primary, #0284c7) !important;
    transform: scale(1.2) !important;
  }

  .mega-dropdown-viewall {
    min-height: 42px !important;
    padding: 0.65rem 0.85rem !important;
    margin-top: 4px !important;
    border-top: 1px dashed #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: var(--primary, #0284c7) !important;
    text-decoration: none !important;
    border-radius: 6px !important;
  }

  /* 11. Integrated Mobile Auth Section (Fixes 500px Wide Void Between More & Login!) */
  .mobile-drawer-actions {
    margin-top: 1.5rem !important;
    padding-top: 1.25rem !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
  }

  /* Guest Cards */
  .mobile-guest-card {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 1.15rem 1rem !important;
  }

  .mobile-guest-header {
    margin-bottom: 0.95rem !important;
  }

  .mobile-guest-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #047857 !important;
    background: #ecfdf5 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    border: 1px solid #a7f3d0 !important;
    margin-bottom: 0.35rem !important;
  }

  .mobile-guest-title {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.01em !important;
  }

  .mobile-guest-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
  }

  .mobile-drawer-btn {
    width: 100% !important;
    height: 48px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.55rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }

  .mobile-drawer-btn-login {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  }

  .mobile-drawer-btn-login:active {
    transform: scale(0.98) !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
  }

  .mobile-drawer-btn-register {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1 !important;
  }

  .mobile-drawer-btn-register:active {
    background: #f1f5f9 !important;
  }

  /* Logged-in User Profile Card */
  .mobile-user-card {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.95rem 1rem !important;
  }

  .mobile-user-avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: #e0f2fe !important;
    color: var(--primary, #0284c7) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    flex-shrink: 0 !important;
  }

  .mobile-user-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    overflow: hidden !important;
  }

  .mobile-user-name {
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .mobile-user-role-badge {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #059669 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
  }

  .mobile-user-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .mobile-drawer-btn-admin {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    height: 44px !important;
  }

  .mobile-drawer-btn-profile {
    background: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
    height: 44px !important;
  }

  .mobile-drawer-btn-secondary {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    height: 44px !important;
  }

  .mobile-drawer-btn-logout {
    background: transparent !important;
    color: #64748b !important;
    border: 1px dashed #cbd5e1 !important;
    height: 42px !important;
    font-size: 0.88rem !important;
  }

  /* 12. Support Footer Inside Mobile Drawer */
  .mobile-drawer-support {
    background: #f8fafc !important;
    border-radius: 12px !important;
    padding: 0.85rem 1rem !important;
    border: 1px solid #f1f5f9 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem !important;
    margin-top: 0.5rem !important;
  }

  .mobile-support-header {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #94a3b8 !important;
  }

  .mobile-support-link {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: var(--primary, #0284c7) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
  }

  .mobile-support-pill {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
  }

  /* 13. Hide Legacy Disconnected Floating user-menu on Mobile */
  .user-menu {
    display: none !important;
  }

  /* 14. Mobile Search Overlay Form */
  .mobile-search-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    z-index: 1010 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 1rem !important;
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  }

  .mobile-search-overlay.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mobile-search-overlay-form {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    gap: 0.75rem !important;
  }

  .mobile-search-overlay-input {
    flex: 1 !important;
    height: 44px !important;
    border: none !important;
    background: transparent !important;
    font-size: 1.05rem !important;
    font-family: var(--font-body, sans-serif) !important;
    color: var(--neutral-900, #0f172a) !important;
    outline: none !important;
    border-bottom: 2px solid var(--neutral-200, #e2e8f0) !important;
    transition: border-color var(--transition-std) !important;
    padding: 0.25rem 0 !important;
  }

  .mobile-search-overlay-input:focus {
    border-color: var(--primary, #0284c7) !important;
  }

  .mobile-search-close-btn,
  .mobile-search-overlay-submit {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    color: var(--neutral-500, #64748b) !important;
    transition: color var(--transition-fast), transform var(--transition-fast) !important;
  }

  .mobile-search-close-btn:hover,
  .mobile-search-close-btn:focus-visible {
    color: var(--danger, #ef4444) !important;
    transform: scale(1.05) !important;
  }

  .mobile-search-overlay-submit:hover,
  .mobile-search-overlay-submit:focus-visible {
    color: var(--primary, #0284c7) !important;
    transform: scale(1.05) !important;
  }
}

/* ════════════════════════════════════════════════════════════
   MOBILE FOOTER CART RIBBON
   ════════════════════════════════════════════════════════════ */
.mobile-cart-ribbon {
  display: none;
}

@media (max-width: 768px) {
  .mobile-cart-ribbon {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #064e3b;
    color: #ffffff !important;
    justify-content: space-between;
    align-items: center;
    padding: 0.95rem 1.25rem;
    z-index: 1001;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    text-decoration: none !important;
    transition: transform var(--transition-fast) ease-in-out, opacity var(--transition-fast) ease-in-out;
  }

  .mobile-cart-ribbon.visible {
    display: flex;
  }

  .mobile-cart-ribbon__left,
  .mobile-cart-ribbon__right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    line-height: 1;
    white-space: nowrap;
    transition: opacity 0.2s ease;
  }

  .mobile-cart-ribbon__left:active,
  .mobile-cart-ribbon__right:active {
    opacity: 0.85;
  }

  .mobile-cart-ribbon__left i,
  .mobile-cart-ribbon__right i {
    font-size: 1.35rem;
    color: #ffffff;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Rise floating buttons on mobile when cart ribbon is visible to avoid overlapping */
  body.has-mobile-cart-ribbon .whatsapp-float {
    bottom: 80px !important;
  }

  body.has-mobile-cart-ribbon .back-to-top {
    bottom: 80px !important;
  }
}

/* ════════════════════════════════════════════════════════════
   FILE FORMAT ICONS & TITLE ALIGNMENT
   ════════════════════════════════════════════════════════════ */
.cbe-file-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.cbe-file-icon-word {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.cbe-file-icon-pdf {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  object-fit: contain;
}

.recent-card-title .cbe-file-icon,
.popular-card-title .cbe-file-icon,
.page-title .cbe-file-icon {
  margin-right: 0.35rem;
  vertical-align: -2px;
}

/* ════════════════════════════════════════════════════════════
   SHARE CART MODAL
   ════════════════════════════════════════════════════════════ */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.share-modal {
  background: #ffffff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.share-modal-overlay.active .share-modal {
  transform: scale(1) translateY(0);
}

.share-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--neutral-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #f8fafc;
}

.share-modal-header-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-modal-header-text p {
  font-size: 0.85rem;
  color: var(--neutral-500);
  margin: 0;
}

.share-modal-close {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--neutral-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-modal-close:hover {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

.share-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.share-link-group {
  margin-bottom: 1.5rem;
}

.share-link-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neutral-700);
  margin-bottom: 0.5rem;
}

.share-link-input-wrap {
  display: flex;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--neutral-200);
  border-radius: 10px;
  font-size: 0.88rem;
  background: #f8fafc;
  color: var(--neutral-800);
  font-family: monospace;
  outline: none;
  transition: border-color var(--transition-fast);
}

.share-link-input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.share-copy-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.share-copy-btn:hover {
  background: var(--primary-dark, #1d4ed8);
}

.share-copy-btn.copied {
  background: #10b981 !important;
}

/* Share Channels */
.share-channels-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neutral-700);
  margin: 0 0 0.75rem;
}

.share-channels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
  .share-channels-grid {
    grid-template-columns: 1fr;
  }
}

.share-channel-btn {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-channel-btn--whatsapp {
  background: #25D366;
}

.share-channel-btn--whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
  color: #ffffff;
}

.share-channel-btn--native {
  background: #0284c7;
}

.share-channel-btn--native:hover {
  background: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.share-channel-btn--email {
  background: #475569;
}

.share-channel-btn--email:hover {
  background: #334155;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(71, 85, 105, 0.35);
}

.cart-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--neutral-200);
}

.cart-toolbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--neutral-800);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cart-toolbar-badge {
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  min-width: 20px;
  text-align: center;
  display: inline-block;
  line-height: 1.4;
}

.cart-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-text-desktop {
  display: inline;
}

.btn-text-mobile {
  display: none;
}

.btn-cart-share-action {
  background: #f0fdf4;
  color: #15803d;
  border: 1.5px solid #86efac;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  box-shadow: 0 1px 2px rgba(21, 128, 61, 0.05);
}

.btn-cart-share-action:hover {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.25);
  transform: translateY(-1px);
}

.btn-cart-clear-action {
  background: #ffffff;
  color: #64748b;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.btn-cart-clear-action:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* Mobile Responsiveness for Toolbar (Screens <= 576px) */
@media (max-width: 576px) {
  .cart-page-container {
    padding: 0 0.75rem;
    margin: 1.25rem auto 2.5rem;
  }

  .cart-items-section {
    padding: 1rem 0.85rem;
    border-radius: 14px;
  }

  .cart-summary-section {
    padding: 1rem 0.85rem;
    border-radius: 14px;
    position: static;
  }

  .cart-actions-toolbar,
  .cart-summary-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap !important;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    gap: 6px;
  }

  .cart-toolbar-title,
  .cart-summary-toolbar-title {
    font-size: 0.95rem;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .cart-toolbar-badge,
  .cart-summary-toolbar-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
  }

  .cart-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
  }

  .btn-cart-share-action {
    padding: 4px 9px;
    font-size: 0.76rem;
    gap: 4px;
    border-radius: 16px;
    white-space: nowrap;
  }

  .btn-cart-clear-action {
    padding: 4px 8px;
    font-size: 0.76rem;
    gap: 4px;
    border-radius: 16px;
    white-space: nowrap;
  }

  .btn-text-desktop {
    display: none !important;
  }

  .btn-text-mobile {
    display: inline !important;
  }

  .cart-total-display {
    font-size: 1.25rem;
  }

  .btn-checkout-primary {
    padding: 0.8rem 1rem;
    font-size: 0.94rem;
  }
}

/* Extra-small mobile screens (e.g. iPhone SE, 320px - 380px) */
@media (max-width: 380px) {

  .cart-actions-toolbar,
  .cart-summary-toolbar {
    gap: 4px;
  }

  .cart-toolbar-title,
  .cart-summary-toolbar-title {
    font-size: 0.86rem;
    gap: 4px;
  }

  .cart-toolbar-badge,
  .cart-summary-toolbar-badge {
    font-size: 0.7rem;
    padding: 1px 5px;
  }

  .cart-toolbar-actions {
    gap: 4px;
  }

  .btn-cart-share-action {
    padding: 3px 7px;
    font-size: 0.72rem;
    gap: 3px;
  }

  .btn-cart-clear-action {
    padding: 3px 7px;
    font-size: 0.72rem;
    gap: 3px;
  }

  .cart-total-display {
    font-size: 1.15rem;
  }

  .btn-checkout-primary {
    padding: 0.75rem 0.85rem;
    font-size: 0.88rem;
  }
}

/* Order Summary Share Promotion Box */
.cart-share-promo-box {
  margin: 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.cart-share-promo-box p {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.btn-promo-share {
  width: 100%;
  background: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-promo-share:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Item Page Share Button */
.btn-item-share {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1.5px solid #10b981;
  border-radius: 10px;
  background: #f0fdf4;
  color: #059669;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: all var(--transition-fast);
}

.btn-item-share:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}


/* ════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ════════════════════════════════════════════════════════════ */
.cbe-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

body.has-mobile-cart-ribbon .cbe-toast-container {
  bottom: 84px;
}

.cbe-toast {
  pointer-events: auto;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 360px;
}

.cbe-toast.hide {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cbe-toast-icon {
  font-size: 1.2rem;
  color: #10b981;
}

.cbe-toast--info .cbe-toast-icon {
  color: #38bdf8;
}

.cbe-toast--warning .cbe-toast-icon {
  color: #fbbf24;
}

.cbe-toast-action-btn {
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  margin-left: auto;
  transition: background var(--transition-fast);
}

.cbe-toast-action-btn:hover {
  background: var(--primary-dark, #1d4ed8);
}

/* ═══════════════════════════════════════════════════════════════
   DOCUMENT 1.5-PAGE PREVIEW COMPONENT
   ═══════════════════════════════════════════════════════════════ */
.doc-preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  transition: box-shadow 0.3s ease;
}

.doc-preview-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.doc-preview-card-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.doc-preview-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-preview-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
}

.doc-preview-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.doc-preview-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-preview-sample-tag {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid #fde68a;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Toolbar */
.doc-preview-toolbar {
  padding: 0.65rem 1.25rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.doc-preview-page-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.doc-preview-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-preview-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
}

.doc-preview-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.doc-preview-zoom-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  min-width: 44px;
  text-align: center;
}

/* Reading Stage & Page 1 Preview Controller */
.doc-preview-scroll-hint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.doc-preview-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: 16px;
}

.doc-preview-sample-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
}

.doc-preview-stage-wrap {
  position: relative;
  background: #e2e8f0;
  padding: 1.5rem 1rem;
  max-height: none;
  overflow-y: visible;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid #cbd5e1;
}

.doc-preview-stage {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

/* Page Containers */
.doc-preview-page-container {
  width: 100%;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.doc-preview-page-header-strip {
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.doc-preview-page-1 {
  /* Complete Page 1 - Height strictly restricted to page 1 */
  max-height: 840px !important;
  overflow: hidden !important;
  position: relative;
}

/* Horizontal Scroll Viewport — Enables wide table panning, blocks vertical over-scroll */
.doc-preview-scroll-viewport {
  width: 100%;
  max-height: 780px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  position: relative;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: #059669 #f1f5f9;
}

.doc-preview-scroll-viewport.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
}

.doc-preview-scroll-viewport::-webkit-scrollbar {
  height: 8px;
}

.doc-preview-scroll-viewport::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.doc-preview-scroll-viewport::-webkit-scrollbar-thumb {
  background: #059669;
  border-radius: 4px;
}

.doc-preview-scroll-viewport::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

.doc-preview-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.96) 100%);
  pointer-events: none;
  z-index: 12;
}

/* DOCX Preview specific layout rules — Left anchored to allow full bidirectional scrolling & avoid right truncation */
#docx-host {
  padding: 1.25rem 4rem 1.25rem 1.5rem !important;
  min-width: 100%;
  width: max-content;
  max-height: none;
  overflow: visible !important;
  box-sizing: border-box;
  text-align: left !important;
  margin: 0 !important;
}

#docx-host .docx-wrapper,
.docx-wrapper {
  background: transparent !important;
  padding: 0 !important;
  display: block !important;
  overflow: visible !important;
  max-height: none;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

#docx-host .docx-wrapper>section.docx,
#docx-host section.docx,
.docx-wrapper>section.docx,
section.docx {
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  box-shadow: none !important;
  overflow: visible !important;
  max-height: 740px !important;
  max-width: none !important;
  width: max-content !important;
  min-width: 100% !important;
  text-align: left !important;
  align-self: flex-start !important;
}

#docx-host article,
.docx-wrapper article,
section.docx>article {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
}

#doc-preview-page-1-content {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  position: relative;
  text-align: left !important;
  margin: 0 !important;
  overflow: visible !important;
}

/* ==========================================================================
   DOCUMENT TABLE STRUCTURE PRESERVATION (DESKTOP & MOBILE)
   Prevents generic mobile responsive CSS (display: block on tr/td) from
   breaking Word .docx tables, curriculum schemes of work, and sample papers.
   ========================================================================== */
#doc-preview-section table,
#doc-preview-section thead,
#doc-preview-section tbody,
#doc-preview-section tr,
#doc-preview-section th,
#doc-preview-section td,
#docx-host table,
#docx-host thead,
#docx-host tbody,
#docx-host tr,
#docx-host th,
#docx-host td,
.docx-wrapper table,
.docx-wrapper thead,
.docx-wrapper tbody,
.docx-wrapper tr,
.docx-wrapper th,
.docx-wrapper td {
  box-sizing: border-box;
}

#doc-preview-section table,
#docx-host table,
.docx-wrapper table {
  display: table !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
  margin-bottom: 0 !important;
  overflow-x: visible !important;
}

#doc-preview-section thead,
#docx-host thead,
.docx-wrapper thead {
  display: table-header-group !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
}

#doc-preview-section thead tr,
#docx-host thead tr,
.docx-wrapper thead tr {
  display: table-row !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
}

#doc-preview-section tbody,
#docx-host tbody,
.docx-wrapper tbody {
  display: table-row-group !important;
}

#doc-preview-section tr,
#docx-host tr,
.docx-wrapper tr {
  display: table-row !important;
  margin-bottom: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

#doc-preview-section th,
#docx-host th,
.docx-wrapper th,
#doc-preview-section td,
#docx-host td,
.docx-wrapper td {
  display: table-cell !important;
  position: static !important;
  padding: 8px 10px !important;
  padding-left: 8px !important;
  text-align: left !important;
  border: 1px solid #cbd5e1 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#doc-preview-section td::before,
#doc-preview-section th::before,
#docx-host td::before,
#docx-host th::before,
.docx-wrapper td::before,
.docx-wrapper th::before {
  content: none !important;
  display: none !important;
}

.doc-preview-canvas {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

/* Anti-scraping Watermark */
.doc-preview-watermark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  opacity: 0.12;
  overflow: hidden;
  z-index: 10;
}

.doc-preview-watermark-overlay span {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #0f172a;
  transform: rotate(-25deg);
  white-space: nowrap;
  user-select: none;
}

/* Page 1 Lock Banner (Positioned Directly Below Page 1) */
.doc-preview-lock-card {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.doc-preview-lock-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 0 0 8px rgba(254, 243, 199, 0.5);
  animation: lockPulse 2s infinite ease-in-out;
}

@keyframes lockPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(217, 119, 6, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
  }
}

.doc-preview-lock-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.doc-preview-lock-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.55;
}

.doc-preview-lock-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-unlock-mpesa {
  width: 100%;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: none;
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-unlock-mpesa:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
  color: #ffffff;
}

.btn-unlock-cart {
  width: 100%;
  background: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-unlock-cart:hover {
  background: #f0fdf4;
  border-color: #15803d;
  color: #15803d;
}

/* Jump link in desktop sidebar purchase card */
.btn-jump-to-preview {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-jump-to-preview:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
}

/* Fullscreen Mode */
.doc-preview-card.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  border-radius: 0;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.doc-preview-card.is-fullscreen .doc-preview-stage-wrap {
  flex: 1;
  max-height: none;
}

/* Curriculum Alignment Fallback Preview */
.doc-sample-paper {
  padding: 2.5rem 2rem;
  font-family: 'Times New Roman', Times, serif;
  color: #1e293b;
  line-height: 1.7;
}

.doc-sample-header-box {
  text-align: center;
  border-bottom: 2px solid #334155;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.doc-sample-logo-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.doc-sample-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.92rem;
  font-family: 'DM Sans', sans-serif;
}

.doc-sample-meta-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
}

.doc-sample-meta-table tr:nth-child(odd) {
  background: #f8fafc;
}

.doc-sample-meta-label {
  font-weight: 700;
  color: #475569;
  width: 30%;
}

.doc-sample-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0f172a;
  border-left: 4px solid var(--primary);
  padding-left: 0.5rem;
  margin: 1.5rem 0 0.75rem;
}

.doc-sample-question-item {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .doc-preview-card-header {
    padding: 1rem;
  }

  .doc-preview-stage-wrap {
    padding: 1rem 0.5rem 0;
  }

  .doc-preview-lock-box {
    padding: 1.25rem 1rem;
  }

  .doc-preview-lock-title {
    font-size: 1.15rem;
  }

  .doc-preview-lock-desc {
    font-size: 0.825rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   COMPACT SIDE-BY-SIDE DOCUMENT DETAILS GRID
   ═══════════════════════════════════════════════════════════════ */
.item-details-card {
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.5rem;
}

.item-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.item-details-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cbc-verified-badge {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 4px 11px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cbc-format-badge {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
  padding: 4px 11px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.item-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

@media (max-width: 991px) {
  .item-details-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 680px) {
  .item-details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .item-details-card {
    padding: 1rem;
  }
}

@media (max-width: 380px) {
  .item-details-grid {
    grid-template-columns: 1fr;
  }
}

.item-detail-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  overflow: hidden;
}

.item-detail-chip:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.detail-chip-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.chip-icon--category {
  background: #eff6ff;
  color: #2563eb;
}

.chip-icon--level {
  background: #f5f3ff;
  color: #7c3aed;
}

.chip-icon--grade {
  background: #ecfdf5;
  color: #059669;
}

.chip-icon--term {
  background: #fffbeb;
  color: #d97706;
}

.chip-icon--views {
  background: #f0f9ff;
  color: #0284c7;
}

.chip-icon--date {
  background: #f1f5f9;
  color: #475569;
}

.detail-chip-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.item-detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}

.item-detail-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-details-trust-banner {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

/* ════════════════════════════════════════════════════════════
   CART REFERRAL BOX & TEACHER AFFILIATE WIDGETS
   ════════════════════════════════════════════════════════════ */
.cart-referral-group {
  margin-top: 0.35rem;
  margin-bottom: 0.65rem;
  padding: 0.4rem 0.6rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cart-referral-group:focus-within {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.08);
}

.cart-referral-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.cart-referral-toggle-row .checkout-input-label {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 0 !important;
  gap: 6px;
}

.cart-referral-toggle-row .checkout-input-label i {
  font-size: 0.8rem;
}

.cart-referral-toggle-row .label-optional {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Hide duplicate badge in toggle row when applied card is present */
.cart-referral-badge {
  display: none !important;
}

/* Compact input controls */
.cart-referral-control-wrap .checkout-input-control {
  min-height: 30px;
  height: 30px;
  padding: 0 0.3rem 0 0.5rem;
  border-radius: 6px;
  background: #ffffff;
}

.cart-referral-control-wrap .input-addon-icon {
  font-size: 0.72rem;
  color: #94a3b8;
}

.cart-referral-control-wrap .checkout-text-input {
  height: 28px;
  font-size: 0.76rem;
  padding: 0 0.35rem;
}

.cart-referral-control-wrap .checkout-text-input::placeholder {
  font-size: 0.72rem;
  color: #94a3b8;
}

.btn-apply-referral {
  height: 24px;
  padding: 0 0.6rem;
  background: #0f766e;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-apply-referral:hover {
  background: #115e59;
}

#cartReferralFeedback {
  font-size: 0.67rem !important;
  line-height: 1.2 !important;
  margin-top: 0.2rem !important;
  color: #64748b !important;
}

/* Applied Referral Slim Card */
.cart-applied-referral-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  gap: 0.45rem;
}

.cart-applied-referral-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.cart-applied-referral-left i {
  color: #059669;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cart-applied-code {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: #065f46;
  letter-spacing: 0.5px;
  background: #d1fae5;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
}

.cart-applied-desc {
  display: block;
  font-size: 0.67rem;
  color: #047857;
  font-weight: 500;
  line-height: 1.15;
}

.btn-remove-referral {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-remove-referral:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

/* ════════════════════════════════════════════════════════════
   UNIVERSAL AFFILIATE & PRODUCT SHARE ENGINE
   ════════════════════════════════════════════════════════════ */

/* Product Card Share Button */
.recent-card-btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1.5px solid #10b981;
  color: #047857 !important;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.recent-card-btn-share:hover {
  background: #10b981;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

/* Item Detail Page Prominent Share Button */
.btn-share-product-prominent {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1.5px solid #10b981;
  border-radius: 10px;
  background: #f0fdf4;
  color: #047857;
  font-weight: 700;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-share-product-prominent:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-share-product-prominent .share-btn-badge {
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.btn-share-product-prominent:hover .share-btn-badge {
  background: #ffffff;
  color: #047857;
}

/* Universal Share Modal Overlay */
.universal-share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.universal-share-dialog {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    transform: translateY(20px) scale(0.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.universal-share-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.universal-share-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.universal-share-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.universal-share-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-color, #0f172a);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.universal-share-subheading {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  margin: 0.15rem 0 0 0;
}

.universal-share-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.universal-share-close-btn:hover {
  background: var(--bg-surface-secondary, #f1f5f9);
  color: #0f172a;
}

.universal-share-body {
  padding: 1.5rem;
}

/* Affiliate Alert in Modal */
.affiliate-modal-alert {
  display: flex;
  gap: 0.75rem;
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.affiliate-alert-icon {
  color: #059669;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.affiliate-alert-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #065f46;
}

.affiliate-code-chip {
  font-family: monospace;
  background: #ffffff;
  border: 1px solid #6ee7b7;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.affiliate-alert-desc {
  font-size: 0.78rem;
  color: #047857;
  margin-top: 0.15rem;
  line-height: 1.35;
}

.guest-share-alert {
  display: flex;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: #475569;
  align-items: center;
}

/* URL Copy Field */
.universal-share-input-group {
  margin-bottom: 1.25rem;
}

.universal-share-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.universal-share-field-row {
  display: flex;
  gap: 0.5rem;
}

.universal-share-input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 8px;
  background: var(--bg-surface-secondary, #f8fafc);
  color: var(--text-color, #0f172a);
  font-size: 0.825rem;
  font-family: monospace;
}

.universal-share-btn-copy {
  padding: 0.65rem 1.25rem;
  border: none;
  background: #047857;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.universal-share-btn-copy:hover {
  background: #065f46;
}

.universal-share-btn-copy.copied {
  background: #10b981;
}

/* Social Buttons */
.universal-share-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.universal-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.universal-social-btn--whatsapp {
  background: #25D366;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.25);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
}

.universal-social-btn--whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-1px);
}

.universal-social-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
}

.universal-social-btn--native {
  background: #0f172a;
  color: #ffffff;
  border: none;
}

.universal-social-btn--telegram {
  background: #0088cc;
  color: #ffffff !important;
}

.universal-social-btn--telegram:hover {
  background: #0077b5;
}

.universal-social-btn--facebook {
  background: #1877f2;
  color: #ffffff !important;
}

.universal-social-btn--facebook:hover {
  background: #166fe5;
}

.universal-social-btn--twitter {
  background: #0f172a;
  color: #ffffff !important;
}

.universal-social-btn--twitter:hover {
  background: #000000;
}

/* ════════════════════════════════════════════════════════════
   FLOATING AFFILIATE QUICK-SHARE CHIP
   ════════════════════════════════════════════════════════════ */
.affiliate-floating-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  animation: floatUp 0.3s ease;
}

@keyframes floatUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.affiliate-floating-inner {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid #10b981;
  border-radius: 999px;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 6px 8px 6px 14px;
  gap: 0.5rem;
}

.affiliate-floating-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.affiliate-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.affiliate-floating-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #065f46;
}

.affiliate-floating-code-pill {
  font-family: monospace;
  font-weight: 800;
  font-size: 0.75rem;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 1px 6px;
  border-radius: 4px;
}

.affiliate-floating-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.affiliate-floating-actions.minimized {
  display: none;
}

.affiliate-float-btn {
  border: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.affiliate-float-btn--copy {
  background: #047857;
  color: #ffffff;
}

.affiliate-float-btn--copy:hover {
  background: #065f46;
}

.affiliate-float-btn--wa {
  background: #25D366;
  color: #ffffff;
}

.affiliate-float-btn--wa:hover {
  background: #20bd5a;
}

.affiliate-float-btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.affiliate-float-btn-close:hover {
  color: #475569;
}

/* Dark Theme Overrides */
body.dark-theme .universal-share-dialog {
  background: #1e293b;
  border-color: #334155;
}

body.dark-theme .universal-share-heading {
  color: #f8fafc;
}

body.dark-theme .universal-share-header {
  border-color: #334155;
}

body.dark-theme .universal-share-input {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .affiliate-floating-inner {
  background: rgba(30, 41, 59, 0.95);
  border-color: #059669;
}

body.dark-theme .affiliate-floating-title {
  color: #a7f3d0;
}

body.dark-theme .recent-card-btn-share {
  background: #064e3b;
  border-color: #059669;
  color: #a7f3d0 !important;
}

body.dark-theme .recent-card-btn-share:hover {
  background: #10b981;
  color: #0f172a !important;
}

body.dark-theme .btn-share-product-prominent {
  background: #064e3b;
  border-color: #059669;
  color: #a7f3d0;
}

body.dark-theme .btn-share-product-prominent:hover {
  background: #10b981;
  color: #0f172a;
}

@media (max-width: 640px) {
  .affiliate-floating-widget {
    bottom: 16px;
    right: 16px;
  }

  .affiliate-floating-inner {
    padding: 5px 8px 5px 10px;
  }

  .affiliate-floating-title {
    display: none;
  }
}

/* ==========================================================================
   Universal Inline "Copied" with Checkmark Feedback Styles
   ========================================================================== */
.copied,
.copied-success,
.btn-copy-widget.copied,
.btn-copy-widget.copied-success,
.profile-btn-save.copied,
.profile-btn-save.copied-success,
.hero-action-pill.copied,
.hero-action-pill.copied-success,
.universal-share-btn-copy.copied,
.affiliate-float-btn--copy.copied,
.share-copy-btn.copied {
  background: #10b981 !important;
  background-color: #10b981 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.copied i,
.copied-success i,
.btn-copy-widget.copied i,
.btn-copy-widget.copied-success i,
.profile-btn-save.copied i,
.hero-action-pill.copied i,
.universal-share-btn-copy.copied i,
.affiliate-float-btn--copy.copied i,
.share-copy-btn.copied i {
  color: #ffffff !important;
  display: inline-block;
  vertical-align: middle;
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.copied span,
.copied-success span,
.btn-copy-widget.copied span,
.btn-copy-widget.copied-success span,
.profile-btn-save.copied span,
.hero-action-pill.copied span,
.universal-share-btn-copy.copied span,
.affiliate-float-btn--copy.copied span,
.share-copy-btn.copied span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   Item Page: Unified Document Title Above Grid & Equal Vertical Top Alignment
   ========================================================================== */
.item-header-title {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.75rem !important;
  text-align: left !important;
  margin-top: 0.75rem !important;
  margin-bottom: 1.5rem !important;
  font-size: clamp(1.4rem, 2.2vw, 2.1rem) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  color: var(--neutral-900) !important;
  padding-bottom: 0 !important;
  position: relative !important;
  width: 100% !important;
}

.item-header-title::after {
  display: none !important;
}

.item-header-title .cbe-file-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

@media (min-width: 992px) {
  .item-grid {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 2rem !important;
    align-items: start !important;
  }

  .purchase-card-mobile {
    display: none !important;
  }

  .purchase-card-desktop {
    margin-top: 0 !important;
  }

  .purchase-card-desktop .purchase-card-v2 {
    margin-top: 0 !important;
  }

  .doc-preview-card {
    margin-top: 0 !important;
    min-height: 520px;
  }
}

@media (max-width: 991px) {
  .item-header-title {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
    font-size: 1.25rem !important;
    gap: 0.5rem !important;
  }

  .purchase-card-mobile {
    margin-bottom: 1.5rem !important;
  }
}