/* =============================================================
   THEME.CSS  –  MSCDKeys eCommerce Design System
   Dark mode default | Light mode toggle | CSS Custom Properties
   ============================================================= */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties: Dark Mode (default) ─────────── */
:root,
[data-theme="dark"] {
  /* Backgrounds */
  --bg-base:        #0d1117;
  --bg-surface:     #161b22;
  --bg-elevated:    #1c2128;
  --bg-overlay:     rgba(13,17,23,0.92);

  /* Borders */
  --border-color:   #30363d;
  --border-subtle:  #21262d;

  /* Text */
  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;
  --text-inverse:   #0d1117;

  /* Brand / Accent */
  --accent:         #58a6ff;
  --accent-hover:   #79b8ff;
  --accent-muted:   rgba(88,166,255,0.12);
  --accent-rgb:     88,166,255;

  /* Status */
  --success:        #3fb950;
  --success-bg:     rgba(63,185,80,0.1);
  --warning:        #d29922;
  --warning-bg:     rgba(210,153,34,0.1);
  --danger:         #f85149;
  --danger-bg:      rgba(248,81,73,0.1);
  --info:           #58a6ff;
  --info-bg:        rgba(88,166,255,0.1);

  /* Components */
  --card-shadow:    0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.4);
  --header-bg:      #161b22;
  --header-shadow:  0 1px 0 #30363d;
  --navbar-bg:      #1c2128;
  --footer-bg:      #161b22;
  --input-bg:       #0d1117;
  --input-border:   #30363d;
  --input-focus:    #58a6ff;
  --scrollbar-thumb:#30363d;

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%);
  --gradient-hero:   linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2128 100%);
  --gradient-card:   linear-gradient(180deg, #1c2128 0%, #161b22 100%);

  /* Toggle icon shown in dark mode */
  --toggle-icon: '☀';
}

