/*
 * improvements.css — Schemes.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; }

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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: 38px;
  width: 170px;
  display: block;
  object-fit: contain;
}

.main-nav > a.nav-active,
.main-nav .nav-dropdown-toggle.nav-active {
  color: var(--primary);
}
.main-nav > a.nav-active::after {
  transform: scaleX(1);
}

/* ════════════════════════════════════════════════════════════
   HEADER SEARCH BAR & AUTOCOMPLETE SUGGESTIONS
   ════════════════════════════════════════════════════════════ */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 0;
  margin-left: auto;
}

/* ════════════════════════════════════════════════════════════
   MODERN SEARCH BAR — Unified .search-bar component
   ════════════════════════════════════════════════════════════ */

.header-search-container {
  position: relative;
  flex: 1;
  max-width: 500px;
  min-width: 180px;
}

/* The pill wrapper */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  padding: 0 0.5rem 0 1rem;
  gap: 0.25rem;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease;
}

.search-bar:hover {
  background: #eef2f7;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-bar:focus-within {
  background: #ffffff;
  border-color: var(--primary, #047857);
  box-shadow:
    0 0 0 3px rgba(4, 120, 87, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Left search icon */
.search-bar-icon {
  font-size: 1rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: color 0.2s ease;
  pointer-events: none;
}

.search-bar:focus-within .search-bar-icon {
  color: var(--primary, #047857);
}

/* The form fills remaining space — reset ALL inherited form styling */
.header-search-form,
.mobile-search-form {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* The text input itself — invisible, fully resets inherited styles */
input[type="text"].header-search-input,
input[type="text"].mobile-search-input {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 0.5rem !important;
  font-size: 0.93rem !important;
  font-family: var(--font-body, inherit) !important;
  color: var(--neutral-900, #0f172a) !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  line-height: 1 !important;
  margin: 0 !important;
}

input[type="text"].header-search-input::placeholder,
input[type="text"].mobile-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Clear (×) button — shown only when input has content via JS */
.search-bar-clear {
  display: none; /* shown via JS */
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.search-bar-clear:hover {
  background: #cbd5e1;
  color: #1e293b;
}

.search-bar-clear.visible {
  display: flex;
}

/* Keyboard shortcut hint badge (/) — hides when input is active */
.search-bar-hint {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  line-height: 1;
  padding: 3px 6px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #64748b;
  flex-shrink: 0;
  cursor: default;
  user-select: none;
  transition: opacity 0.15s ease;
}

.search-bar:focus-within .search-bar-hint,
.search-bar-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Gradient submit button on the right */
.search-bar-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #047857), #10b981);
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  padding: 0;
  opacity: 0.6;
}

.search-bar:focus-within .search-bar-submit {
  opacity: 1;
}

.search-bar-submit:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.35);
  opacity: 1;
}

/* ─── Suggestions Dropdown Overlay ─── */
.search-suggestions-box,
.mobile-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.06),
    0 20px 40px -8px rgba(0, 0, 0, 0.14);
  z-index: 1010;
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.4rem 0;
}

.search-suggestions-box {
  min-width: 340px;
}

/* Suggestion Row Items */
.suggestion-item {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: var(--neutral-900, #0f172a);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background-color 0.12s ease;
  cursor: pointer;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
  background-color: #f0fdf4;
  outline: none;
}

.suggestion-title {
  font-size: 0.855rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--neutral-900, #0f172a);
  margin-bottom: 0.2rem;
  word-break: break-word;
  text-align: left;
}

/* Highlighted search match */
.suggestion-title mark {
  background: #fef08a;
  color: #1e293b;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.suggestion-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.suggestion-category {
  color: #94a3b8;
  font-weight: 500;
}

.suggestion-price {
  color: var(--primary, #047857);
  font-weight: 700;
}

/* No Suggestions Fallback Card */
.suggestion-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.suggestion-empty i {
  font-size: 1.5rem;
  color: #cbd5e1;
}

/* ─── Mobile Sidebar Search Container ─── */
.mobile-search-wrapper {
  display: none;
  width: 100%;
  padding: 0.75rem 1rem;
  position: relative;
  border-bottom: 1px solid var(--neutral-100, #f1f5f9);
  margin-bottom: 0.25rem;
}

/* Mobile variant — slightly different height */
.search-bar--mobile {
  height: 42px;
  background: #f8fafc;
}

/* Mobile Media Queries */
@media (max-width: 768px) {
  .header-search-container {
    display: none;
  }
  .mobile-search-wrapper {
    display: block;
  }
}

/* ════════════════════════════════════════════════════════════
   HERO SECTION — Fix min-height: 200px, improve layout
   ════════════════════════════════════════════════════════════ */
.hero-v2 {
  min-height: clamp(380px, 46vh, 520px);
  background: #f0faf5;
}
.hero-v2__container {
  padding: 1.5rem 2rem;
  min-height: clamp(380px, 46vh, 520px);
  align-items: center;
}
.hero-v2__card {
  padding: 1.5rem 1.75rem;
  max-width: 520px;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}
.hero-v2__headline {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.hero-v2__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.hero-v2__feature-row {
  padding: 0.35rem 0.65rem;
  gap: 0.5rem;
  border-radius: 10px;
}
.hero-v2__feature-text strong { font-size: 0.82rem; }
.hero-v2__feature-text span   { font-size: 0.72rem; }
.hero-v2__cta { margin-top: 1rem; margin-bottom: 0.75rem; gap: 0.75rem; }

@media (max-width: 768px) {
  .hero-v2, .hero-v2__container { min-height: 0; }
  .hero-v2__container { padding: 1.75rem 1.25rem; grid-template-columns: 1fr; }
  .hero-v2__card { max-width: 100%; padding: 1.25rem 1rem; }
}

@media (max-width: 576px) {
  .hero-v2__features {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════
   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: 5.5rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  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); }

/* ════════════════════════════════════════════════════════════
   FOOTER ENHANCEMENTS
   ════════════════════════════════════════════════════════════ */
.site-footer { 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 FLOAT — Position tweak (above back-to-top)
   ════════════════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  z-index: 799;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE OVERFLOW PREVENTION (consolidated, no !important spam)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; 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-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

@media (max-width: 768px) {
  .catv2-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  }
}

.catv2-card {
  background: linear-gradient(180deg, #ffffff 0%, hsl(var(--card-hue, 200) 40% 99.5%) 100%) !important;
  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,
.catv2-card:focus-within {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 28px hsl(var(--card-hue, 200) 60% 70% / 0.18),
              0 2px 6px hsl(var(--card-hue, 200) 40% 60% / 0.08) !important;
  border-color: hsl(var(--card-hue, 200) 55% 80%) !important;
  outline: none;
}

.catv2-card:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 4px;
}

.catv2-card:focus-within .catv2-accent {
  transform: scaleX(1) !important;
}

.catv2-card:focus-within .catv2-icon {
  background: var(--accent) !important;
  box-shadow: 0 6px 16px hsl(var(--card-hue, 200) 60% 50% / 0.3) !important;
  transform: scale(1.08) !important;
}

.catv2-card:focus-within .catv2-icon i {
  color: #fff !important;
  transform: scale(1.1) !important;
}

.catv2-card:focus-within .catv2-title {
  color: var(--accent-dark) !important;
}

.catv2-card:focus-within .catv2-arrow {
  gap: 0.55rem !important;
}

.catv2-card:focus-within .catv2-arrow i {
  transform: translateX(3px) !important;
}

.catv2-title {
  font-family: var(--font-display) !important;
  font-weight: 700;
}

.catv2-desc {
  color: hsl(var(--card-hue, 200) 15% 42%) !important;
}

/* ════════════════════════════════════════════════════════════
   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: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  color: var(--neutral-700) !important;
  text-decoration: none;
  transition: all var(--transition-fast) !important;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.header-cart-btn:hover {
  background: var(--neutral-100);
  color: var(--primary) !important;
  transform: scale(1.05);
}
@media (max-width: 768px) {
  .header-cart-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
  }
}
.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger, #ef4444);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: none; /* Controlled by JS class assignment */
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}
.header-cart-btn.has-items .cart-count-badge {
  display: inline-flex;
}

/* 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%;
}

/* 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;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--neutral-100);
  align-items: center;
}
.cart-item-row:last-child {
  border-bottom: none;
}
.cart-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-50);
  flex-shrink: 0;
}
.cart-item-details {
  flex: 1;
  min-width: 0;
}
.cart-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-meta {
  font-size: 0.78rem;
  color: var(--neutral-500);
}
.cart-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neutral-900);
  text-align: right;
  white-space: nowrap;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}
.cart-item-remove:hover {
  color: var(--danger);
}
.cart-summary-section {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 100px;
}
.cart-summary-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--neutral-900);
  border-bottom: 1px solid var(--neutral-100);
  padding-bottom: 0.5rem;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--neutral-600);
}
.cart-summary-row--total {
  border-top: 1px solid var(--neutral-100);
  margin-top: 1rem;
  padding-top: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neutral-900);
}
.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;
}

/* ===== MEDIUM SCREEN HEADER LAYOUT OPTIMIZATIONS (769px to 1350px) ===== */
@media (min-width: 769px) and (max-width: 1350px) {
  .header-container {
    padding: 0 clamp(0.75rem, 2vw, 1.5rem);
    gap: clamp(0.25rem, 1vw, 1rem);
  }
  
  .header-right {
    gap: 0.5rem;
    flex-shrink: 1;
  }
  
  .header-logo {
    height: 30px;
    width: auto;
  }
  
  .main-nav {
    gap: clamp(0.1rem, 0.4vw, 0.5rem);
    flex: 1 1 auto;
  }
  
  .main-nav > a,
  .main-nav .nav-dropdown-toggle {
    font-size: clamp(0.68rem, 0.9vw, 0.78rem);
    padding: 0.4rem clamp(0.2rem, 0.4vw, 0.5rem);
    gap: 0.15rem;
  }
  
  .header-search-container {
    flex: 0 1 260px;
    min-width: 100px;
    max-width: 260px;
  }

  .search-bar {
    height: 38px;
  }

  input[type="text"].header-search-input {
    font-size: 0.85rem !important;
  }
  
  .guest-actions {
    gap: 0.3rem;
  }
  
  .guest-actions .btn-primary,
  .guest-actions .btn-secondary {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .user-dropdown-toggle {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }
}

/* ===== LARGE SCREEN HEADER EXPANSION (>= 1600px) ===== */
@media (min-width: 1600px) {
  .header-container {
    padding: 0 clamp(2rem, 5vw, 6rem);
    gap: 2rem;
  }

  .main-nav {
    gap: 1rem;
  }

  .main-nav > a,
  .main-nav .nav-dropdown-toggle {
    font-size: 0.82rem;
    padding: 0.5rem 0.8rem;
  }

  .header-search-container {
    flex: 0 1 520px;
    max-width: 520px;
  }
}
