/* Amazon Ember Font Definitions */
@font-face {
  font-family: 'Amazon Ember';
  src: url('/static/fonts/AmazonEmber_W_Rg.woff2') format('woff2'),
       url('/static/fonts/AmazonEmber_W_Rg.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Amazon Ember';
  src: url('/static/fonts/AmazonEmber_W_Bd.woff2') format('woff2'),
       url('/static/fonts/AmazonEmber_W_Bd.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Amazon Ember';
  src: url('/static/fonts/AmazonEmber_W_RgIt.woff2') format('woff2'),
       url('/static/fonts/AmazonEmber_W_RgIt.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Amazon Ember';
  src: url('/static/fonts/AmazonEmber_W_BdIt.woff2') format('woff2'),
       url('/static/fonts/AmazonEmber_W_BdIt.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Global styles - modern clean look */
:root{
  --bg:#f7f8fb;
  --card:#ffffff;
  --muted:#6b7280;
  --accent:#2563eb; /* blue */
  --accent-2:#7c3aed; /* purple */
  --success:#5f8377;
  --radius:12px; /* Consistent border radius for all containers */
#noui-price, #bsrDual, #compDual {
  height: auto !important; /* Override inline height: 18px */
  min-height: 18px !important;
  padding: 20px 24px !important;
  margin: 8px 0 !important;
}

/* Commission, Rating, and Review Count sliders need extra space for pips */
#commissionDual, #ratingDual, #reviewCountDual {
  height: auto !important;
  min-height: 18px !important;
  padding: 20px 24px 50px 24px !important; /* Extra bottom padding for pips */
  margin: 8px 0 !important;
}ights and add padding to slider containers */
#noui-price, #bsrDual, #reviewCountDual, #compDual {
  height: auto !important; /* Override inline height: 18px */
  min-height: 18px !important;
  padding: 20px 24px !important;
  margin: 8px 0 !important;
}

  --glass: rgba(255,255,255,0.7);
  /* Slider variables (shared between noUiSlider and native dual-range fallback) */
  --slider-track-height: 18px;
  --slider-handle-size: 20px;
  --slider-track-radius: 6px;
  --slider-gradient: linear-gradient(90deg, var(--accent), var(--accent-2));
}
*{box-sizing:border-box}
body{font-family:'Amazon Ember', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; background:var(--bg); color:#111827; margin:0; font-size:16px}
.container{max-width:1200px;margin:28px auto;padding:20px;box-sizing:border-box;width:auto}
.header{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;padding:10px 18px;border-bottom-left-radius:12px;border-bottom-right-radius:12px;box-shadow:0 8px 30px rgba(15,23,42,0.08)}
.header .inner{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:nowrap}
.brand{display:flex;align-items:center;gap:12px}
.brand img{width:36px;height:36px;border-radius:8px;background:var(--glass);padding:4px}
.header .nav-links{margin-left:auto;display:flex;align-items:center}
.nav-right{display:flex;gap:16px;align-items:center}
.brand h1{font-size:18px;margin:0}
.user-block{display:flex;align-items:center;gap:12px}
.user-block .meta{font-size:13px;text-align:right}
.user-block .meta .name{font-weight:600}
.user-block .btn{background:rgba(255,255,255,0.12);border:0;color:#fff;padding:8px 12px;border-radius:10px;cursor:pointer}
.grid{display:grid;gap:24px}
.tools-grid{grid-template-columns:repeat(2,1fr)} /* Adjusted for 2 columns on desktop */
/* A compact tools row: 4 equal columns on wide screens, falls back to 2/1 on smaller widths */
.tools-grid.tools-row{grid-template-columns:repeat(4,1fr)}
.card{background:var(--card);padding:18px;border-radius:var(--radius);box-shadow:0 8px 20px rgba(15,23,42,0.06)}
.tool-card{display:flex;flex-direction:column;gap:10px;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease;align-items:center;text-align:center;padding:20px 16px}
.tool-card:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(15,23,42,0.08)}
.tool-icon{width:56px;height:56px;border-radius:10px;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;color:#fff;font-size:22px}
.tool-title{font-size:15px;font-weight:700;margin:0}
.tool-desc{color:var(--muted);font-size:13px}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}
.stat{padding:18px;border-radius:10px;background:linear-gradient(180deg,rgba(99,102,241,0.04),transparent);text-align:center}
.stat .num{font-weight:700;font-size:22px;color:var(--accent)}
.small{font-size:15px;color:var(--muted)}
.search-bar{display:flex;gap:12px;align-items:center}
.search-filters-row{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;margin-top:12px;width:100%}
.search-filters-row .search-bar{flex:1;min-width:360px;display:flex;align-items:center;gap:10px;min-width:0}
.search-filters-row .search-bar input[type="text"], .search-filters-row .search-bar .input, .search-filters-row .search-bar input[type="search"]{flex:1;min-width:0}
.search-filters-row .filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.search-filters-row .filters .input{margin-left:4px}
.input, textarea, select{padding:12px;border-radius:10px;border:1px solid #e6e9ee;background:#fff;font-size:14px}
.btn-primary{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;padding:12px 16px;border-radius:10px;border:0;cursor:pointer}
.btn-ghost{background:transparent;border:1px solid #e6e9ee;padding:10px 12px;border-radius:10px;cursor:pointer}
.btn{padding:8px 12px;border-radius:8px;border:0;background:#f3f4f6;color:#111827;cursor:pointer}
.btn-secondary{background:transparent;border:1px solid rgba(255,255,255,0.12);color:#fff;padding:8px 12px;border-radius:8px}
.save-btn{background:#f59e0b;color:#fff;padding:8px 12px;border-radius:8px;border:0;cursor:pointer}

/* Header nav links - Updated for unified 5-button toolbar */
.header .nav-links a:not(.bg-indigo-600){color:#fff;margin-left:14px;text-decoration:none;font-weight:600}

/* Active link state for main header navigation - Global glow effect */
.nav-links a.active-link {
    color: white !important;
    font-weight: 700 !important;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15); /* Subtle highlight */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); /* Soft glow */
    margin-left: 14px; /* Maintain consistent spacing */
}

.header .nav-links a {
    transition: all 0.2s ease; /* Add transition for smoothness */
}

/* Ensure Tailwind classes work properly in nav */
.header .nav-links .flex{display:flex}
.header .nav-links .gap-2{gap:0.5rem}
.header .nav-links .items-center{align-items:center}

/* Page navigation center */
.page-nav{display:flex;gap:8px;justify-content:center;margin-top:18px}
.results{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin-top:16px}
.card-product{display:flex;gap:12px;align-items:flex-start}
.thumb{width:96px;height:96px;border-radius:8px;object-fit:cover;background:#f3f4f6}
.meta{flex:1}
.title{font-weight:700;font-size:15px}
.price{color:var(--success);font-weight:700}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#f1f5f9;color:var(--muted);font-size:12px}
.footer{padding:24px;text-align:center;color:var(--muted);font-size:13px}
@media (max-width: 980px){.tools-grid{grid-template-columns:repeat(2,1fr)}.stats-grid{grid-template-columns:repeat(2,1fr)}.header .inner{flex-direction:column;align-items:flex-start}}
@media (max-width: 600px){.tools-grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr}.search-bar{flex-direction:column;align-items:stretch}}


/* Product Finder is list-only. Define a stable 8-column layout for header and rows */
.results.list-mode{grid-template-columns:1fr;} /* ensure results is single column that contains rows */

/* Each row (card) displays as an 8-column grid matching header columns:
   col-image | col-main | col-price | col-est-revenue | col-monthly | col-bsr | col-competition | col-actions */
.results.list-mode .card{
  display:grid;
  grid-template-columns: 100px 200px 110px 140px 130px 100px 130px 120px;
  gap:16px;
  align-items:start;
  padding:14px;
  overflow:hidden;
}
.results.list-mode .col-image{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  border-radius:8px;
  background:#fff;
  box-shadow:0 6px 18px rgba(15,23,42,0.04);
  min-width:100px;
  width:100%;
}
.results.list-mode .col-main{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
  overflow:hidden;
}
.results.list-mode .col-price, .results.list-mode .col-est-revenue, .results.list-mode .col-monthly, .results.list-mode .col-bsr, .results.list-mode .col-competition{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:var(--muted);
  align-items:center;
  overflow:hidden;
  word-break:break-word;
}
.results.list-mode .col-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:center;
  overflow:visible;
}
.results.list-mode .col-actions .btn-primary{
  min-width:110px;
  text-align:center;
  white-space:nowrap;
  font-size:13px;
  padding:6px 8px;
}
.results.list-mode .col-actions .save-btn{
  min-width:110px;
  text-align:center;
  white-space:nowrap;
  font-size:13px;
  padding:6px 8px;
}


/* Adjustments for list mode */
.results.list-mode .meta{display:flex;flex-direction:column;}
.results.list-mode .actions{margin-top:auto;display:flex;gap:8px;align-self:flex-end;}


/* Duplicate previous list/grid variants removed — canonical 8-column layout defined earlier */

/* Button color variants for action column */
.buy-btn{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;padding:8px 12px;border-radius:8px;text-decoration:none;display:inline-block}
.save-btn{background:linear-gradient(90deg,#f97316,#fb923c);color:#fff;padding:8px 12px;border-radius:8px;border:0;cursor:pointer}
.reset-sort-btn{background:transparent;border:1px solid #e6e9ee;padding:6px 8px;border-radius:8px}

/* Truncate long titles so they align with header columns */
.results.list-mode .col-main .title{
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
  word-break:break-word;
}

.results.list-mode .col-main .small{
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
  font-size:12px;
}

/* Align numeric columns center for readability */
.results.list-mode .col-revenue, .results.list-mode .col-monthly, .results.list-mode .col-competition{
  text-align:center;
}

/* Filters row styling */
.filters-row{margin-top:12px;padding:12px;border-radius:10px}

/* Section titles */
.section-title{margin:8px 0 8px 0;font-size:20px;line-height:1.15;font-weight:700;color:#111}
.section-title:not(:first-of-type){
  /* add extra spacing above subsequent section titles so sections feel separated */
  margin-top:24px;
}
.section-title-inline{font-size:13px;font-weight:700;color:#374151;margin-right:6px}

/* Dual-range slider: visually mimic noUiSlider visuals exactly (size, handles, track, shadows) */
.dual-range{position:relative;width:100%;height:var(--slider-track-height);display:block;margin-left:0}
.dual-range input[type=range]{
  position:absolute;left:0;top:0;width:100%;height:var(--slider-track-height);background:transparent;-webkit-appearance:none;appearance:none;z-index:6;
}
/* track (mimic noUi-target background/border/shadow) */
.dual-range{background:transparent;border-radius:4px;border:none;box-shadow:none}
.dual-range input[type=range]::-webkit-slider-runnable-track{height:var(--slider-track-height);background:transparent;border-radius:var(--slider-track-radius)}
.dual-range input[type=range]::-moz-range-track{height:var(--slider-track-height);background:transparent;border-radius:var(--slider-track-radius)}

/* thumb: match noUi handle dimensions and styling (rectangular handle with subtle inner grooves) */
.dual-range input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:34px;
  height:28px;
  border-radius:3px;
  background:#FFF;
  border:1px solid #D9D9D9;
  cursor:default;
  box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #EBEBEB,0 3px 6px -3px #BBB;
  margin-top: calc((var(--slider-track-height) - 28px)/2);
  transition: transform .12s ease, box-shadow .12s ease;
  z-index: 7;
  /* add inner vertical grooves to emulate vendor handles */
  background-image:
    linear-gradient(90deg, transparent 13px, #E8E7E6 13px, #E8E7E6 14px, transparent 14px),
    linear-gradient(90deg, transparent 16px, #E8E7E6 16px, #E8E7E6 17px, transparent 17px);
  background-repeat: no-repeat;
  background-position: center;
  background-color: #FFF;
}
.dual-range input[type=range]::-moz-range-thumb{
  width:34px;
  height:28px;
  border-radius:3px;
  background:#FFF;
  border:1px solid #D9D9D9;
  cursor:default;
  box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #EBEBEB,0 3px 6px -3px #BBB;
  transition: transform .12s ease, box-shadow .12s ease;
  z-index: 7;
}

/* Hover / focus states mimic vendor */
.dual-range input[type=range]:hover::-webkit-slider-thumb,
.dual-range input[type=range]:active::-webkit-slider-thumb{ transform: none; box-shadow: inset 0 0 1px #FFF,inset 0 1px 7px #DDD,0 3px 6px -3px #BBB; }
.dual-range input[type=range]:focus::-webkit-slider-thumb{ outline: none; box-shadow: inset 0 0 1px #FFF,inset 0 1px 7px #DDD,0 3px 6px -3px #BBB; }

/* filled range: pseudo element styled like noUi-connect but using app gradient */
.dual-range::before{content:'';position:absolute;left:var(--fr-left,0);top:0;height:var(--slider-track-height);border-radius:3px;background-image:var(--slider-gradient);background-repeat:no-repeat;background-size:100% 100%;z-index:1;width:var(--fr-width,0);pointer-events:none}

/* Minimal noUiSlider overrides - let vendor CSS handle all positioning */
.noUi-connect {
  background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important;
}

/* Override inline heights and add padding to slider containers */
#noui-price, #bsrDual, #reviewCountDual, #compDual {
  height: auto !important; /* Override inline height: 18px */
  min-height: 18px !important;
  padding: 20px 24px !important;
  margin: 8px 0 !important;
}

/* Commission and Rating sliders need extra space for pips */
#commissionDual, #ratingDual {
  height: auto !important;
  min-height: 18px !important;
  padding: 20px 24px 50px 24px !important; /* Extra bottom padding for pips */
  margin: 8px 0 !important;
}

/* Move tooltips below sliders with more spacing from handles */
.noUi-horizontal .noUi-tooltip {
  bottom: -150% !important;
  top: auto !important;
  transform: translate(-50%, 0) !important;
}

/* Style pips for Commission slider */
#commissionDual .noUi-pips {
  padding-top: 10px !important;
}

#commissionDual .noUi-value {
  font-size: 14px !important; /* Match tooltip font size */
  color: #6b7280 !important;
  transform: translate(-50%, 0) !important;
}

#commissionDual .noUi-marker {
  background: #d1d5db !important;
  height: 6px !important;
  width: 1px !important;
}

#commissionDual .noUi-marker-large {
  background: #9ca3af !important;
  height: 10px !important;
}

/* Style pips for Rating slider */
#ratingDual .noUi-pips {
  padding-top: 10px !important;
}

#ratingDual .noUi-value {
  font-size: 14px !important; /* Match tooltip font size */
  color: #f59e0b !important; /* Gold color for stars */
  transform: translate(-50%, 0) !important;
}

#ratingDual .noUi-marker {
  background: #d1d5db !important;
  height: 6px !important;
  width: 1px !important;
}

#ratingDual .noUi-marker-large {
  background: #9ca3af !important;
  height: 10px !important;
}

/* Style pips for Review Count slider */
#reviewCountDual .noUi-pips {
  padding-top: 10px !important;
}

#reviewCountDual .noUi-value {
  font-size: 14px !important; /* Match tooltip font size */
  color: #6b7280 !important;
  transform: translate(-50%, 0) !important;
}

#reviewCountDual .noUi-marker {
  background: #d1d5db !important;
  height: 6px !important;
  width: 1px !important;
}

#reviewCountDual .noUi-marker-large {
  background: #9ca3af !important;
  height: 10px !important;
}