/* ── CSS Custom Properties: Light Mode ───────────────────── */
[data-theme="light"] {
  --bg-base:        #f6f8fa;
  --bg-surface:     #ffffff;
  --bg-elevated:    #f6f8fa;
  --bg-overlay:     rgba(246,248,250,0.95);

  --border-color:   #d0d7de;
  --border-subtle:  #eaecef;

  --text-primary:   #1f2328;
  --text-secondary: #636c76;
  --text-muted:     #9aa3ac;
  --text-inverse:   #ffffff;

  --accent:         #0969da;
  --accent-hover:   #0860ca;
  --accent-muted:   rgba(9,105,218,0.08);
  --accent-rgb:     9,105,218;

  --success:        #1a7f37;
  --success-bg:     rgba(26,127,55,0.08);
  --warning:        #9a6700;
  --warning-bg:     rgba(154,103,0,0.08);
  --danger:         #cf222e;
  --danger-bg:      rgba(207,34,46,0.08);
  --info:           #0969da;
  --info-bg:        rgba(9,105,218,0.08);

  --card-shadow:    0 1px 3px rgba(31,35,40,0.08), 0 4px 16px rgba(31,35,40,0.04);
  --card-shadow-hover: 0 4px 12px rgba(31,35,40,0.12), 0 8px 32px rgba(31,35,40,0.08);
  --header-bg:      #ffffff;
  --header-shadow:  0 1px 0 #d0d7de;
  --navbar-bg:      #f6f8fa;
  --footer-bg:      #1f2328;
  --input-bg:       #ffffff;
  --input-border:   #d0d7de;
  --input-focus:    #0969da;
  --scrollbar-thumb:#d0d7de;

  --gradient-accent: linear-gradient(135deg, #0969da 0%, #8250df 100%);
  --gradient-hero:   linear-gradient(135deg, #f6f8fa 0%, #ffffff 50%, #f6f8fa 100%);
  --gradient-card:   linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);

  --toggle-icon: '🌙';
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── Typography ──────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; font-weight: 600; }
h6 { font-size: 0.85rem; font-weight: 600; }

p { color: var(--text-secondary); margin-bottom: 0; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
small { font-size: 0.8rem; }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em;
       background: var(--bg-elevated); padding: 0.1em 0.4em; border-radius: 4px; }

/* ── Theme Transition ────────────────────────────────────── */
body, header, nav, footer, .card, .fe-card,
.fe-header, .fe-navbar, .fe-footer,
.fe-search-dropdown, .fe-search-item,
input, select, textarea, button {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ── Theme Toggle Button ─────────────────────────────────── */
#theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
#theme-toggle:hover {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}
#theme-toggle .toggle-icon { font-size: 1rem; line-height: 1; }
#theme-toggle .toggle-label { font-weight: 500; font-size: 0.78rem; }

/* ── Global Button System ────────────────────────────────── */
.btn-primary-custom {
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary-custom:hover {
  background: var(--accent-hover);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: 0 1px 5px rgba(var(--accent-rgb), 0.2);
}
.btn-outline-custom {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 9px 22px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-outline-custom:hover {
  background: var(--accent-muted);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 9px 18px;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* ── Cards ───────────────────────────────────────────────── */
.fe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all 0.25s ease;
}
.fe-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.fe-card-body { padding: 1.25rem; }
.fe-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Badges / Pills ──────────────────────────────────────── */
.fe-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.fe-badge-success { background: var(--success-bg); color: var(--success); }
.fe-badge-warning { background: var(--warning-bg); color: var(--warning); }
.fe-badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.fe-badge-info    { background: var(--info-bg);    color: var(--info); }
.fe-badge-secondary { background: var(--bg-elevated); color: var(--text-secondary); }

/* ── Forms ───────────────────────────────────────────────── */
.form-control, .form-select, input[type="text"],
input[type="email"], input[type="password"],
input[type="tel"], input[type="number"],
select, textarea {
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
  border: 1.5px solid var(--input-border) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none !important;
}
.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--input-focus) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15) !important;
}
.form-control::placeholder, input::placeholder, textarea::placeholder {
  color: var(--text-muted) !important;
}
.form-label { font-weight: 500; font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 6px; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert-custom {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  border: 1px solid;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger);  color: var(--danger); }
.alert-info    { background: var(--info-bg);    border-color: var(--info);    color: var(--info); }

/* ── Toast Notifications ─────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.fe-toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 260px;
  max-width: 320px;
  box-shadow: var(--card-shadow-hover);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  pointer-events: all;
  animation: toastIn 0.3s ease forwards;
}
.fe-toast.toast-success { border-left: 3px solid var(--success); }
.fe-toast.toast-error   { border-left: 3px solid var(--danger); }
.fe-toast.toast-info    { border-left: 3px solid var(--accent); }
.fe-toast .toast-icon   { font-size: 1.1rem; flex-shrink: 0; }
.fe-toast .toast-msg    { flex: 1; color: var(--text-primary); }
.fe-toast.fade-out      { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(20px); } }

/* ── Skeleton Loading ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border-subtle) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Section Headings ────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.section-heading h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ── Dividers ────────────────────────────────────────────── */
.fe-divider { height: 1px; background: var(--border-color); margin: 1.5rem 0; }

/* ── Star Rating Component ───────────────────────────────── */
.star-rating {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.star-rating .star { color: var(--warning); font-size: 0.85rem; }
.star-rating .star.empty { color: var(--border-color); }
.rating-count { font-size: 0.8rem; color: var(--text-muted); margin-left: 4px; }

/* ── Quantity Stepper ────────────────────────────────────── */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface);
}
.qty-stepper button {
  background: var(--bg-elevated);
  border: none;
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.qty-stepper button:hover { background: var(--accent-muted); color: var(--accent); }
.qty-stepper input {
  border: none !important;
  border-radius: 0 !important;
  width: 46px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 4px !important;
  box-shadow: none !important;
  background: var(--input-bg) !important;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.fe-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.fe-breadcrumb a { color: var(--text-secondary); }
.fe-breadcrumb a:hover { color: var(--accent); }
.fe-breadcrumb .sep { color: var(--border-color); }
.fe-breadcrumb .current { color: var(--text-primary); font-weight: 500; }

/* ── Utility ─────────────────────────────────────────────── */
.text-accent    { color: var(--accent); }
.text-muted-fe  { color: var(--text-muted); }
.text-secondary-fe { color: var(--text-secondary); }
.bg-surface     { background: var(--bg-surface); }
.bg-elevated    { background: var(--bg-elevated); }
.border-fe      { border: 1px solid var(--border-color); }
.rounded-fe     { border-radius: 12px; }

/* ── HEADER ─────────────────────────────────────────────── */
.fe-sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.fe-promo-bar {
  background: var(--gradient-accent);
  color: #fff;
  text-align: center;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.fe-promo-bar a { color: #fff; text-decoration: underline; }

.fe-header {
  background: var(--header-bg);
  box-shadow: var(--header-shadow);
  padding: 12px 0;
}
.fe-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}
.fe-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.fe-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.fe-logo span {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.fe-logo .logo-accent { color: var(--accent); }

.fe-search {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fe-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}
.fe-search input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 10px 14px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
}
.fe-search button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}
.fe-search button:hover { background: var(--accent-hover); }

/* Instant Search Dropdown */
.fe-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 1050;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fe-search-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}
.fe-search-item:last-child { border-bottom: none; }
.fe-search-item:hover, .fe-search-item.active {
  background: var(--bg-elevated);
}
.fe-search-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.fe-search-details {
  flex: 1;
  min-width: 0;
}
.fe-search-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.fe-search-title strong {
  color: var(--accent); /* Highlights the typed string */
  font-weight: 800;
}
.fe-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: 4px;
}
.fe-search-cat { color: var(--text-muted); }
.fe-search-price { font-weight: 700; color: var(--text-secondary); }

