/* ─────────────────────────────────────────────────────────────────────────
   Listagrow · Free AI Product Image Enhancer
   enhancer.css
   ───────────────────────────────────────────────────────────────────────── */

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

:root {
  /* Brand palette — aligned with generator.css */
  --brand:        #81c171;
  --brand-dark:   #2b2b2b;
  --brand-mid:    #515151;
  --brand-accent: #296e17;
  --brand-light:  #f3f7f2;
  --success:      #4CAF50;
  --danger-bg:    #ffe6e6;
  --danger-border:#ff4444;
  --danger-text:  #cc0000;

  /* Neutrals */
  --text:         #2c3841;
  --text-muted:   #6B7280;
  --border:       #e0e0e0;
  --bg:           #f7f7f7;
  --card:         #ffffff;

  /* Geometry */
  --radius:       12px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 20px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 30px rgba(0,0,0,.10);
  --transition:   .2s ease;
}

html { scroll-behavior: smooth; }



a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 900px;
  margin: 0 auto;
  /* padding: 0 1rem; */
}

.hidden { display: none !important; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
/* Button base — gradient + shimmer, identical to generator.css */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
  color: #fff;
  border: none;
  padding: 10px 15px;
  font-size: .9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 8px rgba(44,56,65,.2);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s;
}
.btn:hover::before { left: 100%; }
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44,56,65,.3);
  background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand-dark) 100%);
  text-decoration: none;
  color: #fff;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-nav {
  font-size: .85rem;
  padding: .5rem 1rem;
  border-radius: 8px;
}

.btn-enhance {
  background: linear-gradient(135deg, #4a9a3b 0%, var(--brand) 100%);
  font-size: 1rem;
  padding: .85rem 2rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(129,193,113,.35);
  min-width: 200px;
}
.btn-enhance:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand) 0%, #4a9a3b 100%);
  box-shadow: 0 6px 20px rgba(129,193,113,.45);
}

.btn-download {
  background: linear-gradient(135deg, #388e3c 0%, var(--success) 100%);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-accent);
  border: 2px solid var(--brand);
  box-shadow: none;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--brand-light);
  box-shadow: none;
  transform: none;
}
.btn-secondary::before { display: none; }

.btn-cta-shopify {
  background: linear-gradient(135deg, #7ba038 0%, #96BF48 100%);
  border-radius: 50px;
  padding: .75rem 1.5rem;
}

.btn-cta-saas {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
  border-radius: 50px;
  padding: .75rem 1.5rem;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: .75rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header {
    text-align: center;
    color: #424242;
    margin-bottom: 20px;
}
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -.02em;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #f0faf0 0%, #f8fdf8 100%);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero-inner { max-width: 720px; margin-inline: auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--brand-accent);
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}
.hero-accent { color: var(--brand-accent); }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

/* Trust badge — dark gradient, identical to generator.css */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(181deg, #353535 0%, #737373 100%);
  color: #fff;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  transition: transform .3s ease, box-shadow .3s ease;
}
.trust-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.trust-icon {
  font-size: 18px;
  animation: sparkle 2s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .7; transform: scale(1.1); }
}
#trustCount { font-weight: 600; letter-spacing: .5px; }

/* ── Main layout ───────────────────────────────────────────────────────── */
.main-content { padding: 0 0 0; }

/* ── Card ──────────────────────────────────────────────────────────────── */
/* Card — identical to generator.css */
.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(129, 193, 113, 0.1);
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #2c3841;
  margin-bottom: .75rem;
}

/* ── Drop zone ─────────────────────────────────────────────────────────── */
.drop-zone {
  border: 3px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--brand);
  background: linear-gradient(135deg, #f8fdf8 0%, var(--brand-light) 100%);
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(129,193,113,.15);
}
.drop-zone.drag-over {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(129,193,113,.25);
  border-style: solid;
}
.drop-zone-inner {
  text-align: center;
  pointer-events: none;
  padding: 0rem 0.5rem 0.5rem 0.5rem;
}
.drop-icon { font-size: 2rem; margin-bottom: 0rem; transition: all .4s cubic-bezier(.4,0,.2,1); }
.drop-zone:hover .drop-icon { transform: scale(1.15) translateY(-2px); }
.drop-zone.drag-over .drop-icon { transform: scale(1.2) translateY(-4px); animation: bounce .6s ease infinite; }
@keyframes bounce {
  0%, 100% { transform: scale(1.2) translateY(-4px); }
  50%       { transform: scale(1.2) translateY(-8px); }
}
.drop-text { font-size: .95rem; color: var(--text); }
.drop-hint { font-size: .8rem; color: var(--text-muted); }

