/* ================================================================
   Pagina unui anunț — strat „premium" (2026-10-14), pentru orice tip
   (vânzare, caut, eveniment). Se încarcă după stilurile din view.php și
   schimbă doar aspectul: antet, galerie, preț, coș, descriere, contact,
   acțiuni, plată DAC, rating, anunțuri similare. Logica rămâne aceeași.
   ================================================================ */

body .cad-page-light {
  --vp-ink: #0f172a;
  --vp-ink2: #334155;
  --vp-muted: #64748b;
  --vp-line: #e8ecf3;
  --vp-gold: #facc15;
  --vp-gold2: #f59e0b;
  --vp-red: #ef2b2d;
  --vp-shadow: 0 22px 48px -32px rgba(15, 23, 42, .45);
}
body:has(.cad-page-light) {
  background:
    radial-gradient(40% 28% at 0% 0%, rgba(254, 240, 138, .25), transparent 70%),
    radial-gradient(34% 26% at 100% 4%, rgba(191, 219, 254, .3), transparent 70%),
    #f6f7fb;
}

/* ---------- Antet: categorie, titlu, statistici ---------- */
body .cad-page-light .cad-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--vp-ink2);
  font-weight: 800;
  letter-spacing: .16em;
}
body .cad-page-light .cad-kicker::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--vp-red);
}
body .cad-page-light .cad-hero-title {
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.12;
  color: var(--vp-ink);
}
body .cad-page-light .cad-ad-stats-row > * {
  border-radius: 999px;
  border: 1px solid var(--vp-line);
  background: #fff;
  box-shadow: 0 8px 18px -14px rgba(15, 23, 42, .45);
}

/* ---------- Galerie ---------- */
body .cad-page-light .cad-hero,
body .cad-page-light .cad-hero-media-frame,
body .cad-page-light .cad-slider {
  border-radius: 24px;
}
body .cad-page-light .cad-hero {
  overflow: hidden;
  box-shadow: var(--vp-shadow);
}
body .cad-page-light .cad-thumbs {
  gap: 10px;
}
body .cad-page-light .cad-thumb-btn {
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 8px 18px -14px rgba(15, 23, 42, .5);
  transition: transform .15s ease, border-color .15s ease;
}
body .cad-page-light .cad-thumb-btn:hover { transform: translateY(-2px); }
body .cad-page-light .cad-thumb-btn.is-active {
  border-color: var(--vp-gold2);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .35);
}

/* ---------- Cardurile principale (detalii, contact, plată, rating) ---------- */
body .cad-page-light .cad-section,
body .cad-page-light .cad-contact-card,
body .cad-page-light .cad-wallet-pay,
body .cad-page-light .cad-ratings {
  border-radius: 24px;
  border: 1px solid var(--vp-line);
  background: #fff;
  box-shadow: var(--vp-shadow);
}
body .cad-page-light .cad-section {
  padding: 28px 30px;
}

/* Detalii: categorie, titlu, preț */
body .cad-page-light .cad-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}
body .cad-page-light .cad-title-lg {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 900;
  letter-spacing: -.015em;
  color: var(--vp-ink);
}
body .cad-page-light .cad-price {
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--vp-red);
}
body .cad-page-light .cad-stock-badge {
  border-radius: 999px;
  font-weight: 800;
}

/* Adaugă în coș */
body .cad-page-light .cad-add-to-cart-form {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--vp-line);
  background: linear-gradient(180deg, #fafbfd, #fff);
}
body .cad-page-light .cad-add-to-cart-qty__input {
  height: 50px;
  border-radius: 14px;
  border: 1px solid #d6dbe4;
  font-weight: 800;
  text-align: center;
}
body .cad-page-light .cad-add-to-cart-btn {
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 14px 26px -14px rgba(22, 163, 74, .85);
  transition: transform .15s ease, filter .15s ease;
}
body .cad-page-light .cad-add-to-cart-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
body .cad-page-light .cad-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: var(--vp-muted);
}

/* Descrierea */
body .cad-page-light .cad-desc {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--vp-line);
  color: var(--vp-ink2);
  font-size: 15.5px;
  line-height: 1.75;
}
body .cad-page-light .cad-specs {
  border-radius: 18px;
  overflow: hidden;
}

/* ---------- Contact vânzător (card premium) ---------- */
body .cad-page-light .cad-contact-card:not(.cad-wallet-pay):not(.cad-ratings):not(.cad-bids) {
  position: relative;
  overflow: hidden;
  padding: 0 22px 22px;
  border-radius: 24px;
  background: #fff;
}
/* Antet închis la culoare cu numele vânzătorului */
body .cad-page-light .cad-contact-card .cad-contact-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -22px 16px;
  padding: 20px 22px 18px 76px;
  border-bottom: 0;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(250, 204, 21, .28), transparent 60%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}