.fe-search-feedback {
  padding: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fe-search-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: text-bottom;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fe-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* ── HEADER ACTION BUTTONS (Unified) ─────────────────────── */
.fe-header-action-btn,
.fe-currency-btn,
#theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  flex-shrink: 0;
}

.fe-header-action-btn:hover,
.fe-currency-btn:hover,
.fe-currency-btn[aria-expanded="true"],
#theme-toggle:hover {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}

.fe-header-action-btn i,
#theme-toggle .toggle-icon,
.fe-currency-btn .fe-currency-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.fe-currency-btn {
  width: auto;
  padding: 0 12px;
  gap: 6px;
}
.fe-currency-caret { font-size: 0.65rem; opacity: 0.5; transition: transform 0.2s; }
.fe-currency-btn[aria-expanded="true"] .fe-currency-caret { transform: rotate(180deg); }

.fe-cart-count,
.fe-wishlist-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.fe-currency-dropdown .dropdown-menu {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2) !important;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px !important;
}
.fe-currency-dropdown-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 10px 6px;
  display: block;
}
.fe-currency-dropdown .dropdown-item {
  border-radius: 6px !important;
  padding: 8px 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--text-secondary) !important;
  font-size: 0.84rem !important;
  transition: all 0.15s !important;
}
.fe-currency-dropdown .dropdown-item:hover,
.fe-currency-dropdown .dropdown-item:focus {
  background: var(--accent-muted) !important;
  color: var(--accent) !important;
}
.fe-currency-dropdown .dropdown-item.active {
  background: var(--accent-muted) !important;
  color: var(--accent) !important;
  font-weight: 600 !important;
}
.fe-currency-dropdown .curr-flag { font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.fe-currency-dropdown .curr-name { flex: 1; font-weight: 600; }
.fe-currency-dropdown .curr-symbol { opacity: 0.55; font-size: 0.78rem; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; }

/* ── NAVIGATION ─────────────────────────────────────────── */
.fe-navbar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border-color);
}
.fe-navbar-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  align-items: center;
}
.fe-navbar-item { position: relative; }
.fe-navbar-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.fe-navbar-link:hover, .fe-navbar-link.active {
  color: var(--accent);
  background: var(--accent-muted);
}
.fe-navbar-link .caret {
  font-size: 0.65rem;
  transition: transform 0.2s;
}
.fe-navbar-item:hover .caret { transform: rotate(180deg); }

