/* ================================================================
   C-Hub — Style Sheet
   Palette: dark premium, ispirata ma reinterpretata
   ================================================================ */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  --bg-base: #0b1020;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(124, 92, 255, 0.35);

  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.62);
  --text-muted: rgba(255, 255, 255, 0.40);

  --accent: #7c5cff;
  --accent-hover: #9278ff;
  --accent-secondary: #3dd6ff;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1140px;
  --gutter: 24px;

  --bg-header: rgba(11, 16, 32, 0.85);
  --bg-overlay: rgba(11, 16, 32, 0.97);
  --bg-hover-subtle: rgba(255, 255, 255, 0.06);
  --bg-hover-faint: rgba(255, 255, 255, 0.04);
  --shadow-dropdown: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Google Places autocomplete (dark mode) ─────────────────── */
.pac-container {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-dropdown);
  font-family: var(--font);
  color: var(--text-primary);
}
.pac-item {
  border-top: 1px solid var(--border-subtle);
  padding: 8px 12px;
  color: var(--text-primary);
  cursor: pointer;
}
.pac-item:hover, .pac-item-selected {
  background: var(--bg-hover-subtle);
}
.pac-item-query {
  color: var(--text-primary);
}
.pac-icon { display: none; }
.pac-icon-marker { display: none; }
.pac-item .pac-icon { background: none; width: 0; height: 0; margin: 0; padding: 0; }

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-sm { padding: 8px 18px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.logo::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: super;
}

.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.header-cta { flex-shrink: 0; margin-right: 10px; }

/* Header search */
.header-search {
  display: flex;
  align-items: center;
  position: relative;
  margin: 0 12px 0 0;
  flex-shrink: 1;
  min-width: 0;
}

.header-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.header-search-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover-subtle);
  border-color: var(--border-hover);
}

.header-search-form {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  z-index: 120;
}

.header-search.open .header-search-form {
  display: block;
}

.header-search.open .header-search-toggle {
  color: var(--accent);
  border-color: var(--accent);
}

.header-search-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-dropdown);
  outline: none;
  transition: border-color var(--transition);
}
.header-search-input::placeholder {
  color: var(--text-muted);
}
.header-search-input:focus {
  border-color: var(--accent);
}

/* Header actions group */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.header-icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover-subtle);
}

/* Language switcher */
.lang-switcher { position: relative; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: border-color var(--transition), background var(--transition);
}
.lang-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover-faint);
}
.lang-chevron {
  transition: transform var(--transition);
}
.lang-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  z-index: 110;
  box-shadow: var(--shadow-dropdown);
}
.lang-switcher.open .lang-dropdown {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  text-align: left;
}
.lang-option:hover {
  color: var(--text-primary);
  background: var(--bg-hover-subtle);
}
.lang-option.active {
  color: var(--accent);
}