/* Add breathing room to buttons */
#applyFiltersBtn {
  margin-top: 24px !important;
}

.reset-sort-btn {
  margin-top: 12px !important;
}

/* Fix alignment of the flex containers that hold input + slider + input */
div.flex.items-center.gap-3 {
  align-items: center !important;
  min-height: 60px !important; /* Give room for padding */
}

/* Style all slider input fields consistently */
#minPrice, #maxPrice, #minBsr, #maxBsr, #minCommissionRate, #minReviewRating, #minReviewCount, #minCompetition, #maxCompetition {
  height: 38px !important;
  line-height: 1.4 !important;
  display: flex !important;
  align-items: center !important;
  padding: 8px 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  font-size: 14px !important;
}

/* Header centering/arrow layout handled in consolidated header block below */

/* Ensure primary buttons don't wrap anywhere */
.btn-primary{white-space:nowrap}

/* Make Save and Buy have consistent typography and remove underline on anchor */
.btn-primary, .save-btn{
  font-size:14px;
  line-height:1.2;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn-primary{
  text-decoration:none; /* remove underline for anchor buttons */
  display:inline-block;
}
.btn-primary:hover, .btn-primary:focus{
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.12);
  filter: brightness(0.98);
  text-decoration:none;
}
.save-btn:hover, .save-btn:focus{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(245,158,11,0.12);
  filter: brightness(0.98);
}