/* ── PROFESSIONAL DROPDOWNS ── */
@keyframes dropdownReveal {
  0% { opacity: 0; transform: translateY(15px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.fe-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
  display: none;
  flex-direction: column;
  padding: 8px;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Invisible Bridge to prevent hover disconnect dead-zones */
.fe-dropdown::before, .fe-mega-menu::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: transparent;
}

[data-theme="dark"] .fe-dropdown {
  background: rgba(30, 41, 59, 0.85); /* Deep frosted glass */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255,255,255,0.1);
}

.fe-navbar-item:hover .fe-dropdown {
  display: flex;
  animation: dropdownReveal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.fe-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.fe-dropdown a i {
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}
.fe-dropdown a:hover {
  background: var(--accent-muted);
  color: var(--accent);
  transform: translateX(4px);
}
.fe-dropdown a:hover i {
  color: var(--accent);
  transform: scale(1.1);
}

/* ── PROFESSIONAL MEGA MENU ── */
.fe-mega-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: max-content;
  max-width: 80vw; /* Prevent viewport overflow safely */
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
  display: none;
  gap: 30px;
  padding: 24px 30px;
  z-index: 100;
  flex-wrap: wrap; /* Allows stacking if max-width is hit */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .fe-mega-menu {
  background: rgba(30, 41, 59, 0.85); /* Deep frosted glass */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255,255,255,0.1);
}

.fe-navbar-item:hover .fe-mega-menu {
  display: flex;
  animation: dropdownReveal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.fe-mega-col {
  flex: 1 1 auto;
  min-width: min-content;
}

.fe-mega-heading {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: default;
}
.fe-mega-heading i {
  color: var(--accent);
  background: var(--accent-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -4px; /* offset the me-2 class spacing from HTML */
  font-size: 0.7rem;
}

.fe-mega-col a[role="menuitem"] {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.15s, background-color 0.15s;
  text-decoration: none;
}
.fe-mega-col a[role="menuitem"]:hover {
  color: var(--accent);
  background-color: var(--accent-muted);
}

.fe-mega-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fe-mega-heading {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  padding: 0 10px 10px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--border-subtle);
}
.fe-mega-menu a {
  display: block;
  padding: 8px 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.fe-mega-menu a:hover {
  background: var(--accent-muted);
  color: var(--accent);
  padding-left: 14px;
}

/* Prevent overflow */
.fe-mega-menu { max-width: min(800px, calc(100vw - 32px)); }
.fe-navbar-item:last-child .fe-mega-menu,
.fe-navbar-item:nth-last-child(2) .fe-mega-menu { left: auto; right: 0; }

/* Mobile navbar hamburger */
.fe-hamburger {
  display: none;
  background: none;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.fe-hamburger:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile drawer */
.fe-mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  z-index: 2000;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.fe-mobile-drawer.open { transform: translateX(0); display: flex; }
.fe-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  backdrop-filter: blur(2px);
}
.fe-drawer-backdrop.open { display: block; }
.fe-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}
.fe-drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.fe-drawer-close:hover { background: var(--danger-bg); color: var(--danger); }
.fe-drawer-nav { display: flex; flex-direction: column; padding: 8px; }
.fe-drawer-nav a {
  padding: 12px 14px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s;
}
.fe-drawer-nav a:hover { background: var(--accent-muted); color: var(--accent); }

/* Mobile drawer – expandable sub-sections */
.fe-drawer-divider { height: 1px; background: var(--border-subtle); margin: 6px 12px; }
.fe-drawer-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  transition: all 0.15s;
}
.fe-drawer-nav-toggle:hover { background: var(--accent-muted); color: var(--accent); }
.fe-drawer-nav-toggle .drawer-caret { font-size: 0.65rem; opacity: 0.55; transition: transform 0.2s; }
.fe-drawer-nav-toggle.open .drawer-caret { transform: rotate(180deg); }
.fe-drawer-sub {
  display: none;
  flex-direction: column;
  padding: 2px 8px 6px 26px;
  gap: 1px;
}
.fe-drawer-sub.open { display: flex; }
.fe-drawer-sub-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: 6px 8px 2px;
}
.fe-drawer-sub a {
  padding: 7px 10px;
  color: var(--text-muted);
  font-size: 0.84rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
  display: block;
}
.fe-drawer-sub a:hover { background: var(--accent-muted); color: var(--accent); }
/* Drawer footer: currency + theme */
.fe-drawer-footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}
.fe-drawer-theme-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.fe-drawer-theme-btn:hover { border-color: var(--accent); background: var(--accent-muted); color: var(--accent); }

/* ── FOOTER ─────────────────────────────────────────────── */
.fe-footer {
  background: var(--footer-bg);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}