body .cad-page-light .cad-contact-card .cad-contact-header::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 14px;
  background: #facc15 url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%230f172a%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 20c0-4 3.6-6.5 8-6.5s8 2.5 8 6.5%22/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: 0 10px 20px -10px rgba(250, 204, 21, .9);
}
body .cad-page-light .cad-contact-card .cad-contact-header .cad-title {
  margin: 0 0 2px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: -.01em;
}
body .cad-page-light .cad-contact-card .cad-contact-header .cad-contact-sub {
  margin: 0;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
}
body .cad-page-light .cad-contact-card .cad-contact-reveal-btn {
  flex: 0 0 auto;
  padding: 9px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #fde047, #facc15);
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 10px 22px -12px rgba(250, 204, 21, .95);
}

/* Telefon / WhatsApp / Email: rânduri tip casetă */
body .cad-page-light .cad-contact-card .cad-contact-list {
  display: grid;
  gap: 8px;
}
body .cad-page-light .cad-contact-card .cad-contact-item,
body .cad-page-light .cad-contact-card .cad-contact-item:last-child {
  align-items: center;
  padding: 11px 14px;
  border: 1px solid var(--vp-line);
  border-radius: 14px;
  background: #f8fafc;
}

/* Formularul de mesaj */
body .cad-page-light .cad-contact-card .cad-message-form {
  margin-top: 18px !important;
  padding-top: 18px;
  padding-right: 0 !important;
  border-top: 1px dashed var(--vp-line);
}
body .cad-page-light .cad-contact-card .cad-message-form .form-control,
body .cad-page-light .cad-contact-card .cad-message-form textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
body .cad-page-light .cad-contact-card .cad-message-form textarea { min-height: 96px; resize: vertical; }
body .cad-page-light .cad-contact-card .cad-message-form .form-control:focus,
body .cad-page-light .cad-contact-card .cad-message-form textarea:focus {
  border-color: var(--vp-gold2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, .22);
}
body .cad-page-light .cad-contact-card .cad-contact-actions { margin-top: 12px; }
body .cad-page-light .cad-contact-card .cad-message-form .btn.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 16px 28px -16px rgba(15, 23, 42, .9);
}
body .cad-page-light .cad-contact-card .cad-message-form .btn.btn-primary::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23facc15%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M22 2 11 13%22/%3E%3Cpath d=%22M22 2 15 22l-4-9-9-4 20-7Z%22/%3E%3C/svg%3E") center / contain no-repeat;
}
body .cad-page-light .cad-contact-card .cad-message-form .btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 32px -16px rgba(15, 23, 42, .95);
}

