/* ── SS Accessories configurator ──────────────────────────────── */

.ssa-wrap {
  margin: 14px 0;
  padding: 14px;
  background: #f7f7f7;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
}

.ssa-header {
  font-size: 10px;
  font-weight: 800;
  color: #555;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ── Lista de accesorios ───────────────────────────────────────── */

.ssa-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.ssa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}

.ssa-item--checked,
.ssa-item:has(.ssa-checkbox:checked) {
  border-color: #111;
}

.ssa-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ssa-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #111;
  flex-shrink: 0;
  cursor: pointer;
}

.ssa-item-info {
  min-width: 0;
}

.ssa-item-name {
  font-size: 12px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssa-item-sub {
  font-size: 10px;
  color: #999;
  margin-top: 1px;
}

.ssa-item-price {
  font-size: 12px;
  font-weight: 800;
  color: #111;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ── Footer: total + botón ─────────────────────────────────────── */

.ssa-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  gap: 12px;
}

.ssa-total-block {
  display: flex;
  flex-direction: column;
}

.ssa-total-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
  margin-bottom: 2px;
}

.ssa-total-price {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.ssa-total-detail {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 1px;
}

.ssa-btn-all {
  background: #fff;
  color: #111;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.ssa-btn-all:hover {
  opacity: 0.85;
}

.ssa-btn-all:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Desglose en línea de carrito ──────────────────────────────── */

.ssa-cart-breakdown {
  margin-top: 6px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ssa-cart-base-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #555;
}

.ssa-cart-base-label {
  font-weight: 600;
  color: #111;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssa-cart-base-label:hover {
  text-decoration: underline;
}

.ssa-cart-base-combo {
  font-size: 10px;
  font-weight: 400;
  color: #888;
  margin-left: 2px;
}

.ssa-cart-base-price {
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  flex-shrink: 0;
}

.ssa-cart-accessories {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ssa-cart-base-price-only { display: none; }

.ssa-cart-acc-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #555;
  gap: 8px;
}

.ssa-cart-acc-name {
  font-weight: 600;
}

.ssa-cart-acc-price {
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  flex-shrink: 0;
}

.ssa-cart-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e0e0e0;
  margin-top: 3px;
  padding-top: 4px;
}

.ssa-cart-total-label {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.ssa-cart-total-price {
  font-size: 14px;
  font-weight: 800;
  color: #111;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Estado cargando ───────────────────────────────────────────── */

.ssa-btn-all.ssa-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ── Mobile ── */
@media (max-width: 575px) {
  .ssa-wrap {
    padding: 12px;
    margin: 10px 0;
  }

  .ssa-item {
    padding: 9px 11px;
    gap: 8px;
  }

  .ssa-item-name {
    font-size: 12px;
    white-space: normal;
  }

  .ssa-item-sub {
    font-size: 10px;
  }

  .ssa-item-price {
    font-size: 12px;
    margin-left: 6px;
  }

  .ssa-footer {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  .ssa-total-price {
    font-size: 16px;
  }

  .ssa-btn-all {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
  }
}