[data-theme="light"] .fe-footer {
  background: #1f2328;
  color: #8b949e;
}
.fe-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding: 50px 0 40px;
}
.fe-footer-brand p { font-size: 0.84rem; line-height: 1.65; margin-top: 12px; color: #8b949e; }
.fe-footer-brand .footer-logo {
  display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
}
.fe-footer-brand .footer-logo span { font-size: 1.2rem; font-weight: 800; }
.fe-footer-brand .footer-logo span span { color: #58a6ff; }
.fe-contact-info { margin-top: 12px; font-size: 0.82rem; color: #8b949e; }
.fe-footer-social { display: flex; gap: 8px; margin-top: 16px; }
.fe-social-btn {
  width: 34px; height: 34px;
  border: 1px solid #30363d;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #8b949e; font-size: 0.88rem; text-decoration: none; transition: all 0.2s;
}
.fe-social-btn:hover { background: #58a6ff; border-color: #58a6ff; color: #fff; }
.fe-footer-col h5 { color: #e6edf3; font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; }
.fe-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; padding-left: 0;}
.fe-footer-col ul li a { color: #8b949e; font-size: 0.84rem; text-decoration: none; transition: color 0.15s; }
.fe-footer-col ul li a:hover { color: #58a6ff; }
.fe-footer-bottom {
  border-top: 1px solid #21262d;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #6e7681;
}
.fe-payment-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.fe-payment-icon {
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b949e;
  letter-spacing: 0.03em;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .fe-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

/* ≤ 991px : hamburger + hide navbar bar entirely */
@media (max-width: 991px) {
  .fe-header-inner { grid-template-columns: auto auto 1fr auto; gap: 12px; }
  .fe-hamburger { display: flex; }
  .fe-navbar { display: none; }
}

/* ≤ 767px : compact actions – hide labels + currency code */
@media (max-width: 767px) {
  .fe-header-inner { grid-template-columns: auto auto 1fr auto; gap: 8px; }
  .fe-header-action-btn span { display: none; }
  .fe-currency-code { display: none; }
  #theme-toggle .toggle-label { display: none; }
  .fe-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .fe-footer-bottom { flex-direction: column; text-align: center; }
}

/* ≤ 576px : search drops to its own full-width second row */
@media (max-width: 576px) {
  .fe-header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .fe-hamburger        { grid-column: 1; grid-row: 1; }
  .fe-logo             { grid-column: 2; grid-row: 1; }
  .fe-header-actions   { grid-column: 3; grid-row: 1; gap: 4px; }
  #fe-search-wrapper   { grid-column: 1 / -1; grid-row: 2; }
  #theme-toggle        { display: none; }
}

@media (max-width: 480px) {
  .fe-promo-bar             { font-size: 0.75rem; padding: 6px 12px; }
  .fe-logo span             { font-size: 1.05rem; }
  .fe-logo .logo-icon       { width: 32px; height: 32px; font-size: 0.95rem; }
  .fe-header-action-btn,
  .fe-currency-btn          { width: 36px; height: 36px; }
  .fe-currency-btn          { padding: 0 8px; gap: 4px; }
  .fe-header-actions        { gap: 4px; }
}

/* ══════════════════════════════════════════════════════════
   HOMEPAGE / SECTION COMPONENTS
   (Hero Slider, Product Grid, Product Card, Trust Bar, etc.)
   ══════════════════════════════════════════════════════════ */

/* ── Section Layout ──────────────────────────────────────── */
.fe-section {
  padding: 48px 0;
}
.fe-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.fe-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.fe-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 3px;
  margin-right: 10px;
  vertical-align: middle;
}
.fe-view-all {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
}
.fe-view-all:hover { gap: 8px; color: var(--accent-hover); }

/* ── Hero Slider ─────────────────────────────────────────── */
.fe-hero {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.fe-slider {
  position: relative;
  width: 100%;
}
.fe-slide {
  display: none;
  position: relative;
  width: 100%;
  min-height: 420px;
  align-items: center;
  overflow: hidden;
}
.fe-slide.active {
  display: flex;
  animation: slideIn 0.55s ease forwards;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* The slide-inner acts like the page container so content aligns with the rest of the layout */
.fe-slide-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 12px;   /* matches Bootstrap container-xl px-3 */
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}
.fe-slide-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
  padding: 56px 0;
}
.fe-slide-content .slide-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
}
.fe-slide-content h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}
.fe-slide-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 8px;
}
.fe-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  background: #fff;
  color: #0d1117;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.fe-slide-cta:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
/* Slider arrows */
.fe-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}
.fe-slider-arrow:hover { background: rgba(255,255,255,0.3); }
.fe-slider-arrow.prev { left: 20px; }
.fe-slider-arrow.next { right: 20px; }
/* Slider dots */
.fe-slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.fe-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.fe-slider-dot.active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* ── Hero responsive ─────────────────────────────────────── */
@media (max-width: 992px) {
  .fe-slide { min-height: 360px; }
  .fe-slide-content { max-width: 100%; padding: 48px 0; }
  .fe-slide-content h1 { font-size: clamp(1.4rem, 4vw, 2rem); }
  .fe-slider-arrow { width: 36px; height: 36px; font-size: 0.85rem; }
  .fe-slider-arrow.prev { left: 10px; }
  .fe-slider-arrow.next { right: 10px; }
}
@media (max-width: 768px) {
  .fe-slide { min-height: 300px; }
  .fe-slide-inner { padding: 0 16px; }
  .fe-slide-content { padding: 40px 0; }
  .fe-slide-content h1 { font-size: clamp(1.25rem, 5vw, 1.75rem); }
  .fe-slide-content p { font-size: 0.88rem; }
  .fe-slide-cta { padding: 10px 20px; font-size: 0.85rem; }
  .fe-slider-arrow { display: none; }
}
@media (max-width: 480px) {
  .fe-slide { min-height: 260px; }
  .fe-slide-inner { padding: 0 14px; }
  .fe-slide-content { padding: 32px 0; }
  .fe-slide-content h1 { font-size: clamp(1.1rem, 5.5vw, 1.5rem); }
  .fe-slider-dots { bottom: 10px; }
}

/* ── Category Bar ─────────────────────────────────────────── */
.fe-category-bar { padding: 20px 0; border-bottom: 1px solid var(--border-color); }
.fe-category-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  scrollbar-width: none;
}
.fe-category-list::-webkit-scrollbar { display: none; }
.fe-category-item a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.fe-category-item a:hover,
.fe-category-item.active a {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}
.fe-category-item i { font-size: 0.9rem; }

/* ── Trust Bar ───────────────────────────────────────────── */
.fe-trust-bar {
  padding: 28px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-elevated);
}
.fe-trust-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.fe-trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fe-trust-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-muted);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}
.fe-trust-text h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
}
.fe-trust-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 768px) {
  .fe-trust-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .fe-trust-list { grid-template-columns: 1fr; }
}