/* Profil vânzător / Share / Favorite / Raportează: grilă 2×2, icon colorat */
body .cad-page-light .cad-contact-card .cad-user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}
body .cad-page-light .cad-contact-card .cad-action-btn {
  --ab: #0f172a;
  --ab-bg: #f1f5f9;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 62px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--vp-line);
  border-radius: 16px;
  background: #fff;
  color: var(--vp-ink);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 22px -18px rgba(15, 23, 42, .55);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
body .cad-page-light .cad-contact-card .cad-action-btn:nth-child(2) { --ab: #2563eb; --ab-bg: #eff6ff; }
body .cad-page-light .cad-contact-card .cad-action-btn:nth-child(3) { --ab: #e11d48; --ab-bg: #fff1f2; }
body .cad-page-light .cad-contact-card .cad-action-btn:nth-child(4) { --ab: #d97706; --ab-bg: #fffbeb; }
body .cad-page-light .cad-contact-card .cad-action-btn:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ab) 35%, #fff);
  background: linear-gradient(135deg, #fff, var(--ab-bg));
  box-shadow: 0 16px 28px -18px color-mix(in srgb, var(--ab) 70%, transparent);
}
body .cad-page-light .cad-contact-card .cad-action-ico {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 12px;
  background: var(--ab-bg);
  color: var(--ab);
}
body .cad-page-light .cad-contact-card .cad-action-ico svg { width: 19px; height: 19px; }
body .cad-page-light .cad-contact-card .cad-action-txt {
  color: var(--vp-ink);
  font-size: 12.5px;
  font-weight: 800;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  line-height: 1.25;
}
body .cad-page-light .cad-contact-card .cad-fav-btn.is-active { --ab-bg: #ffe4e6; border-color: #fecdd3; }

html[data-user-theme="dark"] body .cad-page-light .cad-contact-card .cad-contact-item,
html[data-user-theme="dark"] body .cad-page-light .cad-contact-card .cad-message-form .form-control,
html[data-user-theme="dark"] body .cad-page-light .cad-contact-card .cad-message-form textarea {
  background: rgba(30, 41, 59, .8);
  border-color: rgba(148, 163, 184, .22);
  color: #f8fafc;
}
html[data-user-theme="dark"] body .cad-page-light .cad-contact-card .cad-action-txt { color: #f8fafc; }
html[data-user-theme="dark"] body .cad-page-light .cad-contact-card .cad-message-form .btn.btn-primary { background: linear-gradient(135deg, #facc15, #f59e0b); color: #0f172a; }

/* Plată cu Wallet DAC */
body .cad-page-light .cad-wallet-pay {
  background:
    linear-gradient(180deg, rgba(99, 102, 241, .08) 0, rgba(255, 255, 255, 0) 130px),
    #fff;
}
body .cad-page-light .cad-wallet-pay__summary {
  border-radius: 16px;
  border-color: var(--vp-line);
}

/* Rating */
body .cad-page-light .cad-rating-summary {
  border-radius: 16px;
  border-color: var(--vp-line);
  background: #fafbfd;
}

/* ---------- Anunțuri similare ---------- */
body .cad-page-light .cad-related__title {
  font-weight: 900;
  letter-spacing: -.01em;
}
body .cad-page-light .cad-related-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--vp-line);
  background: #fff;
  box-shadow: 0 14px 30px -24px rgba(15, 23, 42, .55);
  transition: transform .15s ease, box-shadow .15s ease;
}
body .cad-page-light .cad-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px -22px rgba(15, 23, 42, .6);
}
body .cad-page-light .cad-related-card__price {
  color: var(--vp-red);
  font-weight: 900;
}

/* ---------- Tema închisă ---------- */
html[data-user-theme="dark"] body:has(.cad-page-light) { background: #0b1220; }
html[data-user-theme="dark"] body .cad-page-light .cad-section,
html[data-user-theme="dark"] body .cad-page-light .cad-contact-card,
html[data-user-theme="dark"] body .cad-page-light .cad-wallet-pay,
html[data-user-theme="dark"] body .cad-page-light .cad-ratings,
html[data-user-theme="dark"] body .cad-page-light .cad-related-card,
html[data-user-theme="dark"] body .cad-page-light .cad-action-btn,
html[data-user-theme="dark"] body .cad-page-light .cad-add-to-cart-form,
html[data-user-theme="dark"] body .cad-page-light .cad-ad-stats-row > * {
  background: rgba(15, 23, 42, .88);
  border-color: rgba(148, 163, 184, .22);
}
html[data-user-theme="dark"] body .cad-page-light .cad-hero-title,
html[data-user-theme="dark"] body .cad-page-light .cad-title-lg,
html[data-user-theme="dark"] body .cad-page-light .cad-contact-card .cad-title { color: #f8fafc; }
html[data-user-theme="dark"] body .cad-page-light .cad-desc { color: #cbd5e1; border-color: rgba(148, 163, 184, .22); }
html[data-user-theme="dark"] body .cad-page-light .cad-price { color: #f87171; }

/* ---------- Statisticile anunțului (vizualizări, favorite, contact, distribuiri) ---------- */
body .cad-page-light .cad-ad-stats-row { gap: 10px; margin-top: 12px; }
body .cad-page-light .cad-ad-stats-row > .cad-views-badge {
  --vb: #2563eb;
  --vb-bg: #eff6ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border: 1px solid color-mix(in srgb, var(--vb) 22%, #fff);
  background: linear-gradient(135deg, #fff, var(--vb-bg));
  box-shadow: 0 10px 22px -16px color-mix(in srgb, var(--vb) 70%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
body .cad-page-light .cad-ad-stats-row > .cad-views-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -16px color-mix(in srgb, var(--vb) 80%, transparent);
}
body .cad-page-light .cad-ad-stats-row > .cad-views-badge:nth-child(2) { --vb: #e11d48; --vb-bg: #fff1f2; }
body .cad-page-light .cad-ad-stats-row > .cad-views-badge:nth-child(3) { --vb: #059669; --vb-bg: #ecfdf5; }
body .cad-page-light .cad-ad-stats-row > .cad-views-badge:nth-child(4) { --vb: #d97706; --vb-bg: #fffbeb; }
body .cad-page-light .cad-views-badge > svg,
body .cad-page-light .cad-views-badge > i {
  box-sizing: content-box;
  width: 14px;
  height: 14px;
  padding: 7px;
  border-radius: 50%;
  background: var(--vb);
  color: #fff;
  font-size: 13px;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 6px 12px -6px var(--vb);
}
body .cad-page-light .cad-views-badge__count {
  font-size: 15px;
  font-weight: 900;
  color: var(--vp-ink);
}
body .cad-page-light .cad-views-badge__label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--vp-muted);
}
html[data-user-theme="dark"] body .cad-page-light .cad-ad-stats-row > .cad-views-badge {
  background: rgba(15, 23, 42, .88);
  border-color: color-mix(in srgb, var(--vb) 45%, transparent);
}
html[data-user-theme="dark"] body .cad-page-light .cad-views-badge__count { color: #f8fafc; }
html[data-user-theme="dark"] body .cad-page-light .cad-views-badge__label { color: #94a3b8; }