.lang-flag { font-size: 1.1rem; }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}
.mobile-toggle span {
  display: block;
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-toggle span:nth-child(1) { top: 0; }
.mobile-toggle span:nth-child(2) { top: 9px; }
.mobile-toggle span:nth-child(3) { top: 18px; }

.mobile-toggle[aria-expanded="true"] span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}
.hero-small {
  padding: 140px 0 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(124, 92, 255, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(61, 214, 255, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 50% 10%, rgba(124, 92, 255, 0.06) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.accent-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS (generic)
   ══════════════════════════════════════════════════════════════ */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 56px;
  font-size: 1.05rem;
}

/* ══════════════════════════════════════════════════════════════
   CATEGORIE GRID
   ══════════════════════════════════════════════════════════════ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
}
.cat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.cat-icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
  color: var(--accent-secondary);
}

.cat-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.cat-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.cat-arrow {
  display: inline-block;
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform var(--transition);
}
.cat-card:hover .cat-arrow { transform: translateX(4px); }

/* ══════════════════════════════════════════════════════════════
   VANTAGGI GRID
   ══════════════════════════════════════════════════════════════ */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.adv-card {
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-align: center;
}

.adv-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.adv-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.adv-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   COME FUNZIONA — STEPS
   ══════════════════════════════════════════════════════════════ */
.how-it-works {
  background:
    radial-gradient(ellipse 50% 45% at 70% 50%, rgba(61, 214, 255, 0.05) 0%, transparent 70%),
    var(--bg-base);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.step-card {
  padding: 32px 24px;
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   CTA FINALE
   ══════════════════════════════════════════════════════════════ */
.final-cta {
  background:
    radial-gradient(ellipse 55% 50% at 50% 50%, rgba(124, 92, 255, 0.10) 0%, transparent 70%),
    var(--bg-base);
}

.final-cta-inner {
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.final-cta p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

/* ══════════════════════════════════════════════════════════════
   CATEGORY PLACEHOLDER
   ══════════════════════════════════════════════════════════════ */
.category-placeholder {
  padding: 60px 0;
}

.placeholder-box {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  max-width: 540px;
  margin: 0 auto;
}

.placeholder-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 20px;
  color: var(--accent-secondary);
}

.placeholder-box h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.placeholder-box p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   PRODUCT GRID + CARDS
   ══════════════════════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.product-card-img {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  background: var(--bg-hover-faint);
  overflow: hidden;
}

.product-card-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-no-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.product-card-body {
  padding: 14px 16px 16px;
}

.product-card-title {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.products-showcase {
  padding-top: 40px;
  padding-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════
   SELLER PROFILE
   ══════════════════════════════════════════════════════════════ */
.seller-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: left;
}

.seller-avatar-wrap {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}

.seller-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

.seller-avatar-initials {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

.seller-info {
  min-width: 0;
}

.seller-name {
  font-size: 2rem;
  margin: 0 0 4px;
  line-height: 1.2;
}

.seller-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.seller-count {
  color: var(--text-muted);
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-col ul a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Footer store badges ────────────────────────────────────── */
.footer-store-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.store-badge img {
  height: 40px;
  width: auto;
  border-radius: 6px;
}

/* ── Footer social icons ────────────────────────────────────── */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.footer-social-icon {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-social-icon:hover {
  color: var(--accent);
}

/* ── Footer legal links ─────────────────────────────────────── */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--accent);
}

/* ── Footer language switcher ───────────────────────────────── */
.footer-lang-switcher {
  position: relative;
}

.footer-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.85rem;
  transition: border-color var(--transition), background var(--transition);
}

.footer-lang-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover-faint);
}

.footer-lang-label {
  font-size: 0.85rem;
}

.footer-lang-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  z-index: 110;
  box-shadow: var(--shadow-dropdown);
}

.footer-lang-switcher.open .footer-lang-dropdown {
  display: flex;
}

.footer-lang-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════════════════
   AUTH (LOGIN / REGISTER)
   ══════════════════════════════════════════════════════════════ */
.section-auth {
  padding-top: 48px;
}

.hero-auth {
  padding-bottom: 80px;
}

.hero-auth .hero-content {
  max-width: 100%;
  text-align: center;
}

.hero-auth .hero-sub {
  margin-left: auto;
  margin-right: auto;
}

.hero-auth .auth-card {
  margin-top: 32px;
  position: relative;
  z-index: 1;
}

.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 40px 36px 32px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-hover-faint);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

.form-row {
  display: flex;
  align-items: center;
}

.form-row-between {
  justify-content: flex-end;
}

.form-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: color var(--transition);
}

.form-link:hover {
  color: var(--accent-hover);
}

.btn-full {
  width: 100%;
}

.btn-google {
  gap: 10px;
}

.btn-google svg {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Auth card wide (register) ──────────────────────────────── */
.auth-card-wide {
  max-width: 540px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.form-error {
  display: none;
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 4px;
  line-height: 1.4;
}

.form-input-error {
  border-color: #ef4444 !important;
}

.form-input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.form-check-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
}

.form-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.auth-success {
  text-align: center;
  padding: 20px 0;
}

.auth-success h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.auth-success p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.verify-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.verify-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.verify-icon.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ── Profile page ───────────────────────────────────────────── */
.profile-card {
  text-align: center;
  max-width: 720px;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  background: var(--bg-hover-faint);
}

.profile-menu-item:hover {
  background: var(--accent);
  color: #fff;
}

.profile-menu-item:hover .profile-menu-arrow {
  color: #fff;
}

.profile-menu-arrow {
  margin-left: auto;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-menu-item--danger {
  color: #ef4444;
}

.profile-menu-item--danger:hover {
  background: #ef4444;
  color: #fff;
}

.profile-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
}

.profile-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  border: 2px solid var(--bg-base);
}