/* ── Banner Row ──────────────────────────────────────────── */
.fe-banner-row { padding: 16px 0; }
.fe-banner-link { display: block; border-radius: 12px; overflow: hidden; }
.fe-banner-img { width: 100%; height: auto; display: block; }


/* ══════════════════════════════════════════════════════════
   PRODUCT CARD  –  dark-first · light mode · full responsive
   ══════════════════════════════════════════════════════════ */

/* ── Card shell ─────────────────────────────────────────── */
.fe-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 4px 18px rgba(0,0,0,0.25);
  transition:
    transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  /* Container query context – lets child @container rules adapt to card width */
  container-type: inline-size;
  container-name: pcard;
}
.fe-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--accent-rgb),0.5);
  box-shadow: 0 18px 52px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--accent-rgb),0.2);
}
[data-theme="light"] .fe-product-card {
  box-shadow: 0 1px 4px rgba(31,35,40,0.08), 0 4px 18px rgba(31,35,40,0.05);
}
[data-theme="light"] .fe-product-card:hover {
  box-shadow: 0 18px 52px rgba(31,35,40,0.18), 0 0 0 1px rgba(var(--accent-rgb),0.28);
}

/* ── Image area ─────────────────────────────────────────── */
.fe-product-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  overflow: hidden;
  flex-shrink: 0;
}
.fe-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
}
.fe-product-card:hover .fe-product-img img { transform: scale(1.07); }

