/* =========================================================
   SB Vergleich — vergleich.css (COMBINED FINAL)
   - Keeps the full Vergleich page styling (filters/table/top picks/bar/modal)
   - Compare popup: FULL table on mobile with ONE horizontal scroll
   - Removes old 2-page snap (Merkmale/Werte) rules to avoid conflicts
   ========================================================= */

.sbv-root{
  --sbv-bg: #fff;
  --sbv-text: #0B0F14;
  --sbv-muted: rgba(11,15,20,0.72);
  --sbv-border: rgba(0,0,0,0.12);
  --sbv-accent: #F5A623;
  --sbv-radius: 14px;
  --sbv-radius-sm: 12px;
  --sbv-shadow: 0 8px 24px rgba(0,0,0,0.10);
  --sbv-max: 1100px;
  color: var(--sbv-text);
}

/* container */
.sbv-root .sbv-container{
  max-width: var(--sbv-max);
  margin: 0 auto;
  padding: 18px;
}
@media (max-width: 600px){
  .sbv-root .sbv-container{ padding: 12px; }
}

/* card */
.sbv-root .sbv-card{
  border: 1px solid var(--sbv-border);
  border-radius: var(--sbv-radius);
  background: var(--sbv-bg);
  padding: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

/* headings */
.sbv-root .sbv-h2{
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 950;
  position: relative;
  padding-left: 10px;
}
.sbv-root .sbv-h2::before{
  content:"";
  position:absolute;
  left:0; top: 4px; bottom: 4px;
  width: 4px;
  border-radius: 999px;
  background: var(--sbv-accent);
}
.sbv-root .sbv-h3{
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 950;
}
.sbv-root .sbv-muted{ color: var(--sbv-muted); }

/* top picks cards */
.sbv-root .sbv-top-group{ margin: 14px 0; }
.sbv-root .sbv-cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
@media (max-width: 900px){
  .sbv-root .sbv-cards{ grid-template-columns: 1fr; }
}
.sbv-root .sbv-card{
  display:block;
  text-decoration:none;
  color: inherit;
}
.sbv-root a.sbv-card:hover{
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.sbv-root .sbv-card-title{ font-weight: 950; line-height: 1.2; }
.sbv-root .sbv-card-meta{ margin-top: 6px; font-size: 13px; color: var(--sbv-muted); }

/* filters row */
.sbv-root .sbv-filters{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}
@media (max-width: 900px){
  .sbv-root .sbv-filters{ grid-template-columns: 1fr; }
}
.sbv-root .sbv-field label{
  display:block;
  font-weight: 900;
  font-size: 12px;
  color: var(--sbv-muted);
  margin-bottom: 6px;
}
.sbv-root .sbv-field input,
.sbv-root .sbv-field select{
  width:100%;
  padding: 10px 12px;
  border-radius: var(--sbv-radius-sm);
  border: 1px solid var(--sbv-border);
  background: #fff;
  color: var(--sbv-text);
  outline: none;
}
.sbv-root .sbv-field input:focus,
.sbv-root .sbv-field select:focus{
  border-color: rgba(0,0,0,0.28);
  box-shadow: 0 0 0 2px rgba(245,166,35,0.20);
}
.sbv-root .sbv-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.sbv-root .sbv-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: var(--sbv-radius-sm);
  border: 1px solid var(--sbv-border);
  background: rgba(245,166,35,0.18);
  font-weight: 950;
  color: var(--sbv-text);
  text-decoration:none;
  cursor:pointer;
  user-select:none;
}
.sbv-root .sbv-btn:hover{ background: var(--sbv-accent); }

/* list table */
.sbv-root .sbv-table{
  margin-top: 12px;
  border: 1px solid var(--sbv-border);
  border-radius: var(--sbv-radius);
  overflow: hidden;
}
.sbv-root .sbv-head,
.sbv-root .sbv-row{
  display:grid;
  grid-template-columns: 44px 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  align-items:center;
  padding: 10px 12px;
}
.sbv-root .sbv-head{
  background: rgba(0,0,0,0.04);
  font-weight: 950;
}
.sbv-root .sbv-row{
  border-top: 1px solid rgba(0,0,0,0.08);
  background:#fff;
}
.sbv-root .sbv-cell{ min-width: 0; }
.sbv-root .sbv-model{ display:flex; gap: 8px; align-items:center; flex-wrap: wrap; }
.sbv-root .sbv-model-link{ font-weight: 950; color: inherit; text-decoration:none; }
.sbv-root .sbv-model-link:hover{ text-decoration: underline; }
.sbv-root .sbv-badge{
  font-size: 12px;
  font-weight: 950;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245,166,35,0.18);
  border: 1px solid rgba(0,0,0,0.10);
}