/* Preview */
.preview-wrap {
  width: 100%;
  height: 100%;
  min-height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-img {
  max-height: 260px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.btn-remove-img {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 28px; height: 28px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.btn-remove-img:hover { background: rgba(0,0,0,.75); }

/* ── Style cards ───────────────────────────────────────────────────────── */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}
.style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.2rem .75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.style-card:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.style-card.active {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 2px rgba(129,193,113,.3);
}
.style-icon { font-size: 1.6rem; }
.style-name { font-size: .9rem; font-weight: 700; color: var(--text); }
.style-desc { font-size: .75rem; color: var(--text-muted); }

/* ── Sub-options ───────────────────────────────────────────────────────── */
.sub-options { margin-top: 0.5rem; }

.sub-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}
.sub-tip {
  font-size: .88rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem 1rem;
}

/* Color picker */
.color-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.color-swatch {
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  background: none;
}
.color-hex {
  width: 100px;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: monospace;
  font-size: .9rem;
  color: var(--text);
}
.color-hex:focus { outline: 2px solid var(--brand); border-color: transparent; }

.color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.preset {
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: transform var(--transition), border-color var(--transition);
}
.preset:hover, .preset.active {
  transform: scale(1.15);
  border-color: var(--brand);
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

/* Scene chips */
.scene-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.scene-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .85rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
  color: var(--text);
}
.scene-chip:hover { border-color: var(--brand); background: var(--brand-light); }
.scene-chip.active { border-color: var(--brand); background: var(--brand-light); font-weight: 600; }

/* ── Aspect ratio selector ─────────────────────────────────────────────── */

/* Separator when the ratio row lives inside sub-options alongside another sub-option */
.sub-option-ratio {
  margin-top: 0.5rem;
  padding-top: 1.25rem;
}

.ratio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.ratio-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .3rem .5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 72px;
  text-align: center;
}
.ratio-chip:hover { border-color: var(--brand); background: var(--brand-light); }
.ratio-chip.active {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 2px rgba(129,193,113,.3);
}
.ratio-name { font-size: .82rem; font-weight: 700; color: var(--text); }
.ratio-desc { font-size: .7rem; color: var(--text-muted); white-space: nowrap; }

/* Visual ratio preview boxes — sized to represent each aspect ratio */
.ratio-preview {
  background: #c8c8c8;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
}
.ratio-original      { width: 20px; height: 16px; } /* generic ~4:3-ish */
.ratio-square        { width: 18px; height: 18px; } /* 1:1  */
.ratio-portrait-tall { width: 14px; height: 18px; } /* 4:5  */
.ratio-portrait      { width: 15px; height: 20px; } /* 3:4  */
.ratio-landscape     { width: 20px; height: 15px; } /* 4:3  */
.ratio-wide          { width: 22px; height: 12px; } /* 16:9 */

.ratio-chip.active .ratio-preview { background: var(--brand-accent); }
.ratio-chip:hover .ratio-preview  { background: var(--brand); }

/* ── CAPTCHA + Enhance row ─────────────────────────────────────────────── */
.captcha-row { margin-bottom: 1rem; }

/* Rate-limit banner — aligned with generator.css .rate-limit-info */
.rate-limit-banner {
  color: #8b6300;
  background: #fff8e6;
  border: 2px solid #f0a500;
  padding: 7px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
}
.rl-icon { font-size: 1.1rem; }
.rl-link { color: var(--brand-accent); font-weight: 600; white-space: nowrap; }