.fe-product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
}
.fe-product-img-placeholder i {
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.35;
}
.fe-product-img-placeholder span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Image badges ───────────────────────────────────────── */
.fe-badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--danger);
  color: #fff;
  font-size: 0.69rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 3px rgba(248,81,73,0.25);
}
.fe-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fe-badge-new  { background: var(--success); color: #fff; box-shadow: 0 1px 3px rgba(63,185,80,0.25); }
.fe-badge-hot  { background: linear-gradient(135deg,#ff6b35,#e63946); color: #fff; box-shadow: 0 1px 3px rgba(255,107,53,0.25); }
.fe-badge-best { background: var(--warning); color: #fff; box-shadow: 0 1px 3px rgba(210,153,34,0.25); }
.fe-badge-sale { background: var(--danger);  color: #fff; box-shadow: 0 1px 3px rgba(248,81,73,0.2); }

/* ── Quick-view overlay (slides up on hover) ────────────── */
.fe-quick-view-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.fe-product-card:hover .fe-quick-view-overlay { opacity: 1; }

.fe-quick-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #0d1117;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transform: translateY(10px);
  transition:
    transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.fe-product-card:hover .fe-quick-view-btn { transform: translateY(0); }
.fe-quick-view-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: #0d1117;
}

/* ── Card body ──────────────────────────────────────────── */
.fe-product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

/* Category */
.fe-product-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin-bottom: 6px;
  line-height: 1;
}

/* Name */
.fe-product-name {
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.38;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fe-product-name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s;
}
.fe-product-name a:hover { color: var(--accent); }

/* Rating */
.fe-product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}
.fe-product-rating .stars { color: var(--warning); font-size: 0.78rem; letter-spacing: 1px; }
.fe-product-rating .count { font-size: 0.72rem; color: var(--text-muted); }

/* Price + Stock same-line row – pushed to bottom of card body */
.fe-price-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 12px;
}
.fe-price-col { flex: 1; min-width: 0; }
.fe-meta-col  {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.fe-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.fe-price-current {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.fe-price-original {
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.fe-price-save {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--success);
}

/* Stock badge */
.fe-stock-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.fe-stock-in  { background: var(--success-bg); color: var(--success); }
.fe-stock-low { background: var(--warning-bg); color: var(--warning); }
.fe-stock-out { background: var(--danger-bg);  color: var(--danger);  }
.fe-stock-in::before,
.fe-stock-low::before,
.fe-stock-out::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Action row ─────────────────────────────────────────── */
.fe-product-actions {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

/* ══════════════════════════════════════════════════════════
   ADD TO CART  –  indigo → violet  (primary action)
   ══════════════════════════════════════════════════════════ */
.fe-btn-cart {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(99,102,241,0.22), inset 0 1px 0 rgba(255,255,255,0.14);
  transition:
    transform  0.22s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.22s ease,
    filter     0.22s ease;
  position: relative;
  overflow: hidden;
}
/* top-edge gloss highlight */
.fe-btn-cart::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.13) 0%, transparent 55%);
  border-radius: inherit;
  pointer-events: none;
}
.fe-btn-cart:hover:not(:disabled) {
  filter: brightness(1.14);
  box-shadow: 0 2px 8px rgba(99,102,241,0.32), inset 0 1px 0 rgba(255,255,255,0.14);
  transform: translateY(-2px);
}
.fe-btn-cart:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.95);
  box-shadow: 0 1px 3px rgba(99,102,241,0.16);
  transition-duration: 0.08s;
}
.fe-btn-cart:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}
.fe-btn-cart:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.65;
  filter: none;
}
.fe-btn-cart:disabled::before { display: none; }
.fe-btn-cart.loading  { pointer-events: none; opacity: 0.75; }
.fe-btn-cart.loading i { animation: fe-spin 0.75s linear infinite; }

/* ══════════════════════════════════════════════════════════
   BUY NOW  –  orange → deep-red  (urgency action)
   ══════════════════════════════════════════════════════════ */
.fe-btn-buynow {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(249,115,22,0.2), inset 0 1px 0 rgba(255,255,255,0.12);
  transition:
    transform  0.22s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.22s ease,
    filter     0.22s ease;
  position: relative;
  overflow: hidden;
}
.fe-btn-buynow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 55%);
  border-radius: inherit;
  pointer-events: none;
}
.fe-btn-buynow:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px rgba(249,115,22,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateY(-2px);
}
.fe-btn-buynow:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.95);
  box-shadow: 0 1px 3px rgba(249,115,22,0.14);
  transition-duration: 0.08s;
}
.fe-btn-buynow:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}
.fe-btn-buynow:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}
.fe-btn-buynow:disabled::before { display: none; }
.fe-btn-buynow.loading  { pointer-events: none; opacity: 0.72; }
.fe-btn-buynow.loading i { animation: fe-spin 0.75s linear infinite; }

/* ══════════════════════════════════════════════════════════
   WISHLIST  –  ghost button with animated heart
   ══════════════════════════════════════════════════════════ */