/* responsive list */
@media (max-width: 900px){
  .sbv-root .sbv-head{ display:none; }
  .sbv-root .sbv-row{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .sbv-root .sbv-cell--pick{ padding-bottom: 6px; }
}

/* compare bar */
.sbv-root .sbv-bar{
  position: sticky;
  top: 12px;
  z-index: 999;

  display:flex;
  gap: 10px;
  align-items:center;
  justify-content: space-between;

  padding: 10px;
  margin: 12px 0;

  border-radius: var(--sbv-radius);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--sbv-shadow);
}
@media (max-width: 780px){
  .sbv-root .sbv-bar{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    margin: 0;
  }
}
.sbv-root .sbv-bar-items{
  font-weight: 900;
  color: rgba(11,15,20,0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* modal */
.sbv-root .sbv-modal[hidden]{ display:none !important; }
.sbv-root .sbv-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
body.sbv-lock{ overflow: hidden; }

.sbv-root .sbv-modal-inner{
  width: min(1100px, 100%);
  max-height: 85vh;
  overflow:auto;
  background:#fff;
  border-radius: var(--sbv-radius);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.sbv-root .sbv-modal-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
}

/* close button always visible */
.sbv-root .sbv-close{
  display:inline-flex !important;
  align-items:center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  background:#fff;
  font-weight: 950;
  padding: 8px 12px;
  cursor:pointer;
  color:#0B0F14;
}
.sbv-root .sbv-close::before{
  content:"×";
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

/* =========================================================
   Compare (FINAL) — FULL table + one horizontal scroll
   (replaces old 2-page snap Merkmale/Werte)
   ========================================================= */

.sbv-root .sbv-compare{
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
}

/* Grid: label column + N product columns */
.sbv-root .sbv-comp-head,
.sbv-root .sbv-comp-row{
  display: grid;
  align-items: start;
  gap: 10px;

  --sbv-label-col: 150px;
  --sbv-prod-col: 170px;

  grid-template-columns: var(--sbv-label-col) repeat(var(--cols), minmax(var(--sbv-prod-col), 1fr));
  min-width: calc(var(--sbv-label-col) + (var(--cols) * var(--sbv-prod-col)));
}

/* compare cards */
.sbv-root .sbv-comp-col{
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  padding: 10px 10px 12px;
  background:#fff;
}
.sbv-root .sbv-comp-col.is-overall{
  border-color: rgba(245,166,35,0.60);
  background: rgba(245,166,35,0.06);
}
.sbv-root .sbv-comp-col-top{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  justify-content: space-between;
}
.sbv-root .sbv-comp-title{
  color: inherit;
  text-decoration:none;
}
.sbv-root .sbv-comp-title:hover{ text-decoration: underline; }

.sbv-root .sbv-comp-buy{
  display:inline-block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(245,166,35,0.18);
  border: 1px solid rgba(0,0,0,0.12);
  font-weight: 950;
  color: var(--sbv-text);
  text-decoration:none;
  text-align:center;
}
.sbv-root .sbv-comp-buy:hover{ background: var(--sbv-accent); }

.sbv-root .sbv-best{
  display:inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--sbv-accent);
  flex: 0 0 auto;
  margin-top: 4px;
}

.sbv-root .sbv-comp-row{
  padding: 10px 0;
  border-top: 1px dashed rgba(0,0,0,0.14);
}
.sbv-root .sbv-comp-row:first-of-type{ border-top: none; }

/* Sticky label column */
.sbv-root .sbv-comp-label,
.sbv-root .sbv-comp-label-spacer{
  position: sticky;
  left: 0;
  z-index: 6;
  background: #fff;
  box-shadow: 6px 0 12px rgba(0,0,0,0.06);
}

.sbv-root .sbv-comp-label{
  padding: 12px 10px;
  font-weight: 950;
  color: rgba(11,15,20,0.85);
  border-radius: 10px;
}

.sbv-root .sbv-comp-cell{
  color: rgba(11,15,20,0.92);
  padding: 12px 10px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 420px){
  .sbv-root .sbv-comp-head,
  .sbv-root .sbv-comp-row{
    --sbv-label-col: 140px;
    --sbv-prod-col: 160px;
  }
}
/* =========================
   SBV Compare header badge fix
   ========================= */

.sbv-root .sbv-comp-col-top{
  display: flex;
  flex-direction: column;   /* بدل صف واحد */
  gap: 8px;
  align-items: flex-start;
}

.sbv-root .sbv-rec-badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  background: rgba(245,166,35,0.18);
  border: 1px solid rgba(0,0,0,0.10);
  color: #0B0F14;
}
