/* Installment badge "0% 4 luni" on product cards */
.cem-installment-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #3a93f6;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  min-height: 1.4rem;
  z-index: 2;
  pointer-events: none;
}
.cem-ib-pct {
  display: flex;
  align-items: center;
  padding: 1px 4px;
  background: #3a93f6;
  color: #fff;
  font-weight: 700;
}
.cem-ib-months {
  display: flex;
  align-items: center;
  padding: 1px 6px;
  background: #fff;
  color: #1e293b;
  font-weight: 400;
  white-space: nowrap;
}
.cem-ib-months b {
  margin-right: 2px;
  font-weight: 700;
}
.cem-ib-text {
  font-weight: 500;
}
@media (max-width: 767px) {
  .cem-installment-badge {
    font-size: 11px;
    border-radius: 3px;
    min-height: auto;
  }
  .cem-ib-pct {
    padding: 1px 3px;
  }
  .cem-ib-months {
    padding: 1px 4px;
  }
}

/* ── Price card ── */
.cem-price-card {
  margin-bottom: 12px;
}
.cem-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.cem-price-old {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 400;
}
.cem-price-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #ef4444;
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cem-price-current {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}
.cem-price-cheaper {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #3a93f6;
  cursor: pointer;
}
.cem-price-cheaper:hover {
  text-decoration: underline;
}
.cem-price-discount {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}
.cem-price-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}
.cem-price-credit {
  margin-top: 14px;
}
@media (max-width: 480px) {
  .cem-price-card {
  }
  .cem-price-current {
    font-size: 20px;
  }
  .cem-price-credit {
    margin-top: 10px;
  }
  .cem-bnpl {
    padding: 8px 12px;
    gap: 4px 6px;
    font-size: 12px;
  }
  .cem-bnpl-icon {
    width: 18px;
    height: 18px;
  }
  .cem-bnpl-details {
    margin-left: 0;
    padding-left: 22px;
    width: 100%;
    margin-top: 2px;
  }
}

/* ── BNPL credit strip ── */
.cem-bnpl {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #f0f7ff;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}
.cem-bnpl-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.cem-bnpl b {
  color: #1e293b;
  font-weight: 600;
}
.cem-bnpl-details {
  margin-left: auto;
  color: #3a93f6;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.cem-bnpl-details:hover {
  text-decoration: underline;
}

/* ── Credit details modal ── */
#cem-credit-modal .cem-credit-dialog {
  max-width: 420px;
  width: calc(100% - 20px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 20px 0;
  box-sizing: border-box;
}
#cem-credit-modal .cem-credit-content {
  width: 100%;
}
.cem-credit-content {
  border-radius: 16px;
  border: none;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
.cem-credit-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  font-weight: 300;
  color: #94a3b8;
  opacity: 1;
  z-index: 1;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}
.cem-credit-close:hover,
.cem-credit-close:focus {
  color: #1e293b;
  outline: none;
}
.cem-credit-hero {
  text-align: center;
  padding: 24px 16px;
  margin-bottom: 24px;
  background: #f8fafc;
  border-radius: 12px;
}
.cem-credit-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
}
.cem-credit-amount-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.cem-credit-amount {
  font-size: 48px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}
.cem-credit-unit {
  font-size: 16px;
  color: #64748b;
  font-weight: 400;
}
.cem-credit-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 12px;
  position: relative;
  padding: 0 40px;
}
.cem-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a93f6;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.cem-dot + .cem-dot {
  margin-left: 28px;
}
.cem-credit-timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 2px;
  background: #3a93f6;
  z-index: 0;
}
.cem-credit-meta {
  font-size: 14px;
  color: #64748b;
}
.cem-zero {
  color: #16a34a;
  font-weight: 600;
}
.cem-credit-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.cem-credit-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #334155;
}
.cem-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eff6ff;
  color: #3a93f6;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.cem-credit-cta {
  display: block;
  width: 100%;
  padding: 14px;
  background: #3a93f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  margin-bottom: 16px;
}
.cem-credit-cta:hover,
.cem-credit-cta:focus {
  background: #2563eb;
  outline: none;
}
.cem-credit-note {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .cem-credit-content {
    padding: 24px 20px;
    border-radius: 12px;
  }
  .cem-credit-amount {
    font-size: 40px;
  }
  .cem-credit-hero {
    padding: 20px 12px;
    margin-bottom: 20px;
  }
}

/* ── Product meta strip (stock · return · code) ── */
.cem-product-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 0;
  padding: 10px 0 6px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}
.cem-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cem-meta-ok { color: #16a34a; font-weight: 500; }
.cem-meta-ok .fa-circle { font-size: 7px; }
.cem-meta-oos { color: #dc2626; font-weight: 500; }
.cem-meta-sep {
  width: 1px;
  height: 14px;
  background: #cbd5e1;
  margin: 0 10px;
}
.cem-meta-item svg { color: #94a3b8; flex-shrink: 0; }
.cem-meta-code { color: #94a3b8; }

/* ── Attributes compact ── */
#product .ds-product-main-attributes {
  padding: 0;
}
#product .ds-product-main-attributes + .ds-product-main-attributes {
  margin-top: 0;
}
#product .ds-product-main-attributes-item {
  font-size: 13px;
  padding: 3px 0;
  background: none;
  color: #64748b;
}

/* ── Payment section ── */
.cem-payment-section {
  padding: 10px 0 0;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
}
.cem-payment-label {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 8px;
}
.cem-payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cem-payment-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── Mobile filter toggle (category pages) ── */
/* OCFilter + its oct_deals OCMOD XML auto-inject a legacy .ocf-btn-mobile-static
   button into category/search/special templates. OCFilter mobile.css then forces
   it visible via `display: block !important`. We use our own .ds-filter-toggle,
   so hide the legacy duplicate at a higher selector specificity. */
div.ocf-btn-mobile-static,
.ds-category div.ocf-btn-mobile-static {
  display: none !important;
}

.ds-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background-color: #0f172a;
  border: 1.5px solid #0f172a;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition:
    background-color 220ms cubic-bezier(0.25, 0.8, 0.25, 1),
    color 220ms cubic-bezier(0.25, 0.8, 0.25, 1),
    border-color 220ms cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 220ms cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 150ms cubic-bezier(0.25, 0.8, 0.25, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}
.ds-filter-toggle svg {
  width: 16px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}
.ds-filter-toggle:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.ds-filter-toggle:active {
  transform: scale(0.985);
  transition-duration: 100ms;
}
@media (hover: hover) {
  .ds-filter-toggle:hover {
    background-color: #fff;
    color: #0f172a;
    border-color: #0f172a;
    box-shadow:
      0 8px 24px rgba(15, 23, 42, 0.12),
      0 2px 8px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
  }
  .ds-filter-toggle:hover:active {
    transform: translateY(0) scale(0.985);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ds-filter-toggle,
  .ds-filter-toggle:hover,
  .ds-filter-toggle:active {
    transition: none;
    transform: none;
  }
}
