/*
 * Zisto Bridge — zisto.css
 * CSS specific pluginului: carduri, tabele, paginare, badges, butoane.
 * CSS variabilele (culori, fonturi) vin din tema zisto-theme/style.css.
 * Acest fișier e încărcat DOAR pe paginile Zisto (router verifică tip).
 */

/* ──────────────────────────────────────────────
   CONTAINER & LAYOUT
────────────────────────────────────────────── */

.zisto-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.z-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.z-wrap--narrow {
  max-width: 720px;
}

/* ──────────────────────────────────────────────
   HERO PAGINI INTERNE
────────────────────────────────────────────── */

.z-page-hero {
  background: var(--z-grad-hero, linear-gradient(135deg, #6c5ce7, #a29bfe, #fd79a8));
  color: #fff;
  padding: 40px 0 36px;
  margin-bottom: 32px;
}

.z-page-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
  line-height: 1.2;
}

.z-page-hero .z-breadcrumb {
  opacity: .75;
  font-size: .78rem;
  margin-bottom: 10px;
}

.z-page-hero .z-breadcrumb a { color: #fff; }

/* ──────────────────────────────────────────────
   BREADCRUMB
────────────────────────────────────────────── */

.z-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: .78rem;
}

.z-breadcrumb li + li::before {
  content: "›";
  margin-right: 4px;
  opacity: .6;
}

.z-breadcrumb a {
  color: var(--z-primary, #6c5ce7);
  text-decoration: none;
}

.z-breadcrumb a:hover { text-decoration: underline; }

/* ──────────────────────────────────────────────
   BUTOANE
────────────────────────────────────────────── */

.zisto-btn, .z-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .12s;
  line-height: 1.2;
}

.zisto-btn:hover, .z-btn:hover { opacity: .9; transform: translateY(-1px); }
.zisto-btn:active, .z-btn:active { transform: translateY(0); }

.zisto-btn--primary, .z-btn--primary {
  background: var(--z-primary, #6c5ce7);
  color: #fff;
}

.zisto-btn--secondary, .z-btn--secondary {
  background: var(--z-surface, #f8f8fc);
  color: var(--z-text, #1a1a2e);
  border: 1.5px solid var(--z-border, #e8e8f0);
}

.zisto-btn--compare {
  background: transparent;
  color: var(--z-primary, #6c5ce7);
  border: 1.5px solid var(--z-primary, #6c5ce7);
}

.z-btn--outline {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.5);
}

/* ──────────────────────────────────────────────
   BADGES
────────────────────────────────────────────── */

.z-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.6;
}

.z-badge--discount   { background: #ff4757; color: #fff; }
.z-badge--new        { background: var(--z-primary, #6c5ce7); color: #fff; }
.z-badge--in-stock   { background: #00b894; color: #fff; }
.z-badge--out-stock  { background: var(--z-border, #e8e8f0); color: var(--z-text-muted, #6b7280); }

/* ──────────────────────────────────────────────
   PRODUS — HEADER, OFFER, CONTENT
────────────────────────────────────────────── */

.zisto-product__header {
  padding: 36px 0 20px;
}

.zisto-product__h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--z-text, #1a1a2e);
}

.zisto-product__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.zisto-product__image {
  margin-bottom: 24px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--z-surface, #f8f8fc);
  border: 1.5px solid var(--z-border, #e8e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 480px;
  min-height: 280px;
}

.zisto-product__image img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Offer box */
.zisto-product__offer {
  background: var(--z-surface, #f8f8fc);
  border: 1.5px solid var(--z-border, #e8e8f0);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.zisto-product__price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--z-primary, #6c5ce7);
  margin-bottom: 16px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.zisto-product__price-old {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--z-text-muted, #6b7280);
  text-decoration: line-through;
}

.zisto-product__offer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.zisto-product__offer-meta {
  margin-top: 12px;
  font-size: .82rem;
  color: var(--z-text-muted, #6b7280);
}

/* Content editorial */
.zisto-product__content {
  max-width: 720px;
  line-height: 1.8;
  color: var(--z-text, #1a1a2e);
  margin-bottom: 32px;
}

.zisto-product__content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 32px 0 10px;
  color: var(--z-text, #1a1a2e);
}

.zisto-product__content ul, .zisto-product__content ol {
  padding-left: 22px;
  margin-bottom: 14px;
}

.zisto-product__content li { margin-bottom: 5px; }

/* Verdict */
.zisto-product__verdict {
  background: linear-gradient(135deg, var(--z-primary, #6c5ce7) 0%, #a29bfe 100%);
  color: #fff;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 32px;
}

.zisto-product__verdict h2 {
  color: #fff;
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Similar */
.zisto-product__similar h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 20px;
}

/* ──────────────────────────────────────────────
   GRILA PRODUSE
────────────────────────────────────────────── */

.z-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.z-product-card {
  background: var(--z-surface, #f8f8fc);
  border: 1.5px solid var(--z-border, #e8e8f0);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .18s, transform .15s;
}

.z-product-card:hover {
  box-shadow: 0 8px 24px rgba(108,92,231,.12);
  transform: translateY(-2px);
}

.z-product-card__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--z-text, #1a1a2e);
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.z-product-card__title:hover { color: var(--z-primary, #6c5ce7); }

.z-product-card__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.z-product-card__price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--z-primary, #6c5ce7);
}

.z-product-card .zisto-btn {
  margin-top: auto;
  text-align: center;
  justify-content: center;
}

/* ──────────────────────────────────────────────
   COMPARE TABLE
────────────────────────────────────────────── */

.zisto-compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.zisto-compare__table th,
.zisto-compare__table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1.5px solid var(--z-border, #e8e8f0);
}

.zisto-compare__table th {
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--z-text-muted, #6b7280);
  background: var(--z-surface, #f8f8fc);
}

.zisto-compare__best-row {
  background: rgba(108,92,231,.06);
}

.zisto-compare__best-summary {
  font-size: .9rem;
  color: var(--z-text-muted, #6b7280);
  margin: 8px 0 0;
}

.zisto-compare__best-offer {
  color: var(--z-primary, #6c5ce7);
  font-size: 1.1rem;
}

/* ──────────────────────────────────────────────
   FAQ
────────────────────────────────────────────── */

.z-faq {
  margin: 36px 0 0;
  border-top: 2px solid var(--z-border, #e8e8f0);
  padding-top: 28px;
}

.z-faq h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--z-text, #1a1a2e);
}

.z-faq-item {
  border: 1.5px solid var(--z-border, #e8e8f0);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
  background: var(--z-surface, #f8f8fc);
}

.z-faq-item h3 {
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--z-text, #1a1a2e);
}

.z-faq-answer {
  font-size: .88rem;
  color: var(--z-text-muted, #6b7280);
  line-height: 1.7;
}

/* ──────────────────────────────────────────────
   QUERY / GHIDURI
────────────────────────────────────────────── */

.zisto-query__header {
  padding: 36px 0 8px;
}

.zisto-query__hero-img {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  max-height: 380px;
}

.zisto-query__hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zisto-query__intro {
  font-size: .95rem;
  color: var(--z-text-muted, #6b7280);
  line-height: 1.75;
  max-width: 700px;
  margin-top: 12px;
}

.zisto-query__intent-tip {
  background: rgba(108,92,231,.07);
  border-left: 3px solid var(--z-primary, #6c5ce7);
  padding: 12px 18px;
  border-radius: 0 10px 10px 0;
  font-size: .88rem;
  margin-bottom: 24px;
  color: var(--z-text, #1a1a2e);
}

.zisto-query__products {
  margin-bottom: 32px;
}

.zisto-query__products h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.zisto-query__related {
  margin-top: 36px;
  border-top: 2px solid var(--z-border, #e8e8f0);
  padding-top: 24px;
}

.zisto-query__related h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.zisto-query__related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.zisto-query__related-list a {
  display: inline-block;
  background: var(--z-surface, #f8f8fc);
  border: 1.5px solid var(--z-border, #e8e8f0);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--z-text, #1a1a2e);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.zisto-query__related-list a:hover {
  background: var(--z-primary, #6c5ce7);
  color: #fff;
  border-color: var(--z-primary, #6c5ce7);
}

/* ──────────────────────────────────────────────
   TAXONOMY — categorie, brand
────────────────────────────────────────────── */

.zisto-taxonomy__intro {
  font-size: .9rem;
  opacity: .85;
  line-height: 1.65;
  margin-top: 8px;
}

.zisto-taxonomy__count {
  font-size: .82rem;
  opacity: .7;
  margin-top: 6px;
}

/* ──────────────────────────────────────────────
   PAGINARE
────────────────────────────────────────────── */

.zisto-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ──────────────────────────────────────────────
   SEARCH RESULTS GRID
────────────────────────────────────────────── */

.zisto-search .z-product-grid {
  margin-top: 24px;
}

/* ──────────────────────────────────────────────
   DARK MODE
────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  .zisto-product__offer,
  .z-product-card,
  .z-faq-item,
  .zisto-query__related-list a {
    background: var(--z-surface-dark, #1e1e35);
    border-color: var(--z-border-dark, #2d2d50);
    color: var(--z-text-dark, #e8e8f5);
  }

  .z-product-card__title,
  .zisto-product__content,
  .zisto-product__h1 {
    color: var(--z-text-dark, #e8e8f5);
  }

  .zisto-compare__table th {
    background: var(--z-surface-dark, #1e1e35);
  }
}

/* ──────────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────────── */

@media (max-width: 640px) {
  .z-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .zisto-product__offer-actions {
    flex-direction: column;
  }

  .zisto-product__price {
    font-size: 1.6rem;
  }

  .zisto-compare__table { font-size: .8rem; }
  .zisto-compare__table th, .zisto-compare__table td { padding: 8px 10px; }
}

@media (max-width: 380px) {
  .z-product-grid { grid-template-columns: 1fr; }
}
/* ── Merchant index cards — înălțime uniformă ── */
.z-card--merchant {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.z-merchant-card__logo-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  overflow: hidden;
}

.z-merchant-card__logo-img {
  max-height: 64px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  object-position: left center;
}

.z-merchant-card__logo-placeholder {
  font-size: 2rem;
  opacity: .35;
  line-height: 1;
}

.z-card--merchant h3 {
  flex-shrink: 0;
}