/* Modern hover effects (inspired visuals) */
.btn-primary{
  position:relative;
  overflow:hidden;
  z-index:0;
  padding:12px 18px;
  border-radius:10px;
}
.btn-primary::before{
  /* animated gradient sweep */
  content: '';
  position: absolute;
  left: -120%;
  top: 0;
  width: 220%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  transform: skewX(-20deg) translateX(0);
  transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .6s ease;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.btn-primary:hover::before,
.btn-primary:focus::before{
  transform: skewX(-20deg) translateX(60%);
  opacity: 1;
}
.btn-primary::after{
  /* subtle glowing border */
  content: '';
  position: absolute;
  inset: -2px;
  border-radius:12px;
  background: linear-gradient(90deg, rgba(37,99,235,0.06), rgba(124,58,237,0.04));
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  z-index: -2;
}
.btn-primary:hover::after{ opacity: 1; transform: scale(1.02); }

/* Animated micro-shadow for save button */
.save-btn{ position:relative; overflow:visible; }
.save-btn::after{
  content:'';
  position:absolute; left:50%; top:100%; transform:translateX(-50%) scale(.9);
  width:70%; height:8px; background:rgba(0,0,0,0.08); border-radius:50%; filter:blur(6px);
  transition: transform .18s ease, opacity .18s ease;
  opacity:0.9;
  z-index:-1;
}
.save-btn:hover::after{ transform:translateX(-50%) scale(1); opacity:1 }

/* Accessibility: focus ring */
.btn-primary:focus-visible, .save-btn:focus-visible{
  outline: 3px solid rgba(37,99,235,0.12);
  outline-offset: 3px;
}
/* Responsive adjustments - maintain consistent column widths */
@media (max-width: 1200px){
  .results.list-mode .card{
    grid-template-columns: 90px 160px 100px 120px 110px 90px 110px 100px;
    gap: 12px;
  }
  .list-header.show{
    grid-template-columns: 90px 160px 100px 120px 110px 90px 110px 100px;
    gap: 12px;
  }
}
@media (max-width: 768px){
  .results.list-mode .card{
    grid-template-columns: 80px 140px 90px 100px 100px 80px 100px 90px;
    gap: 10px;
  }
  .list-header.show{
    grid-template-columns: 80px 140px 90px 100px 100px 80px 100px 90px;
    gap: 10px;
  }
}

/* List header (column labels) */
.list-header{
  display:none;
  align-items:center;
  background:transparent;
  padding:12px 14px;
  border-radius:8px;
  margin-bottom:12px;
  color:var(--muted);
  font-weight:700;
}
.list-header .col{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  word-break:break-word;
}
.list-header .col:first-child{
  justify-content:flex-start;
}
.list-header .col .arrow{
  margin-left:6px;
  font-size:12px;
  color:var(--muted);
  width:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.list-header.show{
  display:grid;
  grid-template-columns: 100px 200px 110px 140px 130px 100px 130px 120px;
  gap:16px;
  align-items:center;
}

/* Make list the default visible mode */
.results{margin-top:8px}

/* Icon buttons */
.view-icon{width:22px;height:22px;display:inline-block;vertical-align:middle}
.btn-ghost.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:8px}

/* Note: header centering and arrow layout handled by the consolidated header block above. Duplicate overrides removed. */

/* Quick Actions: 4-card grid for main navigation */
.quick-actions-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin:20px 0}
.action-card{display:flex;flex-direction:column;gap:12px;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease;align-items:center;text-align:center;padding:24px 18px;border:0;background:var(--card);text-decoration:none;color:inherit}
.action-card:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(15,23,42,0.12)}
.action-icon{width:56px;height:56px;border-radius:12px;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;color:#fff;font-size:24px}
.action-title{font-size:17px;font-weight:700;margin:0;color:#111827}
.action-desc{color:var(--muted);font-size:14px;line-height:1.4;margin:0}
@media (max-width: 980px){.quick-actions-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 600px){.quick-actions-grid{grid-template-columns:repeat(1,1fr)}}

/* Quicklinks: responsive grid for external affiliate resources */
.quicklinks{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:12px}
.quicklinks .tool-card{align-items:center;text-align:center}
@media (max-width: 980px){.quicklinks{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 600px){.quicklinks{grid-template-columns:repeat(1,1fr)}}

/* Slider variant test harness */
.variant-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.variant{background:#fff;padding:10px;border-radius:8px;box-shadow:0 6px 18px rgba(15,23,42,0.04);text-align:center}
.variant-label{font-weight:700;margin-bottom:8px}
.variant-control{min-height:44px;display:flex;align-items:center;justify-content:center}
@media (max-width:900px){.variant-grid{grid-template-columns:repeat(2,1fr)}}

/* Ensure tool icons stay slightly smaller on compact cards */
.tool-card .tool-icon{width:56px;height:56px}

/* Modal and sidebar polish for saved-products */
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,0.45);display:flex;align-items:center;justify-content:center;z-index:60}
.modal-panel{background:var(--card);border-radius:12px;padding:20px;max-width:640px;width:96%;box-shadow:0 20px 40px rgba(15,23,42,0.12)}
.sidebar{background:var(--card);padding:12px;border-radius:10px}
.sidebar .group-item{display:block;padding:8px 10px;border-radius:8px;border:1px solid #eef2ff;margin-bottom:8px;text-align:left}
.sidebar .group-item.active{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;border-color:transparent}

/* Toast notifications */
.toast{background:#111827;color:#fff;padding:10px 14px;border-radius:10px;box-shadow:0 8px 30px rgba(15,23,42,0.12);font-size:13px;opacity:1}
.toast.info{background:rgba(17,24,39,0.95)}
.toast.success{background:linear-gradient(90deg,#10b981,#059669)}
.toast.error{background:linear-gradient(90deg,#ef4444,#dc2626)}
.toast.warn{background:linear-gradient(90deg,#f59e0b,#d97706)}

/* Global spinner/backdrop */
.spinner-backdrop{position:fixed;inset:0;background:rgba(0,0,0,0.32);display:flex;align-items:center;justify-content:center;z-index:99998}
.spinner{width:48px;height:48px;border-radius:50%;border:5px solid rgba(255,255,255,0.12);border-top-color:rgba(255,255,255,0.9);animation:spin 800ms linear infinite}
@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}

/* Sort badge (shows stack order number) */
.sort-badge{display:inline-block;min-width:18px;height:18px;padding:0 6px;border-radius:999px;background:rgba(0,0,0,0.06);color:var(--muted);font-size:12px;margin-left:8px;text-align:center;line-height:18px}
.sort-badge.active{background:var(--accent);color:#fff}

/* Reset sort button */
.reset-sort-btn{margin-left:12px;padding:6px 10px;border-radius:8px;background:transparent;border:1px solid #e6e9ee}

/* Sort header button visuals */
.sort-btn{background:transparent;border:0;padding:6px 8px;font-weight:600;color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.sort-btn:hover{color:var(--accent)}
.sort-btn:focus{outline:3px solid rgba(37,99,235,0.12);outline-offset:3px}

/* Remove duplicate overrides - using the ones above */

/* Removed duplicate connect styling - using the one above */

/* Let vendor CSS handle all slider positioning and dimensions */

/* Dashboard specific styling for better section separation */
.dashboard-container{display:flex;flex-direction:column;gap:32px}

/* Welcome section two-column layout */
.dashboard-welcome-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:start}
@media (max-width: 768px){.dashboard-welcome-grid{grid-template-columns:1fr;gap:20px}}

/* Welcome content styling */
.welcome-content h1{margin:0 0 12px 0}
.welcome-content p{margin:0 0 16px 0}
.welcome-content p:last-child{margin-bottom:0}

/* Tool description styling */
.tool-description{
    color:#374151;
    font-size:16px;
    line-height:1.6;
    margin:16px 0 20px 0;
}

/* Inspirational quote container */
.quote-container{
    background:#f8fafc;
    padding:16px;
    border-radius:8px;
    border-left:4px solid var(--accent);
    margin-top:20px;
}

.quote-text{
    font-style:italic;
    font-weight:600;
    color:#4f46e5;
    margin:0;
    font-size:15px;
}

/* Welcome stats section */
.welcome-stats{padding:19px 0 24px 0}
.welcome-stats h2{margin:0 0 20px 0;font-size:20px}

/* Stats with action buttons - side by side layout */
.stats-with-actions{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media (max-width: 600px){.stats-with-actions{grid-template-columns:1fr}}

/* Individual stat card with action button */
.stat-card{display:flex;flex-direction:column;gap:16px}
.stat-card .stat{margin:0}

/* Action button styling - matches Upload Content button */
.stat-action-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:12px 16px;
    background:linear-gradient(90deg,var(--accent),var(--accent-2));
    color:#fff;
    text-decoration:none;
    border-radius:10px;
    border:0;
    font-size:16px;
    font-weight:600;
    text-align:center;
    cursor:pointer;
    transition:all .2s ease;
}
.stat-action-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(37,99,235,0.3);
}

/* Affiliate Toolkit - single row layout */
.affiliate-toolkit-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:20px;margin:24px 0}
@media (max-width: 1200px){.affiliate-toolkit-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width: 768px){.affiliate-toolkit-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 480px){.affiliate-toolkit-grid{grid-template-columns:1fr}}

/* Utility classes for consistent styling */
.flex{display:flex}
.flex-wrap{flex-wrap:wrap}
.items-center{align-items:center}
.justify-between{justify-content:space-between}
.gap-2{gap:8px}
.gap-3{gap:12px}
.gap-4{gap:16px}
.mb-4{margin-bottom:16px}
.mb-6{margin-bottom:24px}
.mb-8{margin-bottom:32px}
.text-gray-600{color:#6b7280}

/* Affiliate Toolkit Button Styling */
.grid-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Responsive toolkit buttons */
@media (max-width: 768px) {
  .grid-cols-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-cols-5 {
    grid-template-columns: 1fr;
  }
}

/* Enhanced button styling for toolkit */
.btn-primary {
  text-decoration: none !important;
  display: flex !important;
  transition: all 0.2s ease !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* Profile Dropdown Menu Styles */
.relative { position: relative; }
.hidden { display: none; }

/* Profile Button Styling */
.profile-menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

.profile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.profile-menu-btn:active {
  transform: scale(0.95);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.profile-menu-btn:hover .profile-avatar {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.alert-success {
  background-color: #d1f2eb;
  border: 1px solid #52c41a;
  color: #135e36;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #ef4444;
  color: #b91c1c;
}

.alert h4 {
  margin: 0 0 0.5rem 0;
  font-weight: bold;
}

.alert pre {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin: 0.5rem 0;
  overflow-x: auto;
}

.profile-icon {
  width: 20px;
  height: 20px;
  color: white;
  stroke-width: 2.5;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 1000;
  transform: translateY(-4px) scale(0.95);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.dropdown-menu:not(.hidden) {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Dropdown Header */
.dropdown-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid #e2e8f0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar-small svg {
  width: 16px;
  height: 16px;
  color: white;
  stroke-width: 2.5;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.2;
}

.user-email {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* Dropdown Divider */
.dropdown-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0;
}

/* Dropdown Items - Reset all inherited styles */
.dropdown-menu a.dropdown-item,
.dropdown-menu button.dropdown-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 12px 20px !important;
  margin: 0 !important;
  text-decoration: none !important;
  color: #374151 !important;
  background: transparent !important;
  border: none !important;
  border-left: 3px solid transparent !important;
  text-align: left !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  line-height: 1.4 !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.dropdown-menu a.dropdown-item:hover,
.dropdown-menu button.dropdown-item:hover {
  background-color: #f8fafc !important;
  color: #1f2937 !important;
  border-left-color: #667eea !important;
  text-decoration: none !important;
}

.dropdown-icon {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2 !important;
  color: #6b7280 !important;
  transition: color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.dropdown-menu .dropdown-item:hover .dropdown-icon {
  color: #667eea !important;
}

/* Logout Item Specific Styling */
.dropdown-menu button.logout-item {
  border-top: 1px solid #f3f4f6 !important;
  margin-top: 4px !important;
}

.dropdown-menu button.logout-item:hover {
  background-color: #fef2f2 !important;
  border-left-color: #ef4444 !important;
  color: #dc2626 !important;
}

.dropdown-menu button.logout-item:hover .dropdown-icon {
  color: #ef4444 !important;
}

/* SVG Icon Styles */
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.text-white { color: #ffffff; }
.bg-gray-600 { background-color: #4b5563; }
.rounded-full { border-radius: 9999px; }
.p-1 { padding: 0.25rem; }

/* ============================================
   TAILWIND-LIKE UTILITY CLASSES FOR PRODUCTION
   ============================================ */

/* Display & Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:flex-row { flex-direction: row; }
.lg\:w-1\/4 { width: 25%; }

/* Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.min-h-96 { min-height: 24rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-md { max-width: 28rem; }

/* Spacing - Margin */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

/* Spacing - Padding */
.p-0 { padding: 0; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

/* Background Colors */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-500 { background-color: #ef4444; }
.bg-green-500 { background-color: #22c55e; }

/* Text Colors */
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-blue-600 { color: #2563eb; }
.text-indigo-600 { color: #4f46e5; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }

/* Font Styles */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.italic { font-style: italic; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Borders & Shadows */
.border { border: 1px solid #e5e7eb; }
.border-0 { border: 0; }
.border-none { border: none; }
.border-l-4 { border-left: 4px solid; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-indigo-600 { border-color: #4f46e5; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Cursor & Interactivity */
.cursor-pointer { cursor: pointer; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.transition { transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.duration-150 { transition-duration: 150ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Responsive */
@media (max-width: 1024px) {
  .lg\:w-1\/4 { width: 100%; }
  .lg\:flex-row { flex-direction: column; }
}

@media (max-width: 768px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .grid-cols-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .px-4 { padding-left: 1rem; padding-right: 1rem; }
  .py-12 { padding-top: 2rem; padding-bottom: 2rem; }
}