.profile-avatar-edit:hover {
  background: var(--accent-hover);
}

.profile-edit-form .form-input {
  width: 100%;
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-username {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.profile-fields {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.profile-actions {
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* ── Login form errors ──────────────────────────────────────── */
.field-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 4px;
}

.form-input.error {
  border-color: #ef4444;
}

.form-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.form-banner-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.form-banner-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Post Product page ──────────────────────────────────────── */
.post-product-card {
  max-width: 600px;
}

/* ── Product type switch ────────────────────────────────────── */
.product-type-switch {
  display: flex;
  gap: 12px;
}

.product-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.product-type-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.product-type-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 92, 255, 0.08);
}

.photo-upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.photo-upload-zone:hover,
.photo-upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--bg-hover-faint);
}

.photo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.photo-upload-placeholder svg {
  color: var(--text-muted);
  opacity: 0.6;
}

.photo-upload-hint {
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 320px;
  color: var(--text-muted);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 0;
}

.photo-preview-grid:empty {
  display: none;
}

.photo-preview-grid + .photo-upload-placeholder { display: none; }
.photo-preview-grid:empty + .photo-upload-placeholder { display: flex; }

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  transition: background var(--transition);
}

.photo-preview-remove:hover {
  background: #ef4444;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font);
}

.form-input-price {
  max-width: 200px;
}

.post-product-link {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.post-product-link p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.direct-link-url {
  display: inline-block;
  font-size: 0.85rem;
  padding: 6px 14px;
  background: var(--bg-hover-faint);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent);
  word-break: break-all;
  user-select: all;
}

/* ── Footer controls (lang + theme) ─────────────────────────── */
.footer-mobile-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Hide lang + theme from header on desktop (shown in footer) */
.header-actions .lang-switcher { display: none; }
.header-actions .theme-toggle { display: none; }

/* Hero post-product CTA — mobile only */
.hero-actions .hero-post-product {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --gutter: 18px; }

  /* ── Header restructure ─────────────────────────────────── */
  .site-header { padding-bottom: 0; }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 0;
  }

  /* Top row: logo left, icons right */
  .logo { order: 1; }
  .mobile-toggle { display: block; order: 3; margin-left: auto; }
  .header-actions { order: 2; margin-left: auto; gap: 2px; }
  .main-nav { order: 5; }

  .header-cta { display: none; }

  /* Show hero post-product CTA on mobile */
  .hero-actions .hero-post-product {
    display: inline-flex;
  }

  /* Search bar — full-width row below logo (Vinted style) */
  .header-search {
    order: 4;
    width: 100%;
    margin: 8px 0 0 0;
    flex-shrink: 0;
  }

  .header-search .header-search-toggle { display: none; }

  .header-search .header-search-form {
    display: block;
    position: static;
    width: 100%;
  }

  .header-search-input {
    background: var(--bg-hover-faint);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 10px 14px;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
  }

  /* Hide search bar when nav is open */
  .site-header.nav-open .header-search { display: none; }

  /* Nav dropdown — fixed panel below header */
  .main-nav {
    position: fixed;
    top: 60px;
    left: 0; right: 0;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 var(--gutter);
    border-bottom: 1px solid transparent;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, padding .3s ease, opacity .3s ease, border-color .3s ease;
    pointer-events: none;
    z-index: 101;
  }
  .main-nav.open {
    max-height: 400px;
    padding: 20px var(--gutter) 24px;
    border-bottom: 1px solid var(--border-subtle);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav ul { flex-direction: column; gap: 18px; }
  .main-nav a { font-size: 1rem; }

  .header-search-form { right: -60px; width: 280px; }
  .lang-dropdown { right: -40px; }

  /* Footer controls already visible from base styles */

  .hero { padding: 120px 0 60px; }
  .hero-small { padding: 110px 0 40px; }
  .hero-content { text-align: center; margin: 0 auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero h1 { padding: 16px 0; }
  .section { padding: 64px 0; }
  .auth-card { padding: 28px 20px 24px; }
  .auth-card-wide { max-width: 100%; }
  .post-product-card { max-width: 100%; }
  .photo-preview-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .form-input-price { max-width: 100%; }
  .form-row-2col { grid-template-columns: 1fr; gap: 0; }

  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .adv-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