.fe-btn-wishlist {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition:
    background   0.2s ease,
    border-color 0.2s ease,
    color        0.2s ease,
    transform    0.22s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow   0.2s ease;
}
.fe-btn-wishlist:hover {
  background: rgba(239,68,68,0.1);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(239,68,68,0.1);
}
.fe-btn-wishlist:active {
  transform: scale(0.94);
  transition-duration: 0.08s;
}
.fe-btn-wishlist:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}
.fe-btn-wishlist.wishlisted {
  background: rgba(239,68,68,0.14);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.1), 0 1px 4px rgba(239,68,68,0.14);
}
.fe-btn-wishlist.wishlisted i {
  animation: fe-heartpop 0.38s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ── Keyframe animations ────────────────────────────────── */
@keyframes fe-heartpop {
  0%   { transform: scale(0.4) rotate(-15deg); }
  55%  { transform: scale(1.3)  rotate(6deg);  }
  100% { transform: scale(1)    rotate(0deg);  }
}
@keyframes fe-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Light-mode button overrides ────────────────────────── */
[data-theme="light"] .fe-btn-cart {
  box-shadow: 0 1px 4px rgba(99,102,241,0.16), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .fe-btn-cart:hover:not(:disabled) {
  box-shadow: 0 2px 8px rgba(99,102,241,0.24), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .fe-btn-buynow {
  box-shadow: 0 1px 4px rgba(249,115,22,0.14), inset 0 1px 0 rgba(255,255,255,0.22);
}
[data-theme="light"] .fe-btn-buynow:hover:not(:disabled) {
  box-shadow: 0 2px 8px rgba(249,115,22,0.22), inset 0 1px 0 rgba(255,255,255,0.22);
}
[data-theme="light"] .fe-btn-wishlist {
  background: #fff;
  border-color: var(--border-color);
  color: var(--text-muted);
}
[data-theme="light"] .fe-btn-wishlist:hover {
  background: rgba(239,68,68,0.06);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.07);
}
[data-theme="light"] .fe-btn-wishlist.wishlisted {
  background: rgba(239,68,68,0.08);
  box-shadow: 0 0 0 2px rgba(239,68,68,0.07), 0 1px 4px rgba(239,68,68,0.1);
}

/* ── Responsive: small card bodies + section spacing ──── */
@media (max-width: 576px) {
  .fe-product-body  { padding: 12px; }
  .fe-product-name  { font-size: 0.88rem; }
  .fe-price-current { font-size: 1.05rem; }
  .fe-section       { padding: 32px 0; }
  .fe-section-title { font-size: 1.1rem; }
}

/*
 * Button responsive rules:
 *   Mobile (≤ 767px)  — icon only: text hidden, compact padding.
 *   Tablet / desktop  — icon + small text always shown (0.72rem).
 *   Wishlist          — always icon-only (no text in any context).
 *
 * Container query: on very narrow cards (≤ 250px) tighten padding
 * and shrink text further, but text is NEVER hidden on non-mobile.
 */

/* ── Mobile: icon-only ──────────────────────────────────── */
@media (max-width: 767px) {
  .fe-product-actions          { gap: 5px; }
  .fe-btn-cart span,
  .fe-btn-buynow span          { display: none; }
  .fe-btn-cart,
  .fe-btn-buynow               { gap: 0; padding: 10px; }
  .fe-btn-wishlist             { width: 40px; height: 40px; }
}

/* ── Very narrow card (≤ 250px): tighter but still shows text ── */
@container pcard (max-width: 250px) {
  .fe-product-actions          { gap: 4px; }
  .fe-btn-cart,
  .fe-btn-buynow               { padding: 9px 7px; font-size: 0.65rem; }
}

/* ── Instant Search: Responsive ──────────────────────────────── */

/* Tablet (≤768px): dropdown slightly narrower, wrap thumbnail */
@media (max-width: 768px) {
  #fe-search-wrapper {
    position: relative;
    /* Ensure the dropdown aligns to the input, not a parent */
  }
  .fe-search-dropdown {
    /* On tablet, constrain the max width to avoid going edge-to-edge */
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  }
  .fe-search-item {
    padding: 9px 12px;
    gap: 10px;
  }
  .fe-search-thumb {
    width: 32px;
    height: 32px;
  }
  .fe-search-title {
    font-size: 0.82rem;
  }
}

/* Mobile (≤576px): full-width dropdown, slightly larger touch targets */
@media (max-width: 576px) {
  #fe-search-wrapper {
    width: 100%;
  }

  .fe-search-dropdown {
    /* Snap to the full viewport width on mobile */
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    width: 100vw;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border-top: 2px solid var(--accent);
    /* Ensure it sits above everything */
    z-index: 1100;
  }

  .fe-search-item {
    padding: 12px 16px;
    gap: 12px;
  }

  .fe-search-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .fe-search-title {
    font-size: 0.88rem;
  }

  .fe-search-meta {
    font-size: 0.78rem;
  }

  .fe-search-feedback {
    padding: 18px;
    font-size: 0.88rem;
  }
}

/* ── Button Loading Spinner ──────────────────────────────── */
@keyframes fe-btn-spin { to { transform: rotate(360deg); } }
.fe-btn-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: fe-btn-spin .55s linear infinite;
  vertical-align: -3px;
  flex-shrink: 0;
}

/* Very small devices (≤360px): compact items */
@media (max-width: 360px) {
  .fe-search-item {
    padding: 10px 14px;
    gap: 10px;
  }
  .fe-search-thumb {
    width: 32px;
    height: 32px;
  }
  .fe-search-title {
    font-size: 0.82rem;
  }
  .fe-search-cat {
    display: none; /* Hide category label to save space on very small screens */
  }
}