.enhance-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.remaining-label {
  font-size: .85rem;
  color: var(--text-muted);
}

/* Error — identical to generator.css .error */
.error-msg {
  background: #ffe6e6;
  border: 2px solid #ff4444;
  color: #cc0000;
  padding: 7px 12px;
  border-radius: 8px;
  margin-top: .75rem;
  font-size: .9rem;
}

/* ── Loading card ──────────────────────────────────────────────────────── */
.loading-card {
  text-align: center;
  padding: 3rem 2rem;
}
.loading-anim {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
/* Spinner — identical to generator.css */
.loading-ring {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px; height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 1.1rem; font-weight: 700; margin-bottom: .35rem; }
.loading-subtext { font-size: .88rem; color: var(--text-muted); }

/* ── Result card ───────────────────────────────────────────────────────── */
.result-card { }
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.result-title { font-size: 1.15rem; font-weight: 700; }
.result-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ── Before/After comparison slider ───────────────────────────────────── */
.comparison-wrap {
  position: relative;
  user-select: none;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 520px;
  background: #f5f5f5;
  touch-action: none;
  cursor: ew-resize;
}
.comparison-before,
.comparison-after {
  position: absolute;
  inset: 0;
}
.comparison-before { z-index: 1; overflow: hidden; }
.comparison-after  { z-index: 0; }

.comparison-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The "before" image is clipped to the left portion */
.comparison-before { clip-path: inset(0 50% 0 0); }

/* Spacer so the wrapper has height */
.comparison-wrap::after {
  content: "";
  display: block;
  padding-top: 75%; /* 4:3 aspect ratio default; JS overrides */
}

/* Slider handle */
.slider-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.handle-line {
  flex: 1;
  width: 3px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 6px rgba(0,0,0,.3);
}
.handle-circle {
  width: 42px; height: 42px;
  background: var(--brand-dark);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  pointer-events: all;
  cursor: ew-resize;
}

.comp-label {
  position: absolute;
  bottom: .75rem;
  padding: .25rem .65rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.comp-label-before {
  left: .75rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  z-index: 2;
}
.comp-label-after {
  right: .75rem;
  background: rgba(43,43,43,.85);
  color: #fff;
  z-index: 1;
}

/* ── Alt text row ──────────────────────────────────────────────────────── */
.alt-text-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
  padding: .65rem .85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .87rem;
}
.alt-text-label { color: var(--text-muted); white-space: nowrap; font-weight: 600; }
.alt-text-value { flex: 1; color: var(--text); }
.btn-copy-alt {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .25rem .65rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand-accent);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-copy-alt:hover { background: var(--brand-light); }
.btn-copy-alt.copied { background: #e6fff0; border-color: var(--success); color: var(--success); }

.remaining-row {
  margin-top: .65rem;
  font-size: .84rem;
  color: var(--text-muted);
  text-align: right;
}

/* ── CTA section ───────────────────────────────────────────────────────── */
.cta-section { margin-top: 2rem; }
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.cta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.cta-icon { font-size: 2rem; }
.cta-title { font-size: 1.1rem; font-weight: 700; }
.cta-body { font-size: .9rem; color: var(--text-muted); flex: 1; }

.cta-shopify { border-top: 4px solid #96BF48; }
.cta-saas    { border-top: 4px solid var(--brand-dark); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,.7);
  padding: 1.5rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .82rem;
}
.footer-copy a { color: rgba(255,255,255,.6); }
.footer-copy a:hover { color: #fff; }
.footer-note { font-size: .78rem; opacity: .6; }

/* ── Responsive ────────────────────────────────────────────────────────── */
/* Mobile — aligned with generator.css @media (max-width: 768px) */
@media (max-width: 768px) {
  .hero  { padding: 2rem 0 1.75rem; }
  .card  { padding: 15px; border-radius: 15px; margin: 2% 0; }

  .style-grid { grid-template-columns: 1fr 1fr; }
  .result-header { flex-direction: column; align-items: flex-start; }
  .footer-inner  { flex-direction: column; text-align: center; }

  .btn { min-height: 44px; }
  .btn-enhance { width: 100%; }
}
